* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #002e6a;
    --primary-light: #004a9e;
    --secondary-color: #ffbd00;
    --secondary-dark: #fca601;
    --danger-color: #c71806;
    --warning-color: #ffbd00;
    --dark-color: #00174a;
    --light-color: #f5f5f5;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0, 46, 106, 0.15);
    --shadow-hover: 0 4px 20px rgba(0, 46, 106, 0.25);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #002e6a 0%, #004a9e 50%, #00174a 100%);
    min-height: 100vh;
    color: var(--dark-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


/* Navbar */
.navbar {
    background: white;
    box-shadow: var(--shadow);
    padding: 0.6rem 0;
    margin-bottom: 2rem;
    position: relative;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.logo-img {
    height: 42px;
    width: auto;
    object-fit: contain;
}

.logo-img-sk {
    height: 38px;
}

.nav-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.nav-title {
    color: var(--primary-color);
    font-size: 1.25rem; /* slightly smaller so full name fits */
    margin: 0;
    font-weight: 800;
    letter-spacing: 0.3px;
    white-space: nowrap; /* force system name to stay on one line */
}

.nav-subtitle {
    margin: 0;
    font-size: 0.82rem;
    color: var(--primary-color);
    opacity: 0.85;
    letter-spacing: 0.6px;
}

.nav-menu {
    display: flex;
    gap: 0.25rem;
    flex-wrap: nowrap; /* keep all nav items on a single line */
    margin-left: auto; /* push nav buttons to the right */
    justify-content: flex-end;
}

.nav-break {
    display: none; /* no visual effect when keeping nav in a single row */
}

.nav-link {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.4rem 0.75rem;
    border-radius: 5px;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--primary-color);
    background: var(--light-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--dark-color);
    margin: 3px 0;
    transition: transform 0.2s, opacity 0.2s;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding-bottom: 2rem;
}

.dashboard-container {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 1rem;
    box-shadow: var(--shadow);
}

/* Flash Messages */
.flash-messages {
    margin-bottom: 1.5rem;
}

.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: #f3f71e; /* soft yellow background */
    color: #170485;      /* dark yellow/brown text for contrast */
    border: 1px solid #f8f528;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.login-card {
    background: white;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow-hover);
    width: 100%;
    max-width: 400px;
}

.logo-container {
    text-align: center;
    margin-bottom: 1rem;
}

.card-logo {
    height: 80px;
    width: auto;
    object-fit: contain;
    max-width: 100%;
}

.login-card h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.login-info {
    margin-top: 1rem;
    text-align: center;
    color: #666;
}

.login-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.login-info a:hover {
    text-decoration: underline;
}

/* Registration Page */
.register-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem 0;
}

.register-card {
    background: white;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow-hover);
    width: 100%;
    max-width: 600px;
}

.register-card h2 {
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    margin-top: 0.5rem;
}

.register-card .subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.required {
    color: var(--danger-color);
}

.btn-block {
    width: 100%;
    margin-top: 0.5rem;
}

.register-footer {
    margin-top: 1.5rem;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.register-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.register-footer a:hover {
    text-decoration: underline;
}

/* Form Sections */
.form-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.form-section h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 1.3rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.radio-group {
    display: flex;
    gap: 2rem;
    margin-top: 0.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: normal;
}

.radio-label input[type="radio"] {
    width: auto;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary-color);
}

@media (max-width: 768px) {
    .nav-title {
        font-size: 1.1rem;
        white-space: normal; /* allow wrapping on very small screens */
    }
    .radio-group {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Success Page */
.success-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem 0;
}

.success-card {
    background: white;
    padding: 3rem 2.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow-hover);
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    margin: 0 auto 1.5rem;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.success-card h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.success-message {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1rem;
}

.success-card p {
    color: #666;
    margin-bottom: 0.5rem;
}

.info-text {
    background: var(--light-color);
    padding: 1rem;
    border-radius: 5px;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.success-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.success-actions .btn {
    min-width: 150px;
}

/* Dashboard */
.dashboard {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.dashboard h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.subtitle {
    color: #666;
    margin-bottom: 2rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: linear-gradient(135deg, #002e6a 0%, #004a9e 100%);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
}

.feature-card p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

/* Cards */
.card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

/* Introductory Page */
.intro-card {
    font-size: 1.1rem;
}

.intro-card .intro-text {
    font-size: 1.05em;
}

.page-header {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.page-header h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.page-header p {
    color: #666;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="file"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1.1rem;
    transition: border-color 0.3s;
    min-height: 48px;
    background-color: white;
}

.form-group select {
    cursor: pointer;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.875rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    min-height: 48px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #00174a;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #fca601;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    min-height: auto;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #a01405;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.event-info {
    line-height: 2;
}

.event-info p {
    margin-bottom: 0.5rem;
}

.scan-form {
    margin-top: 1rem;
}

#reader {
    position: relative;
    min-height: 300px;
}

#reader video {
    width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow);
    background: #000;
}

#reader canvas {
    display: none;
}

#reader__dashboard {
    margin-top: 1rem;
}

