/* ===========================
   GENERAL STYLES
   =========================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #1a1a1a;
    line-height: 1.6;
}

a {
    color: #E63946;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: #C41E3A;
}

/* ===========================
   HEADER & NAVIGATION
   =========================== */

header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(230, 57, 70, 0.2);
    margin-bottom: 2rem;
    border-bottom: 4px solid #E63946;
}

header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    background: white;
    padding: 0.5rem;
    border-radius: 4px;
}

.logo-placeholder {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #E63946;
    flex-shrink: 0;
}

.header-text h1 {
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
    color: white;
}

.header-text p {
    font-size: 0.9rem;
    opacity: 0.9;
    color: white;
}

nav {
    background-color: #FFFFFF;
    padding: 1rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 5px rgba(230, 57, 70, 0.1);
    border-top: 3px solid #E63946;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

nav a {
    color: #1a1a1a;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

nav a:hover,
nav a.active {
    background-color: #E63946;
    color: white;
}

/* ===========================
   CONTAINER & LAYOUT
   =========================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.main-content {
    margin-bottom: 3rem;
}

/* ===========================
   CARDS & BOXES
   =========================== */

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(230, 57, 70, 0.08);
    padding: 2rem;
    margin-bottom: 2rem;
    border-left: 5px solid #E63946;
}

.card h2 {
    color: #1a1a1a;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #E63946;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-header h2 {
    margin: 0;
    border: none;
    padding: 0;
}

/* ===========================
   TABLES
   =========================== */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background-color: white;
}

thead {
    background-color: #1a1a1a;
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: white;
    border-bottom: 2px solid #E63946;
    background-color: #1a1a1a;
}

td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    background-color: white;
}

tbody tr {
    background-color: white;
}

tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

tbody tr:hover {
    background-color: #f5f5f5;
}

tfoot tr {
    background-color: #efefef;
    font-weight: bold;
}

tfoot td {
    padding: 1rem;
    border: 1px solid #ddd;
    background-color: #efefef;
}

/* ===========================
   FORMS
   =========================== */

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #1a1a1a;
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #E63946;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-row.full {
    grid-template-columns: 1fr;
}

/* ===========================
   BUTTONS
   =========================== */

button,
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary,
button[type="submit"] {
    background-color: #E63946;
    color: white;
}

.btn-primary:hover,
button[type="submit"]:hover {
    background-color: #C41E3A;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(230, 57, 70, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-danger {
    background-color: #E63946;
    color: white;
}

.btn-danger:hover {
    background-color: #C41E3A;
}

.btn-warning {
    background-color: #FFA500;
    color: white;
}

.btn-warning:hover {
    background-color: #FF8C00;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.button-group {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* ===========================
   ALERTS & MESSAGES
   =========================== */

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #28a745;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #E63946;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffc107;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #17a2b8;
}

/* ===========================
   DASHBOARD STATS
   =========================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(230, 57, 70, 0.08);
    border-left: 4px solid #E63946;
}

.stat-card.blue {
    border-color: #E63946;
}

.stat-card.green {
    border-color: #28a745;
}

.stat-card.orange {
    border-color: #E63946;
}

.stat-card.red {
    border-color: #E63946;
}

.stat-card h3 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
}

/* ===========================
   PAGINATION
   =========================== */

.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 2rem 0;
}

.pagination a,
.pagination span {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #E63946;
}

.pagination a:hover {
    background-color: #E63946;
    color: white;
}

.pagination .active {
    background-color: #E63946;
    color: white;
    border-color: #E63946;
}

/* ===========================
   SEARCH & FILTER
   =========================== */

.search-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-box input {
    flex: 1;
    max-width: 300px;
}

.filter-bar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.filter-bar select {
    flex: 1;
    min-width: 150px;
}

/* ===========================
   FOOTER
   =========================== */

footer {
    background-color: #1a1a1a;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    border-top: 4px solid #E63946;
}

footer p {
    margin: 0.5rem 0;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    header {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.5rem;
    }

    nav ul {
        gap: 0.75rem;
    }

    nav a {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 0.9rem;
    }

    th,
    td {
        padding: 0.75rem 0.5rem;
    }

    .button-group {
        flex-direction: column;
    }

    .button-group button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.2rem;
    }

    nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }

    table {
        font-size: 0.8rem;
    }

    .stat-card .value {
        font-size: 1.5rem;
    }
}
/* ===========================
   CHECKBOX GROUP STYLES
   =========================== */

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
    cursor: pointer;
    accent-color: #E63946;
}

.checkbox-label:hover {
    color: #E63946;
}

.text-danger {
    color: #e74c3c;
}

/* ===========================
   USER SECTION (Header)
   =========================== */

.user-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-left: 2rem;
    border-left: 2px solid rgba(230, 57, 70, 0.3);
}

.user-name {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.95rem;
    font-weight: 500;
    color: white;
}

.user-role {
    font-size: 0.75rem;
    color: #E63946;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.btn-danger {
    background-color: #C41E3A;
    color: white;
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background-color: #A01830;
    text-decoration: none;
}

/* ===========================
   BADGES
   =========================== */

.role-badge,
.status-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-success {
    background-color: #27ae60;
    color: white;
}

.badge-warning {
    background-color: #f39c12;
    color: white;
}

.badge-danger {
    background-color: #E63946;
    color: white;
}

.badge-primary {
    background-color: #3498db;
    color: white;
}