/* iPad-First Responsive Design for HAH Visitor Log System */

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* BASE STYLES - Optimized for iPad (768px-1024px) */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #2c3e2d;
    background: linear-gradient(135deg, #f4f6f0 0%, #e8f5e8 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* HEADER - iPad optimized */
.header {
    background: linear-gradient(135deg, #0d1b2a 0%, #061220 100%);
    color: white;
    padding: 8px 40px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-logo-placeholder,
.header-logo {
    width: 160px;
    height: 160px;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
}

.header-logo:hover,
.header-logo-placeholder:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.header-logo-placeholder {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
    overflow: hidden;
}

.logo-square {
    width: 100%;
    height: 100%;
}

.logo-green { background: #8bc34a; }
.logo-blue { background: #2196f3; }
.logo-brown { background: #8d6e63; }
.logo-orange { background: #ff9800; }

.header-text {
    text-align: left;
}

.header h1 {
    font-size: 2.2rem;
    font-weight: 600;
    margin: 0 0 2px 0;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.header p {
    opacity: 0.9;
    font-size: 2.2rem;
    font-weight: 400;
    margin: 0;
    line-height: 1.1;
}

.language-selector select {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    padding: 14px 20px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-width: 160px;
}

.language-selector select:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.language-selector select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.language-selector option {
    background: #0d1b2a;
    color: white;
    padding: 8px;
}

/* NAVIGATION - iPad optimized */
.navigation {
    display: flex;
    background: rgba(248, 249, 250, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-button {
    flex: 1;
    padding: 24px 28px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 56px;
}

.nav-button:hover {
    background: rgba(46, 125, 50, 0.05);
    transform: translateY(-1px);
}

.nav-button.active {
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.nav-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
}

.nav-icon {
    font-size: 1.4rem;
    transition: all 0.3s ease;
    display: inline-block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.nav-button:hover .nav-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.nav-button.active .nav-icon {
    filter: brightness(1.2) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* CONTENT - iPad optimized */
.content {
    padding: 30px;
}

/* FORMS - iPad optimized */
.form-section {
    display: none;
}

.form-section.active {
    display: block;
}

.form-section h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 20px;
    margin-top: 0;
}

.disclaimer-box {
    background: linear-gradient(135deg, #f0f4e8 0%, #e8f2dc 100%);
    border: 2px solid #8b9f7a;
    border-radius: 20px;
    padding: 24px 28px;
    margin-bottom: 35px;
    box-shadow: 0 4px 16px rgba(139, 159, 122, 0.2);
    backdrop-filter: blur(10px);
}

.disclaimer-text {
    color: #4a5d3a;
    font-size: 1.1rem;
    line-height: 1.7;
    margin: 0;
    text-align: left;
}

.disclaimer-text strong {
    color: #3d5a36;
    font-weight: 700;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1d1d1f;
    font-size: 1rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 20px 24px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    min-height: 56px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2e7d32;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.1);
    transform: translateY(-2px);
}

.form-group input:hover,
.form-group select:hover {
    border-color: rgba(46, 125, 50, 0.3);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    accent-color: #2e7d32;
    width: auto;
    height: auto;
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
}

/* MANDATORY FIELDS NOTE */
.mandatory-note {
    margin-bottom: 20px;
    text-align: center;
}

.mandatory-note p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    font-style: italic;
}

.mandatory-note .asterisk {
    color: #dc3545;
    font-weight: bold;
    font-size: 1rem;
}

.button {
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    color: white;
    border: none;
    padding: 22px 36px;
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 4px 16px rgba(46, 125, 50, 0.3);
    letter-spacing: 0.5px;
    min-height: 56px;
}

.button:hover {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
}

.button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.3);
}

/* ADMIN STATS - iPad optimized */
.admin-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    flex: 1;
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    color: white;
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(46, 125, 50, 0.3);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
}

/* DATABASE CONTROLS - iPad optimized */
.database-controls {
    margin: 0 -25px 20px -25px;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.95);
}

.controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 15px;
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-controls label {
    font-weight: 600;
    color: #1d1d1f;
    font-size: 0.9rem;
}

.filter-controls select {
    padding: 12px 16px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-controls select:focus {
    outline: none;
    border-color: #2e7d32;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.button.secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    padding: 12px 20px;
    font-size: 0.9rem;
    width: auto;
}

.button.secondary:hover {
    background: linear-gradient(135deg, #495057 0%, #6c757d 100%);
}

/* Override secondary styling for admin buttons */
.admin-btn.secondary {
    padding: 22px 20px;
    font-size: 1.1rem;
    min-height: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* DATABASE TABLE - iPad optimized */
.database-content {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: auto;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    -webkit-overflow-scrolling: touch;
    margin: 15px -25px 0 -25px;
}

.database-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
    table-layout: fixed;
    min-width: 100%;
}

.database-table th,
.database-table td {
    padding: 8px 4px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    max-width: 150px;
}

.database-table th {
    background: rgba(46, 125, 50, 0.95);
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
    backdrop-filter: blur(10px);
    z-index: 10;
}

/* Specific column widths for iPad - 8 columns */
.database-table th:nth-child(1), .database-table td:nth-child(1) { width: 6%; min-width: 30px; } /* ID */
.database-table th:nth-child(2), .database-table td:nth-child(2) { width: 18%; min-width: 70px; } /* Name */
.database-table th:nth-child(3), .database-table td:nth-child(3) { width: 16%; min-width: 60px; } /* Email */
.database-table th:nth-child(4), .database-table td:nth-child(4) { width: 14%; min-width: 55px; } /* Phone */
.database-table th:nth-child(5), .database-table td:nth-child(5) { width: 8%; min-width: 35px; text-align: center; } /* People */
.database-table th:nth-child(6), .database-table td:nth-child(6) { width: 8%; min-width: 35px; text-align: center; } /* Volunteer */
.database-table th:nth-child(7), .database-table td:nth-child(7) { width: 15%; min-width: 60px; } /* Check In */
.database-table th:nth-child(8), .database-table td:nth-child(8) { width: 15%; min-width: 60px; } /* Check Out */

.database-table tr.active {
    background: rgba(76, 175, 80, 0.1);
}

.database-table tr.checked-out {
    background: rgba(0, 0, 0, 0.05);
    opacity: 0.8;
}

.database-table tr:hover {
    background: rgba(46, 125, 50, 0.05);
}

.database-table tbody tr:hover {
    background: rgba(46, 125, 50, 0.1) !important;
}

.database-table tbody tr.selected {
    background: rgba(46, 125, 50, 0.2) !important;
    border-left: 4px solid #2e7d32;
    box-shadow: inset 0 0 0 1px rgba(46, 125, 50, 0.3);
}

.database-table tbody tr.selected td {
    font-weight: 600;
    color: #3d5a36;
}

/* FOOTER - iPad optimized */
.footer {
    background: linear-gradient(135deg, #0d1b2a 0%, #061220 100%);
    padding: 16px 25px;
    margin-top: 30px;
    text-align: center;
    border-radius: 0 0 24px 24px;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    font-size: 0.8rem;
    line-height: 1.5;
}

.footer-line {
    margin-bottom: 6px;
}

.footer-version {
    margin-top: 6px;
}

.copyright {
    color: white;
    font-weight: 600;
}

.powered-by {
    color: #b0b8c4;
    font-weight: 400;
}

.version-info {
    color: #8a94a6;
    font-size: 0.7rem;
    font-weight: 300;
    font-family: 'Courier New', monospace;
}

/* POPUP MODAL STYLES - iPad optimized */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.popup-modal {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 50px 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s ease;
}

.popup-overlay.show .popup-modal {
    transform: scale(1) translateY(0);
}

.popup-icon {
    font-size: 5rem;
    margin-bottom: 25px;
    animation: popupIconBounce 0.6s ease-out;
}

.popup-content h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1d1d1f;
}

.popup-content p {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}



.popup-close-btn {
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 16px;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(46, 125, 50, 0.3);
    min-width: 150px;
}

.popup-close-btn:hover {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
}

.popup-close-btn:active {
    transform: translateY(0);
}

/* Success popup styling */
.popup-modal.success .popup-icon {
    color: #28a745;
}

.popup-modal.success .popup-content h3 {
    color: #155724;
}

/* Error popup styling */
.popup-modal.error .popup-icon {
    color: #dc3545;
}

.popup-modal.error .popup-content h3 {
    color: #721c24;
}

.popup-modal.error .popup-close-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.popup-modal.error .popup-close-btn:hover {
    background: linear-gradient(135deg, #c82333 0%, #dc3545 100%);
}

/* LOADING AND MESSAGE STYLES */
.message {
    padding: 20px 24px;
    border-radius: 16px;
    margin-bottom: 24px;
    display: none;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.message.success {
    background: rgba(212, 237, 218, 0.95);
    color: #0f5132;
    border-color: rgba(195, 230, 203, 0.7);
    font-weight: 600;
    text-align: center;
    box-shadow: 0 6px 24px rgba(21, 87, 36, 0.2);
    font-size: 1.1rem;
    animation: successPulse 0.6s ease-out;
    transition: all 0.3s ease;
    position: relative;
}

.message.success:hover {
    background: rgba(212, 237, 218, 1);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(21, 87, 36, 0.25);
}

.message.error {
    background: rgba(248, 215, 218, 0.9);
    color: #58151c;
    border-color: rgba(245, 198, 203, 0.5);
    box-shadow: 0 4px 16px rgba(114, 28, 36, 0.1);
}

.message.show {
    display: block;
}

.message-text {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}



.loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.loading.show {
    display: block;
}

.form-resetting {
    opacity: 0.3;
    transition: opacity 0.3s ease;
    transform: scale(0.98);
}

.form-resetting input,
.form-resetting button {
    pointer-events: none;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2e7d32;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

/* ADMIN PANEL STYLES - Match Settings Panel */
.admin-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.admin-panel h3 {
    margin-bottom: 20px;
    color: #1d1d1f;
    font-size: 1.3rem;
    font-weight: 600;
}

.admin-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    justify-content: center;
    align-items: center;
}

.admin-btn {
    flex: 1;
    max-width: 200px;
    padding: 22px 20px;
    font-size: 1.1rem;
    text-align: center;
    min-height: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.admin-btn.danger {
    background: linear-gradient(135deg, #b71c1c 0%, #8b0000 100%);
    box-shadow: 0 4px 16px rgba(183, 28, 28, 0.4);
    border: 2px solid #8b0000;
}

.admin-btn.danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #8b0000 0%, #b71c1c 100%);
    box-shadow: 0 6px 20px rgba(183, 28, 28, 0.6);
    transform: translateY(-2px);
}

.admin-btn.danger:disabled {
    background: linear-gradient(135deg, #ccc 0%, #999 100%) !important;
    box-shadow: none !important;
    border: 2px solid #999 !important;
    cursor: not-allowed;
    opacity: 0.6;
}

.admin-btn.info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    box-shadow: 0 4px 16px rgba(23, 162, 184, 0.4);
    color: white;
}

.admin-btn.info:hover:not(:disabled) {
    background: linear-gradient(135deg, #138496 0%, #17a2b8 100%);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.6);
    transform: translateY(-2px);
}

/* Settings Panel */
.settings-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* Overview section (h2) styling to match Settings header */
.settings-panel h2 {
    color: #1d1d1f;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 20px 0;
}

/* Collapsible Settings Panel (overrides for collapsible version) */
.settings-panel:has(.settings-header) {
    padding: 0;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
}

.settings-header:hover {
    background: rgba(255, 255, 255, 1);
}

.settings-header h3 {
    color: #1d1d1f;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.settings-toggle-icon {
    font-size: 1.2rem;
    color: #2c3e2d;
    transition: transform 0.3s ease;
    user-select: none;
}

.settings-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 25px;
}

.settings-content.open {
    max-height: 1000px;
    padding: 0 25px 25px 25px;
}

.settings-header.open .settings-toggle-icon {
    transform: rotate(180deg);
}

.settings-section {
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.settings-section:first-child {
    margin-top: 15px;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section h4 {
    color: #2c3e2d;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Default settings icon */
.settings-section h4:before {
    content: "⚙️";
    font-size: 0.9rem;
}

/* Specific icons for each settings section */
.settings-section h4[data-i18n="settings.appearance"]:before {
    content: "💡";
}

.settings-section h4[data-i18n="settings.security"]:before {
    content: "🔐";
}

.settings-section h4[data-i18n="settings.system"]:before {
    content: "🖥️";
}

.settings-section h4[data-i18n="settings.support"]:before {
    content: "🆘";
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.setting-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.setting-item label {
    font-weight: 500;
    color: #2c3e2d;
    flex: 1;
}

.theme-selector, #data-retention-selector {
    padding: 6px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    font-size: 0.9rem;
    color: #2c3e2d;
    min-width: 120px;
}

.theme-selector:focus, #data-retention-selector:focus {
    outline: none;
    border-color: #2e7d32;
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.1);
}

.button.small {
    padding: 6px 12px;
    font-size: 0.85rem;
    min-width: 100px;
}

.contact-link {
    color: #2e7d32;
    text-decoration: none;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 4px;
    background: rgba(46, 125, 50, 0.1);
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.contact-link:hover {
    background: rgba(46, 125, 50, 0.2);
    transform: translateY(-1px);
}

.change-pin-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 15px 0;
}

.change-pin-form .pin-input-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.change-pin-form label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #2c3e2d;
}

/* PIN Buttons Container */
.pin-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.pin-buttons .button.small {
    flex: 1;
    min-width: 0;
}

.button.danger.small {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
}

.button.danger.small:hover {
    background: linear-gradient(135deg, #c82333 0%, #dc3545 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.admin-btn:disabled {
    background: linear-gradient(135deg, #ccc 0%, #999 100%);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Admin Modal */
.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.admin-modal.show {
    opacity: 1;
    visibility: visible;
}

.admin-modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s ease;
}

.admin-modal.show .admin-modal-content {
    transform: scale(1) translateY(0);
}

.admin-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    color: white;
    border-radius: 20px 20px 0 0;
}

.admin-modal-header h4 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.close-modal-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-modal-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.admin-form {
    padding: 30px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.admin-form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.admin-form-actions .button {
    width: auto;
    min-width: 120px;
}

/* Datetime Now Buttons */
.datetime-now-btn {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    margin-top: 8px;
    width: 100%;
    max-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.datetime-now-btn:hover {
    background: linear-gradient(135deg, #138496 0%, #17a2b8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(23, 162, 184, 0.3);
}

.datetime-now-btn:active {
    transform: translateY(0);
}

.database-status {
    font-weight: 500;
    padding: 8px 12px;
    background: transparent;
}

/* ANIMATIONS */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes successPulse {
    0% { opacity: 0; transform: scale(0.9) translateY(-10px); }
    50% { transform: scale(1.02) translateY(-5px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes popupIconBounce {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.form-section { animation: fadeInUp 0.6s ease-out; }
.form-group { animation: slideIn 0.4s ease-out; animation-fill-mode: both; }
.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }
.form-group:nth-child(6) { animation-delay: 0.6s; }
.container { animation: fadeInUp 0.8s ease-out; }

/* MOBILE STYLES (iPhone/Small devices) - 320px to 767px */
@media (max-width: 767px) {
    body {
        padding: 15px;
    }
    
    .container {
        border-radius: 20px;
        margin: 0;
        max-width: 100%;
    }
    
    .header {
        padding: 6px 20px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .header p {
        font-size: 1.8rem;
    }
    
    .header-left {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }
    
    .header-logo-placeholder,
    .header-logo {
        width: 150px;
        height: 150px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .header-text {
        text-align: center;
    }
    
    .language-selector select {
        min-width: 120px;
        padding: 12px 16px;
    }
    
    .content {
        padding: 30px 20px;
    }
    
    .navigation {
        flex-direction: column;
    }
    
    .nav-button {
        min-height: 50px;
        padding: 16px 20px;
        font-size: 1.1rem;
        flex-direction: column;
        gap: 4px;
    }
    
    .nav-icon {
        font-size: 1.2rem;
    }
    
    .form-group input,
    .form-group select {
        padding: 16px 20px;
        font-size: 1.1rem;
        min-height: 50px;
    }
    
    .button {
        padding: 18px 28px;
        font-size: 1.1rem;
        min-height: 50px;
    }
    
    .disclaimer-box {
        padding: 18px 20px;
        margin-bottom: 25px;
        border-radius: 12px;
    }
    
    .disclaimer-text {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .admin-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .controls-row {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .filter-controls {
        justify-content: space-between;
    }
    
    .filter-controls select {
        flex: 1;
        max-width: 200px;
    }
    
    .database-table {
        font-size: 0.7rem;
    }
    
    .database-table th,
    .database-table td {
        padding: 6px 4px;
        max-width: 100px;
    }
    
    .footer {
        padding: 10px 15px;
        margin-top: 20px;
        border-radius: 0 0 20px 20px;
    }
    
    .footer-content {
        font-size: 0.7rem;
    }
    
    .version-info {
        font-size: 0.6rem;
    }
    
    /* Mobile Popup Styles */
    .popup-modal {
        max-width: 320px;
        padding: 35px 25px;
    }
    
    .popup-icon {
        font-size: 3.5rem;
        margin-bottom: 20px;
    }
    
    .popup-content h3 {
        font-size: 1.4rem;
        margin-bottom: 12px;
    }
    
    .popup-content p {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .popup-close-btn {
        padding: 16px 28px;
        font-size: 1.1rem;
        min-width: 120px;
    }
    
    /* Mobile Admin Panel */
    .admin-panel {
        margin-top: 15px;
        padding: 20px;
    }
    
    .admin-panel h3 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    
    .admin-actions {
        flex-direction: column;
    }
    
    /* Mobile Settings Panel */
    .settings-panel {
        margin-top: 15px;
        padding: 20px;
    }
    
    .settings-panel h2 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    
    .database-content {
        margin: 15px -20px 0 -20px;
    }
    
    .database-controls {
        margin: 0 -20px 20px -20px;
        padding: 15px 20px;
    }
    
    /* Override for collapsible settings on mobile */
    .settings-panel:has(.settings-header) {
        padding: 0;
    }
    
    .settings-header {
        padding: 20px;
    }
    
    .settings-header h3 {
        font-size: 1.2rem;
    }
    
    .settings-content {
        padding: 0 20px;
    }
    
    .settings-content.open {
        padding: 0 20px 20px 20px;
    }
    
    .settings-section {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .settings-section:first-child {
        margin-top: 12px;
    }
    
    .settings-section h4 {
        margin-bottom: 8px;
        font-size: 1rem;
    }
    
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 6px 0;
        margin-bottom: 6px;
    }
    
    .theme-selector, #data-retention-selector {
        width: 100%;
        min-width: auto;
    }
    
    .button.small {
        width: 100%;
    }
    
    .change-pin-form {
        gap: 10px;
        margin: 10px 0;
    }
    
    .pin-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .pin-buttons .button.small {
        width: 100%;
    }
    
    .admin-btn {
        width: 100%;
        min-width: auto;
    }
    
    .admin-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .admin-modal-header {
        padding: 20px;
    }
    
    .admin-form {
        padding: 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-row .form-group {
        margin-bottom: 20px;
    }
    
    .admin-form-actions {
        flex-direction: column;
    }
    
    .admin-form-actions .button {
        width: 100%;
    }
    
    .datetime-now-btn {
        max-width: none;
        width: 100%;
    }
}

/* DESKTOP/LAPTOP STYLES - 1025px and up */
@media (min-width: 1025px) {
    body {
        padding: 20px;
    }
    
    .container {
        max-width: 900px;
        border-radius: 20px;
    }
    
    .header {
        padding: 6px 30px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .header p {
        font-size: 2rem;
    }
    
    .header-left {
        gap: 12px;
    }
    
    .header-logo-placeholder,
    .header-logo {
        width: 180px;
        height: 180px;
        border-radius: 16px;
    }
    
    .language-selector select {
        padding: 10px 16px;
        font-size: 1rem;
        min-width: 140px;
        border-radius: 12px;
    }
    
    .content {
        padding: 25px;
    }
    
    .nav-button {
        padding: 18px 20px;
        font-size: 1.1rem;
        gap: 8px;
    }
    
    .nav-icon {
        font-size: 1.3rem;
    }
    
    .form-group input,
    .form-group select {
        padding: 16px 20px;
        font-size: 1.1rem;
        border-radius: 12px;
    }
    
    .button {
        padding: 18px 32px;
        font-size: 1.1rem;
        border-radius: 16px;
    }
    

    

    
    .disclaimer-box {
        padding: 20px 24px;
        margin-bottom: 30px;
        border-radius: 16px;
    }
    
    .disclaimer-text {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .database-table {
        font-size: 0.9rem;
        table-layout: auto;
    }
    
    .database-table th,
    .database-table td {
        padding: 12px 8px;
    }
    
    .footer {
        padding: 12px 20px;
        margin-top: 25px;
        border-radius: 0 0 20px 20px;
    }
    
    .footer-content {
        font-size: 0.75rem;
        line-height: 1.4;
    }
    
    .footer-line {
        margin-bottom: 4px;
    }
    
    .footer-version {
        margin-top: 4px;
    }
    
    .version-info {
        font-size: 0.65rem;
    }
    
    /* Desktop Popup Styles */
    .popup-modal {
        max-width: 400px;
        padding: 40px 30px;
    }
    
    .popup-icon {
        font-size: 4rem;
        margin-bottom: 20px;
    }
    
    .popup-content h3 {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }
    
    .popup-content p {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }
    
    .popup-close-btn {
        padding: 14px 32px;
        font-size: 1.1rem;
        min-width: 120px;
    }
}

/* Enhanced focus states for accessibility */
.form-group input:focus-visible,
.form-group select:focus-visible,
.button:focus-visible,
.nav-button:focus-visible,
.language-selector select:focus-visible {
    outline: 3px solid rgba(46, 125, 50, 0.3);
    outline-offset: 2px;
}

/* PIN CODE MODAL STYLES */
.pin-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.pin-overlay.show {
    opacity: 1;
    visibility: visible;
}

.pin-modal {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s ease;
}

.pin-overlay.show .pin-modal {
    transform: scale(1) translateY(0);
}

.pin-header h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e2d;
    margin-bottom: 10px;
}

.pin-header p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
}

.pin-input-container {
    margin-bottom: 30px;
}

.pin-input {
    width: 200px;
    height: 60px;
    font-size: 2rem;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    letter-spacing: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pin-input:focus {
    outline: none;
    border-color: #2e7d32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
    background: rgba(255, 255, 255, 1);
}

.pin-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.pin-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.pin-cancel-btn {
    background: #f5f5f5;
    color: #666;
}

.pin-cancel-btn:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.pin-submit-btn {
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    color: white;
}

.pin-submit-btn:hover {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.3);
}

.pin-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pin-error {
    color: #dc3545;
    font-size: 1rem;
    margin-top: 15px;
    padding: 10px;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

/* BLUR EFFECT FOR CONTAINER WHEN PIN IS SHOWN */
.container.pin-blur {
    filter: blur(5px);
    transition: filter 0.3s ease;
}

/* PIN INPUT ANIMATION */
@keyframes pinShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.pin-input.error {
    border-color: #dc3545;
    animation: pinShake 0.5s ease-in-out;
}

/* Dark Theme */
[data-theme="dark"] {
    color-scheme: dark;
}

[data-theme="dark"] body {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #e0e0e0;
}

[data-theme="dark"] .container {
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Header and footer remain unchanged in dark mode - no additional styling needed */

[data-theme="dark"] .navigation {
    background: rgba(20, 20, 20, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .nav-button {
    background: rgba(40, 40, 40, 0.8);
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .nav-button:hover {
    background: rgba(60, 60, 60, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .nav-button.active {
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    color: white;
}

[data-theme="dark"] .form-section {
    background: rgba(25, 25, 25, 0.9);
}

[data-theme="dark"] .disclaimer-box {
    background: rgba(40, 40, 40, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

[data-theme="dark"] .form-group label {
    color: #e0e0e0;
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select {
    background: rgba(40, 40, 40, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group select:focus {
    border-color: #2e7d32;
    background: rgba(50, 50, 50, 0.9);
}

[data-theme="dark"] .form-group input::placeholder {
    color: #888;
}

[data-theme="dark"] .checkbox-group label {
    color: #e0e0e0;
}

[data-theme="dark"] .mandatory-note {
    color: #ccc;
}

[data-theme="dark"] .settings-panel {
    background: rgba(25, 25, 25, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .settings-panel h2 {
    color: #e0e0e0;
}

[data-theme="dark"] .settings-header {
    background: rgba(25, 25, 25, 0.95);
}

[data-theme="dark"] .settings-header:hover {
    background: rgba(25, 25, 25, 1);
}

[data-theme="dark"] .settings-header h3 {
    color: #e0e0e0;
}

[data-theme="dark"] .settings-toggle-icon {
    color: #e0e0e0;
}

[data-theme="dark"] .settings-section {
    background: rgba(25, 25, 25, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .settings-section h4 {
    color: #e0e0e0;
}

[data-theme="dark"] .setting-item {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .setting-item label {
    color: #e0e0e0;
}

[data-theme="dark"] .theme-selector,
[data-theme="dark"] #data-retention-selector {
    background: rgba(40, 40, 40, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
}

[data-theme="dark"] .theme-selector:focus,
[data-theme="dark"] #data-retention-selector:focus {
    border-color: #2e7d32;
    background: rgba(50, 50, 50, 0.9);
}

[data-theme="dark"] .contact-link {
    background: rgba(46, 125, 50, 0.2);
    color: #4caf50;
}

[data-theme="dark"] .contact-link:hover {
    background: rgba(46, 125, 50, 0.3);
}



[data-theme="dark"] .admin-panel {
    background: rgba(25, 25, 25, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .admin-panel h3 {
    color: #e0e0e0;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .admin-stats {
    background: rgba(35, 35, 35, 0.8);
}

[data-theme="dark"] .stat-card {
    background: rgba(45, 45, 45, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .stat-number {
    color: #4caf50;
}

[data-theme="dark"] .stat-label {
    color: #ccc;
}

[data-theme="dark"] .database-controls {
    background: rgba(25, 25, 25, 0.95);
}

[data-theme="dark"] .database-status {
    background: transparent;
    color: #e0e0e0;
}

[data-theme="dark"] .filter-controls label {
    color: #e0e0e0;
}

[data-theme="dark"] #status-filter {
    background: rgba(40, 40, 40, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
}

[data-theme="dark"] .database-table {
    background: rgba(25, 25, 25, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .database-table th {
    background: rgba(35, 35, 35, 0.9);
    color: #e0e0e0;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .database-table td {
    color: #e0e0e0;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .database-table tbody tr:hover {
    background: rgba(45, 45, 45, 0.7);
}

[data-theme="dark"] .database-table tbody tr.selected {
    background: rgba(46, 125, 50, 0.3);
}

[data-theme="dark"] .database-table tbody tr.checked-out {
    opacity: 0.7;
}

[data-theme="dark"] .database-table .no-data-row {
    background: rgba(45, 45, 45, 0.3);
}

[data-theme="dark"] .database-table .no-data-row td {
    color: #ccc;
}

[data-theme="dark"] .database-table .no-data-row:hover {
    background: rgba(45, 45, 45, 0.3) !important;
}

.database-table .no-data-row {
    background: rgba(248, 249, 250, 0.3);
}

.database-table .no-data-row:hover {
    background: rgba(248, 249, 250, 0.3) !important;
    cursor: default;
}

[data-theme="dark"] .admin-modal {
    background: rgba(25, 25, 25, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .admin-modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .admin-modal-header h4 {
    color: #e0e0e0;
}

[data-theme="dark"] .close-modal-btn {
    color: #e0e0e0;
    background: rgba(40, 40, 40, 0.8);
}

[data-theme="dark"] .close-modal-btn:hover {
    background: rgba(60, 60, 60, 0.9);
}

[data-theme="dark"] .admin-form .form-group label {
    color: #e0e0e0;
}

[data-theme="dark"] .admin-form .form-group input {
    background: rgba(40, 40, 40, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
}

[data-theme="dark"] .datetime-now-btn {
    background: rgba(40, 40, 40, 0.8);
    color: #e0e0e0;
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .datetime-now-btn:hover {
    background: rgba(60, 60, 60, 0.9);
}

[data-theme="dark"] .pin-modal {
    background: rgba(25, 25, 25, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .pin-header h3,
[data-theme="dark"] .pin-header p {
    color: #e0e0e0;
}

[data-theme="dark"] .pin-input {
    background: rgba(40, 40, 40, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
}

[data-theme="dark"] .pin-input:focus {
    border-color: #2e7d32;
    background: rgba(50, 50, 50, 0.9);
}

[data-theme="dark"] .pin-btn {
    background: rgba(40, 40, 40, 0.8);
    color: #e0e0e0;
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .pin-submit-btn {
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    color: white;
}

[data-theme="dark"] .popup-modal {
    background: rgba(25, 25, 25, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .popup-modal h3,
[data-theme="dark"] .popup-modal p {
    color: #e0e0e0;
}



[data-theme="dark"] .popup-close-btn {
    background: rgba(40, 40, 40, 0.8);
    color: #e0e0e0;
}

/* Auto theme - uses system preference */
@media (prefers-color-scheme: dark) {
    [data-theme="auto"] {
        color-scheme: dark;
    }
    
    [data-theme="auto"] body {
        background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
        color: #e0e0e0;
    }
    
    [data-theme="auto"] .container {
        background: rgba(30, 30, 30, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    [data-theme="auto"] .navigation {
        background: rgba(20, 20, 20, 0.9);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    [data-theme="auto"] .nav-button {
        background: rgba(40, 40, 40, 0.8);
        color: #e0e0e0;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    [data-theme="auto"] .nav-button:hover {
        background: rgba(60, 60, 60, 0.9);
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    [data-theme="auto"] .nav-button.active {
        background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
        color: white;
    }
    
    [data-theme="auto"] .form-section {
        background: rgba(25, 25, 25, 0.9);
    }
    
    [data-theme="auto"] .disclaimer-box {
        background: rgba(40, 40, 40, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: #e0e0e0;
    }
    
    [data-theme="auto"] .form-group label {
        color: #e0e0e0;
    }
    
    [data-theme="auto"] .form-group input,
    [data-theme="auto"] .form-group select {
        background: rgba(40, 40, 40, 0.9);
        border: 2px solid rgba(255, 255, 255, 0.2);
        color: #e0e0e0;
    }
    
    [data-theme="auto"] .form-group input:focus,
    [data-theme="auto"] .form-group select:focus {
        border-color: #2e7d32;
        background: rgba(50, 50, 50, 0.9);
    }
    
    [data-theme="auto"] .form-group input::placeholder {
        color: #888;
    }
    
    [data-theme="auto"] .checkbox-group label {
        color: #e0e0e0;
    }
    
    [data-theme="auto"] .mandatory-note {
        color: #ccc;
    }
    
    [data-theme="auto"] .settings-panel {
        background: rgba(25, 25, 25, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    [data-theme="auto"] .settings-panel h2 {
        color: #e0e0e0;
    }
    
    [data-theme="auto"] .settings-header {
        background: rgba(25, 25, 25, 0.95);
    }
    
    [data-theme="auto"] .settings-header:hover {
        background: rgba(25, 25, 25, 1);
    }
    
    [data-theme="auto"] .settings-header h3 {
        color: #e0e0e0;
    }
    
    [data-theme="auto"] .settings-toggle-icon {
        color: #e0e0e0;
    }
    
    [data-theme="auto"] .settings-section {
        background: rgba(25, 25, 25, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    [data-theme="auto"] .settings-section h4 {
        color: #e0e0e0;
    }
    
    [data-theme="auto"] .setting-item {
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    [data-theme="auto"] .setting-item label {
        color: #e0e0e0;
    }
    
    [data-theme="auto"] .theme-selector,
    [data-theme="auto"] #data-retention-selector {
        background: rgba(40, 40, 40, 0.9);
        border-color: rgba(255, 255, 255, 0.2);
        color: #e0e0e0;
    }
    
    [data-theme="auto"] .theme-selector:focus,
    [data-theme="auto"] #data-retention-selector:focus {
        border-color: #2e7d32;
        background: rgba(50, 50, 50, 0.9);
    }
    
    [data-theme="auto"] .contact-link {
        background: rgba(46, 125, 50, 0.2);
        color: #4caf50;
    }
    
    [data-theme="auto"] .contact-link:hover {
        background: rgba(46, 125, 50, 0.3);
    }
    
    [data-theme="auto"] .admin-panel {
        background: rgba(25, 25, 25, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    [data-theme="auto"] .admin-panel h3 {
        color: #e0e0e0;
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    [data-theme="auto"] .admin-stats {
        background: rgba(35, 35, 35, 0.8);
    }
    
    [data-theme="auto"] .stat-card {
        background: rgba(45, 45, 45, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    [data-theme="auto"] .stat-number {
        color: #4caf50;
    }
    
    [data-theme="auto"] .stat-label {
        color: #ccc;
    }
    
    [data-theme="auto"] .database-controls {
        background: rgba(25, 25, 25, 0.95);
    }
    
    [data-theme="auto"] .database-status {
        background: transparent;
        color: #e0e0e0;
    }
    
    [data-theme="auto"] .filter-controls label {
        color: #e0e0e0;
    }
    
    [data-theme="auto"] #status-filter {
        background: rgba(40, 40, 40, 0.9);
        border-color: rgba(255, 255, 255, 0.2);
        color: #e0e0e0;
    }
    
    [data-theme="auto"] .database-table {
        background: rgba(25, 25, 25, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    [data-theme="auto"] .database-table th {
        background: rgba(35, 35, 35, 0.9);
        color: #e0e0e0;
        border-bottom-color: rgba(255, 255, 255, 0.2);
    }
    
    [data-theme="auto"] .database-table td {
        color: #e0e0e0;
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    [data-theme="auto"] .database-table tbody tr:hover {
        background: rgba(45, 45, 45, 0.7);
    }
    
    [data-theme="auto"] .database-table tbody tr.selected {
        background: rgba(46, 125, 50, 0.3);
    }
    
    [data-theme="auto"] .database-table tbody tr.checked-out {
        opacity: 0.7;
    }
    
    [data-theme="auto"] .database-table .no-data-row {
        background: rgba(45, 45, 45, 0.3);
    }
    
    [data-theme="auto"] .database-table .no-data-row td {
        color: #ccc;
    }
    
    [data-theme="auto"] .database-table .no-data-row:hover {
        background: rgba(45, 45, 45, 0.3) !important;
    }
    
    [data-theme="auto"] .admin-modal {
        background: rgba(25, 25, 25, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    [data-theme="auto"] .admin-modal-header {
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    [data-theme="auto"] .admin-modal-header h4 {
        color: #e0e0e0;
    }
    
    [data-theme="auto"] .close-modal-btn {
        color: #e0e0e0;
        background: rgba(40, 40, 40, 0.8);
    }
    
    [data-theme="auto"] .close-modal-btn:hover {
        background: rgba(60, 60, 60, 0.9);
    }
    
    [data-theme="auto"] .admin-form .form-group label {
        color: #e0e0e0;
    }
    
    [data-theme="auto"] .admin-form .form-group input {
        background: rgba(40, 40, 40, 0.9);
        border-color: rgba(255, 255, 255, 0.2);
        color: #e0e0e0;
    }
    
    [data-theme="auto"] .datetime-now-btn {
        background: rgba(40, 40, 40, 0.8);
        color: #e0e0e0;
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    [data-theme="auto"] .datetime-now-btn:hover {
        background: rgba(60, 60, 60, 0.9);
    }
    
    [data-theme="auto"] .pin-modal {
        background: rgba(25, 25, 25, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    [data-theme="auto"] .pin-header h3,
    [data-theme="auto"] .pin-header p {
        color: #e0e0e0;
    }
    
    [data-theme="auto"] .pin-input {
        background: rgba(40, 40, 40, 0.9);
        border-color: rgba(255, 255, 255, 0.2);
        color: #e0e0e0;
    }
    
    [data-theme="auto"] .pin-input:focus {
        border-color: #2e7d32;
        background: rgba(50, 50, 50, 0.9);
    }
    
    [data-theme="auto"] .pin-btn {
        background: rgba(40, 40, 40, 0.8);
        color: #e0e0e0;
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    [data-theme="auto"] .pin-submit-btn {
        background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
        color: white;
    }
    
    [data-theme="auto"] .popup-modal {
        background: rgba(25, 25, 25, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    [data-theme="auto"] .popup-modal h3,
    [data-theme="auto"] .popup-modal p {
        color: #e0e0e0;
    }
    

    
    [data-theme="auto"] .popup-close-btn {
        background: rgba(40, 40, 40, 0.8);
        color: #e0e0e0;
    }
}

/* DONATION MODAL STYLES */
.donation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.donation-overlay.show {
    opacity: 1;
    visibility: visible;
}

.donation-modal {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s ease;
}

.donation-overlay.show .donation-modal {
    transform: scale(1) translateY(0);
}

.donation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    color: white;
    border-radius: 20px 20px 0 0;
}

.donation-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.donation-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.donation-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.donation-content {
    padding: 30px;
}

.donation-content > p {
    font-size: 1.05rem;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
    text-align: center;
}

.donation-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 0;
}

.paypal-btn {
    background: linear-gradient(135deg, #0070ba 0%, #003087 100%);
    color: white;
    padding: 18px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.paypal-btn:hover {
    background: linear-gradient(135deg, #003087 0%, #0070ba 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 112, 186, 0.4);
}

.paypal-logo {
    height: 24px;
    width: auto;
}

.skip-btn {
    background: rgba(0, 0, 0, 0.05);
    color: #666;
    padding: 14px 24px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.skip-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #2c3e2d;
    border-color: rgba(0, 0, 0, 0.2);
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 100px;
        transform: translateY(0);
    }
}

/* Dark theme for donation modal */
[data-theme="dark"] .donation-modal {
    background: rgba(25, 25, 25, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .donation-content > p {
    color: #ccc;
}

[data-theme="dark"] .donation-amount-btn {
    background: rgba(40, 40, 40, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
}

[data-theme="dark"] .donation-amount-btn:hover {
    background: rgba(50, 50, 50, 0.9);
}

[data-theme="dark"] .donation-amount-btn.selected {
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    color: white;
}

[data-theme="dark"] .custom-amount-input label {
    color: #e0e0e0;
}

[data-theme="dark"] .custom-amount-input input {
    background: rgba(40, 40, 40, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
}

[data-theme="dark"] .donation-options {
    background: rgba(46, 125, 50, 0.1);
    border-color: rgba(46, 125, 50, 0.2);
}

[data-theme="dark"] .donation-options .checkbox-group label {
    color: #e0e0e0;
}

[data-theme="dark"] .card-btn {
    background: rgba(40, 40, 40, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
}

[data-theme="dark"] .card-btn:hover:not(:disabled) {
    background: rgba(50, 50, 50, 0.9);
}

[data-theme="dark"] .donation-skip-btn {
    color: #ccc;
}

[data-theme="dark"] .donation-skip-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
}

[data-theme="dark"] .donation-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* Mobile responsive for donation modal */
@media (max-width: 767px) {
    .donation-modal {
        width: 95%;
    }
    
    .donation-header {
        padding: 20px;
    }
    
    .donation-header h3 {
        font-size: 1.2rem;
    }
    
    .donation-content {
        padding: 20px;
    }
    
    .donation-amounts {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .donation-amount-btn {
        padding: 14px 10px;
        font-size: 1rem;
    }
}