#reader__dashboard_section_csr {
    margin-top: 1rem;
}

.event-form {
    margin-top: 1rem;
}

#searchInput:focus {
    outline: none;
    border-color: var(--primary-color);
}

#yearFilter:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* QR Cards Grid Layout */
.qr-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.qr-card {
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.qr-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.qr-card-header {
    background: linear-gradient(135deg, #ffbd00 0%, #fca601 100%);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qr-card-icons {
    display: flex;
    gap: 0.5rem;
}

.qr-card-icons .icon {
    color: white;
    font-size: 0.9rem;
    opacity: 0.9;
}

.close-icon {
    color: white;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.8;
}

.qr-card-body {
    background: #000;
    padding: 1.5rem;
    text-align: center;
    position: relative;
}

.qr-code-display {
    margin-bottom: 1rem;
}

.qr-code-image {
    width: 100%;
    max-width: 200px;
    height: auto;
    background: white;
    padding: 0.5rem;
    border-radius: 5px;
}

.qr-card-text {
    color: white;
    text-align: center;
}

.qr-card-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
    letter-spacing: 2px;
}

.qr-card-subtitle {
    font-size: 0.75rem;
    opacity: 0.9;
    letter-spacing: 1px;
}

.qr-card-info {
    padding: 1.5rem;
    background: white;
}

.info-item {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item strong {
    color: var(--dark-color);
    display: inline-block;
    min-width: 90px;
}

.qr-card-actions {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    display: flex;
    gap: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.btn-view {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-view:hover {
    background: #00174a;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-download {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-download:hover {
    background: #fca601;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Responsive QR Cards */
@media (max-width: 768px) {
    .qr-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .qr-card-actions {
        flex-direction: column;
    }
    
    .btn-view,
    .btn-download {
        width: 100%;
    }
}

/* QR Code Display */
.qr-result {
    text-align: center;
}

.qr-image-container {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
}

.qr-image {
    max-width: 300px;
    height: auto;
    border: 5px solid var(--light-color);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.qr-actions {
    margin: 1.5rem 0;
}

.qr-data-display {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--light-color);
    border-radius: 5px;
}

.qr-data-display code {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    display: inline-block;
    word-break: break-all;
}

/* Scan Results */
.scan-result {
    margin-top: 2rem;
}

.scanned-data {
    margin-top: 1.5rem;
}

.data-box {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: 5px;
    margin-top: 1rem;
}

.data-box code {
    background: white;
    padding: 1rem;
    border-radius: 5px;
    display: block;
    word-break: break-all;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background: white;
    padding: 1rem 0;
    margin-top: 3rem;
    text-align: center;
    color: #666;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

/* Registered Persons Table */
.table-container {
    overflow-x: auto;
    margin: 1rem 0;
}

.persons-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.persons-table thead {
    background: linear-gradient(135deg, #002e6a 0%, #004a9e 100%);
    color: white;
}

.persons-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.persons-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.persons-table tbody tr {
    transition: background-color 0.2s;
}

.persons-table tbody tr:hover {
    background-color: var(--light-color);
}

.persons-table tbody tr:last-child td {
    border-bottom: none;
}

.user-id {
    background: var(--light-color);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
}

.stats-summary {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--light-color);
    border-radius: 5px;
    text-align: center;
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #666;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
    }

    .logo-img {
        height: 44px;
    }

    .logo-img-sk {
        height: 40px;
    }

    .nav-title {
        font-size: 1.3rem;
        text-align: center;
    }

    .nav-subtitle {
        text-align: left;
        font-size: 0.78rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        background: white;
        padding: 0.5rem 1rem;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
        z-index: 1000;
    }

    .nav-menu.open {
        display: flex;
    }

/* Admins dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    padding: 0;
    font: inherit;
    color: inherit;
    display: inline-block;
}

.nav-dropdown-toggle:focus {
    outline: none;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    min-width: 190px;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    padding: 0.35rem 0;
    display: none;
    z-index: 1000;
}

.nav-dropdown-menu.open {
    display: block;
}

.nav-dropdown-item {
    display: block;
    padding: 0.45rem 0.9rem;
    color: #002e6a !important;
    text-decoration: none !important;
    font-size: 0.9rem;
    white-space: nowrap;
}

.nav-dropdown-item:hover {
    background-color: #f2f4f8;
}

    .nav-link {
        width: 100%;
        padding: 0.5rem 0;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .login-card {
        padding: 1.5rem;
    }

    .persons-table {
        font-size: 0.9rem;
    }

    .persons-table th,
    .persons-table td {
        padding: 0.75rem 0.5rem;
    }

    .table-container {
        overflow-x: scroll;
    }
}

/* Dashboard Header */
.dashboard-container .dashboard-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.dashboard-container .dashboard-header h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.dashboard-container .dashboard-header p {
    font-size: 1rem;
    color: var(--primary-color);
    margin: 0;
    opacity: 0.8;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.stat-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
    position: relative;
}

.stat-icon svg {
    width: 32px;
    height: 32px;
}

.stat-icon-multiple {
    width: 80px;
    justify-content: flex-start;
}

.stat-icon-multiple svg {
    width: 24px;
    height: 24px;
}

.stat-icon-purple {
    background: #9C27B0;
    color: white;
}

.stat-icon-green {
    background: #4CAF50;
    color: white;
}

.stat-icon-gold {
    background: #FFC107;
    color: white;
}

/* Unified red style for dashboard/analytics stat icons */
.stat-icon-red {
    background: var(--danger-color);
    color: white;
}

.stat-content {
    flex: 1;
}

.stat-content h3 {
    font-size: 2rem;
    color: var(--dark-color);
    margin: 0;
    font-weight: bold;
}

.stat-content p {
    margin: 0.25rem 0 0 0;
    color: #666;
    font-size: 0.9rem;
}

/* Modules Grid */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.module-card {
    /* Changed from primary blue to red for module background */
    background: var(--primary-light);
    border-radius: 12px;
    padding: 2rem;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow);
}

.module-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.module-icon {
    /* Removed solid background box behind icons */
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.module-icon svg {
    width: 48px;
    height: 48px;
    color: #ffffff;
    fill: #ffffff;
}

.module-icon-purple {
    background: transparent;
    color: #ffffff;
}

.module-icon-blue {
    background: transparent;
    color: #ffffff;
}

.module-icon-gold {
    background: transparent;
    color: #ffffff;
}

.module-icon-chart {
    background: transparent;
    color: #ffffff;
}

.module-card h3 {
    font-size: 1.3rem;
    margin: 0 0 0.75rem 0;
    font-weight: 600;
    color: white;
}

.module-card p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 1.5rem 0;
    line-height: 1.5;
}

.module-btn {
    background: var(--dark-color);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
    display: inline-block;
}

.module-btn:hover {
    background: #000d1f;
    color: white;
}

/* Search Form */
.search-form {
    margin-bottom: 0;
}

.search-form .form-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.search-form .form-group {
    margin-bottom: 0;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .dashboard-header h1 {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
    }
    
    .stat-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .stat-content h3 {
        font-size: 1.5rem;
    }
    
    .modules-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .module-card {
        padding: 1.5rem;
    }
    
    .module-icon {
        width: 60px;
        height: 60px;
    }
    
    .module-icon svg {
        width: 36px;
        height: 36px;
    }
    
    .search-form .form-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .page-header {
        text-align: center;
    }
    
    .page-header h2 {
        font-size: 1.5rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-card {
        text-align: center;
    }
    
    /* Touch-friendly buttons */
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }
    
    /* Better form inputs on mobile */
    input[type="text"],
    input[type="email"],
    input[type="date"],
    input[type="time"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.75rem;
    }
    
    /* Better table scrolling on mobile */
    .table-container {
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        flex-direction: row;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .card {
        padding: 1rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
}

/* PWA and Mobile Viewport */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Consent Page */
.consent-container {
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
}

.consent-page {
    background: white;
    min-height: calc(100vh - 200px);
    padding: 2rem;
    color: var(--dark-color);
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.consent-logo-container {
    text-align: center;
    margin-bottom: 2rem;
}

.consent-main-logo {
    height: 150px;
    width: auto;
    object-fit: contain;
    max-width: 100%;
}

.consent-heading {
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 2rem;
    margin-top: 1rem;
}

.consent-content {
    text-align: left;
    line-height: 1.8;
}

.consent-section {
    margin-bottom: 2rem;
}

.consent-section h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.75rem;
}

.consent-section p {
    color: var(--dark-color);
    font-size: 1rem;
    margin: 0;
}

.consent-statement {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.consent-statement p {
    color: var(--dark-color);
    font-size: 1rem;
    line-height: 1.8;
}

.consent-form {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.consent-options {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.consent-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dark-color);
    font-size: 1.1rem;
    cursor: pointer;
}

.consent-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--secondary-color);
}

.consent-option span {
    user-select: none;
}

.consent-submit-btn {
    background: var(--secondary-color);
    color: white;
    font-size: 1.2rem;
    padding: 1rem 2rem;
    margin-top: 1rem;
}

.consent-submit-btn:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 189, 0, 0.4);
}

@media (max-width: 768px) {
    .consent-page {
        padding: 1.5rem 1rem;
    }
    
    .consent-main-logo {
        height: 120px;
    }
    
    .consent-heading {
        font-size: 2rem;
    }
    
    .consent-section h3 {
        font-size: 1.1rem;
    }
    
    .consent-section p,
    .consent-statement p {
        font-size: 0.95rem;
    }
    
    .consent-options {
        flex-direction: column;
        gap: 1rem;
    }
    
    .consent-option {
        font-size: 1rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .page-header a {
        display: none;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}

