/* JIT Platform - Main Stylesheet */
/* JIT Engineering Limited - Multi-Functional Platform */

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    color: #2a2a2a;
    background: #f5f5f5;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--brand-primary, #800000);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: var(--brand-primary, #800000);
    color: white;
}

.btn-primary:hover {
    background: var(--brand-primary-dark, #660000);
}

.btn-secondary {
    background: #4a4a4a;
    color: white;
}

.btn-secondary:hover {
    background: #333;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--brand-primary, #800000);
    color: var(--brand-primary, #800000);
}

.btn-outline:hover {
    background: var(--brand-primary, #800000);
    color: white;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-success {
    background: #22c55e;
    color: white;
}

.btn-success:hover {
    background: #16a34a;
}

.btn-info {
    background: #007bff;
    color: white;
}

.btn-info:hover {
    background: #0056b3;
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid #007bff;
    color: #007bff;
}

.btn-outline-primary:hover {
    background: #007bff;
    color: white;
}

/* Cards */
.card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    outline: none;
    font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--brand-primary, #800000);
    box-shadow: 0 0 0 2px rgba(128, 0, 0, 0.15);
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

/* Alerts */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    border-bottom: 1px solid #e2e8f0;
    padding: 10px;
    text-align: left;
}

th {
    background: #f8fafc;
    font-weight: 600;
}

/* Grid */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Flex */
.flex {
    display: flex;
    gap: 15px;
}

.flex-between {
    justify-content: space-between;
}

.flex-center {
    justify-content: center;
}

/* Text Utilities */
.text-center {
    text-align: center;
}

.text-muted {
    color: #64748b;
}

/* Button Sizes */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

/* Badge Variants */
.badge-planning {
    background: #6c757d;
    color: white;
}

.badge-active {
    background: #28a745;
    color: white;
}

.badge-completed {
    background: #007bff;
    color: white;
}

.badge-published {
    background: #28a745;
    color: white;
}

.badge-draft {
    background: #6c757d;
    color: white;
}

.badge-high {
    background: #dc3545;
    color: white;
}

.badge-urgent {
    background: var(--brand-primary);
    color: white;
}

/* Data Table Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: #f8fafc;
    font-weight: 600;
}

.table-container {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .flex {
        flex-direction: column;
    }
}

/* Loading */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.badge-primary {
    background: var(--brand-primary, #800000);
    color: white;
}

.badge-success {
    background: #22c55e;
    color: white;
}

.badge-warning {
    background: #f59e0b;
    color: white;
}

.badge-danger {
    background: #ef4444;
    color: white;
}

/* Progress Bar */
.progress {
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--brand-primary, #800000);
    transition: width 0.3s ease;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal.active {
    display: block;
}

.modal-content {
    background: white;
    margin: 50px auto;
    padding: 20px;
    border-radius: 10px;
    max-width: 600px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pagination a,
.pagination button,
.pagination .page-link {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    cursor: pointer;
    text-decoration: none;
    color: #2a2a2a;
}

.pagination a.active,
.pagination button.active,
.pagination .page-link.active {
    background: var(--brand-primary, #800000);
    color: white;
    border-color: var(--brand-primary, #800000);
}

.pagination-btn:hover:not(.active),
.pagination .page-link:hover:not(.active) {
    background: #f5f5f5;
}

.pagination-info {
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 10px;
}