﻿/* ========================================
   EXISTING STYLES
   ======================================== */
html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    height: 100%;
    margin: 0;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
    padding-bottom: 120px; /* Add padding to prevent footer from hiding buttons */
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url('error-icon.svg') no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}


/* ========================================
   LOGIN PAGE STYLES
   ======================================== */

/* Login Container - Full screen gradient background */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

/* Login Card - White card in center */
.login-card {
    background: white;
    border-radius: 16px;
    padding: 48px 40px;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Login Title */
.login-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 8px;
}

/* OAuth Buttons Container */
.oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Divider between OAuth and email login */
.divider-container {
    display: flex;
    align-items: center;
    margin: 24px 0;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.divider-text {
    padding: 0 16px;
    color: #718096;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Email login link */
.login-card .btn-link {
    color: #667eea;
    font-weight: 500;
}

    .login-card .btn-link:hover {
        color: #5a67d8;
    }

/* Email Login Form (Collapsible) */
.email-login-form {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 16px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ========================================
   OAUTH BUTTON STYLES
   ======================================== */

/* OAuth Form */
.oauth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Base OAuth Button */
.oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

    .oauth-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .oauth-btn:active {
        transform: translateY(0);
    }

/* OAuth Button Icon */
.oauth-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.oauth-btn span {
    flex: 1;
}

/* Microsoft Button */
.oauth-btn-microsoft {
    border-color: #2f2f2f;
}

    .oauth-btn-microsoft:hover {
        background: #f8f9fa;
        border-color: #1a1a1a;
    }

/* Google Button */
.oauth-btn-google {
    border-color: #dadce0;
}

    .oauth-btn-google:hover {
        background: #f8f9fa;
        border-color: #4285f4;
    }

/* Default OAuth Button (for other providers) */
.oauth-btn-default {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

    .oauth-btn-default:hover {
        background: linear-gradient(135deg, #5a67d8 0%, #6a3f91 100%);
    }


/* ========================================
   MOBILE RESPONSIVE - LOGIN
   ======================================== */

@media (max-width: 576px) {
    .login-card {
        padding: 32px 24px;
    }

    .oauth-btn {
        font-size: 15px;
        padding: 12px 16px;
    }
}


/* ========================================
   CALENDAR EDITOR STYLES
   ======================================== */

/* Sticky Header - Never Scrolls Horizontally */
.calendar-sticky-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: white;
    border-bottom: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
    margin-bottom: 1rem;
    /* Critical: Prevent horizontal scrolling */
    width: 100%;
    overflow-x: hidden;
}

    .calendar-sticky-header .container-fluid {
        max-width: 100%;
        overflow-x: hidden;
    }

/* Calendar Wrapper - Force Scrollbar to Show */
.calendar-wrapper {
    overflow-x: scroll !important; /* Force horizontal scroll */
    overflow-y: visible;
    width: 100%;
    margin-bottom: 20px;
    position: relative;
    /* Force browser to show scrollbar track */
    padding-bottom: 20px;
}

.calendar-content {
    min-width: 1200px; /* Forces content wider than most screens */
    display: block;
    width: fit-content;
}

/* Scroll Hint - Shows on narrow screens */
.scroll-hint {
    display: none; /* Always show for now until we verify scrollbar works */
    background: #ffc107;
    border: 3px solid #ff9800;
    border-radius: 8px;
    padding: 15px 20px;
    text-align: center;
    color: #000;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* Force Visible Scrollbar - Very Prominent */
.calendar-wrapper::-webkit-scrollbar {
    height: 20px !important;
    background: #fff !important;
    border-top: 2px solid #000;
}

.calendar-wrapper::-webkit-scrollbar-track {
    background: #f0f0f0 !important;
    border: 2px solid #000 !important;
    border-radius: 0;
}

.calendar-wrapper::-webkit-scrollbar-thumb {
    background: #000 !important;
    border: 3px solid #f0f0f0 !important;
    border-radius: 0;
    min-width: 50px;
}

    .calendar-wrapper::-webkit-scrollbar-thumb:hover {
        background: #333 !important;
    }

/* Firefox - Force visible scrollbar */
.calendar-wrapper {
    scrollbar-width: auto !important;
    scrollbar-color: #000 #f0f0f0 !important;
}

/* Calendar Table Styling */
.calendar-table {
    font-size: 0.85rem;
    margin-bottom: 0;
}

    .calendar-table th {
        background-color: #f8f9fa;
        font-weight: 600;
        padding: 0.25rem;
        font-size: 0.75rem;
    }

    .calendar-table td {
        padding: 0.25rem;
        height: 80px;
        width: 14.28%;
    }

.calendar-day {
    position: relative;
    transition: background-color 0.2s;
}

    .calendar-day:hover {
        background-color: #e9ecef;
    }

    .calendar-day.empty-cell {
        background-color: #f8f9fa !important;
        cursor: default !important;
        pointer-events: none;
    }

    .calendar-day.has-assignments {
        background-color: #fff3cd;
    }

        .calendar-day.has-assignments:hover {
            background-color: #ffe69c;
        }

    .calendar-day.range-start {
        background-color: #cfe2ff !important;
        border: 2px solid #0d6efd;
    }

        .calendar-day.range-start:hover {
            background-color: #9ec5fe !important;
        }

    .calendar-day .day-number {
        font-weight: 600;
        margin-bottom: 0.25rem;
    }

    .calendar-day .badges {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .calendar-day .badge-sm {
        font-size: 0.65rem;
        padding: 0.15rem 0.3rem;
    }

/* Modal Styling */
.modal.show {
    display: block;
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Vertical Button Group for Actions */
.btn-group-vertical {
    display: flex;
    flex-direction: column;
}

    .btn-group-vertical .btn {
        text-align: left;
        white-space: nowrap;
    }


/* ========================================
   FOOTER STYLES - STICKY AT BOTTOM
   ======================================== */

/* App Footer - Fixed at bottom of viewport, always visible */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 1.5rem 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

/* Footer Links */
.footer-link {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.9rem;
}

    .footer-link:hover {
        color: #1b6ec2;
        text-decoration: underline;
    }

/* Footer Text */
.app-footer .text-muted {
    font-size: 0.9rem;
}

/* Desktop Footer Adjustments - Don't overlay sidebar */
@media (min-width: 641px) {
    .app-footer {
        left: 250px; /* Match sidebar width */
        width: calc(100% - 250px); /* Adjust width to fit remaining space */
    }
}

/* Mobile Footer Adjustments */
@media (max-width: 768px) {
    .app-footer {
        padding: 1rem 0;
    }

    .footer-link {
        font-size: 0.85rem;
        display: inline-block;
        margin: 0.25rem 0;
    }

    .app-footer .text-muted.mx-2 {
        display: none; /* Hide separators on mobile */
    }

    /* Increase bottom padding on mobile for better button access */
    .content {
        padding-bottom: 140px;
    }
}


/* ========================================
   VOTING SESSION MONITOR STYLES
   ======================================== */

/* Voting Session Monitor - Calendar Status Row Highlighting */
.table tbody tr.table-row-finalist td {
    background-color: #d4edda !important;
}

.table tbody tr.table-row-discarded td {
    background-color: #f8d7da !important;
}

.table tbody tr.table-row-finalist:hover td {
    background-color: #c3e6cb !important;
}

.table tbody tr.table-row-discarded:hover td {
    background-color: #f5c6cb !important;
}

/* Extra small buttons for compact action columns */
.btn-xs {
    padding: 0.15rem 0.4rem;
    font-size: 0.75rem;
    line-height: 1.2;
    border-radius: 0.25rem;
}

    .btn-xs i {
        font-size: 0.875rem;
    }


/* ========================================
   GUIDANCE PANEL STYLES
   ======================================== */

/* Guidance Panel Container */
.guidance-panel {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

    .guidance-panel.minimized {
        margin-bottom: 1rem;
    }

/* Guidance Header - Clickable */
.guidance-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    cursor: pointer;
    user-select: none;
    color: white;
}

    .guidance-header:hover {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px 8px 0 0;
    }

.guidance-panel.minimized .guidance-header:hover {
    border-radius: 8px;
}

.guidance-header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .guidance-header-content i {
        font-size: 1.25rem;
    }

.guidance-header .btn-close {
    flex-shrink: 0;
}

/* Guidance Body */
.guidance-body {
    padding: 0 1.25rem 1.25rem;
    color: white;
}

/* Role Info */
.role-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

    .role-info i {
        font-size: 1.25rem;
    }

/* Guidance Steps Container */
.guidance-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Individual Guidance Step */
.guidance-step {
    display: flex;
    gap: 1rem;
    background: white;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s ease;
}

    .guidance-step:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

/* Step Icon */
.step-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

/* Step Content */
.step-content {
    flex: 1;
    min-width: 0;
}

.step-title {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1a202c;
}

.step-description {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #4a5568;
}

/* Step Status Colors */
.step-not-started .step-icon {
    background-color: #e3f2fd;
    color: #1976d2;
}

.step-in-progress .step-icon {
    background-color: #e1f5fe;
    color: #0288d1;
}

.step-completed .step-icon {
    background-color: #e8f5e9;
    color: #388e3c;
}

.step-warning .step-icon {
    background-color: #fff3e0;
    color: #f57c00;
}

.step-action .step-icon {
    background-color: #ffebee;
    color: #c62828;
}

.step-blocked .step-icon {
    background-color: #f5f5f5;
    color: #757575;
}

.step-scheduled .step-icon {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.step-waiting .step-icon {
    background-color: #fafafa;
    color: #9e9e9e;
}

/* Guidance Footer */
.guidance-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

    .guidance-footer i {
        margin-right: 0.25rem;
    }

/* Mobile Responsive */
@media (max-width: 768px) {
    .guidance-panel {
        margin-bottom: 1rem;
    }

    .guidance-header {
        padding: 0.75rem 1rem;
    }

    .guidance-body {
        padding: 0 1rem 1rem;
    }

    .guidance-step {
        flex-direction: column;
        gap: 0.75rem;
    }

    .step-icon {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }

    .step-title {
        font-size: 0.95rem;
    }

    .step-description {
        font-size: 0.85rem;
    }

    .role-info {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }
}

/* ========================================
   FLOATING HELP BUTTON STYLES
   ======================================== */

/* Floating Help Button - Appears when guidance panel is dismissed */
.floating-help-button {
    position: fixed;
    bottom: 80px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
}

    .floating-help-button:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
        background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    }

    .floating-help-button:active {
        transform: translateY(-1px);
    }

    .floating-help-button i {
        font-weight: bold;
    }

/* Mobile Responsive */
@media (max-width: 768px) {
    .floating-help-button {
        width: 48px;
        height: 48px;
        bottom: 20px;
        right: 20px;
        font-size: 1.25rem;
    }
}


/* ========================================
   EMAIL TEMPLATE PREVIEW STYLES
   ======================================== */

/* Email Template Container */
.email-template-preview {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
}

    /* Email Body Styling */
    .email-template-preview .email-body {
        background-color: white;
        border: 1px solid #e9ecef;
        border-radius: 6px;
        padding: 1.5rem;
        margin-top: 1rem;
    }

        .email-template-preview .email-body p {
            margin-bottom: 1rem;
        }

            .email-template-preview .email-body p:last-child {
                margin-bottom: 0;
            }

        .email-template-preview .email-body ul,
        .email-template-preview .email-body ol {
            margin-bottom: 1rem;
            padding-left: 2rem;
        }

        .email-template-preview .email-body li {
            margin-bottom: 0.5rem;
        }

        .email-template-preview .email-body a {
            color: #0066cc;
            text-decoration: none;
            word-break: break-all;
        }

            .email-template-preview .email-body a:hover {
                text-decoration: underline;
            }

        .email-template-preview .email-body strong {
            font-weight: 600;
            color: #1a202c;
        }

        .email-template-preview .email-body em {
            font-style: italic;
            color: #6c757d;
        }

/* Mobile Responsive for Email Template */
@media (max-width: 768px) {
    .email-template-preview {
        padding: 1rem;
    }

        .email-template-preview .email-body {
            padding: 1rem;
        }

            .email-template-preview .email-body ul,
            .email-template-preview .email-body ol {
                padding-left: 1.5rem;
            }
}
/* ========================================
   NAVIGATION MENU COLLAPSE STYLES
   ======================================== */

/* Navigation Section Header - Clickable headers for collapsible sections */
.nav-section-header {
    color: #ffffff;
    font-weight: bold;
    cursor: pointer;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    user-select: none;
    transition: background-color 0.2s ease;
    border-radius: 4px;
}

    .nav-section-header:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

/* Navigation Chevron - The expand/collapse indicator */
.nav-chevron {
    display: inline-block;
    font-size: 0.75rem;
    transition: transform 0.2s ease;
    width: 1rem;
    text-align: center;
}

    .nav-chevron.collapsed {
        transform: rotate(0deg);
    }

/* Navigation Section Content - Collapsible content container */
.nav-section-content {
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 1;
}

    .nav-section-content.collapsed {
        max-height: 0;
        opacity: 0;
        transition: max-height 0.3s ease-in, opacity 0.3s ease-in;
    }

/* Additional indentation for nested items (Academic Years > Periods/Day Types) */
.ps-5 {
    padding-left: 3rem !important;
}

WORKFLOW GRAPHIC STYLES
======================================== */
/* Workflow Container - Main container with border and shadow */
.workflow-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

/* Workflow Header */
.workflow-header {
    text-align: center;
    margin-bottom: 20px;
    color: #495057;
    font-weight: 600;
}

    .workflow-header i {
        margin-right: 8px;
        color: #6c757d;
    }

/* Workflow Steps Container - Horizontal flexbox */
.workflow-steps {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-width: max-content;
    padding: 10px 0;
}

/* Individual Workflow Step */
.workflow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 12px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    min-width: 120px;
    max-width: 140px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

    .workflow-step:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    /* Step Number Badge */
    .workflow-step .step-number {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        background: #6c757d;
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.85rem;
        font-weight: 600;
    }

    /* Step Icon */
    .workflow-step .step-icon {
        font-size: 1.8rem;
        color: #6c757d;
    }

    /* Step Label */
    .workflow-step .step-label {
        font-size: 0.75rem;
        text-align: center;
        color: #495057;
        font-weight: 500;
        line-height: 1.2;
        word-wrap: break-word;
    }

    /* Active Step - Highlighted in blue */
    .workflow-step.active {
        background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
        border-color: #0a58ca;
        box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
    }

        .workflow-step.active .step-number {
            background: white;
            color: #0d6efd;
        }

        .workflow-step.active .step-icon {
            color: white;
        }

        .workflow-step.active .step-label {
            color: white;
            font-weight: 600;
        }

    /* Completed Step - Green checkmark style */
    .workflow-step.completed {
        background: linear-gradient(135deg, #198754 0%, #146c43 100%);
        border-color: #146c43;
    }

        .workflow-step.completed .step-number {
            background: white;
            color: #198754;
        }

        .workflow-step.completed .step-icon {
            color: white;
        }

        .workflow-step.completed .step-label {
            color: white;
        }

/* Workflow Arrow - Connecting arrows between steps */
.workflow-arrow {
    color: #adb5bd;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* Responsive - Stack vertically on very small screens */
@media (max-width: 768px) {
    .workflow-container {
        padding: 15px;
    }

    .workflow-header h6 {
        font-size: 0.9rem;
    }

    .workflow-step {
        min-width: 100px;
        max-width: 120px;
        padding: 12px 8px;
    }

        .workflow-step .step-number {
            width: 24px;
            height: 24px;
            font-size: 0.75rem;
        }

        .workflow-step .step-icon {
            font-size: 1.5rem;
        }

        .workflow-step .step-label {
            font-size: 0.7rem;
        }

    .workflow-arrow {
        font-size: 1.2rem;
    }
}
/* ========================================
   VIDEO MODAL STYLES
   ======================================== */

/* Video Container - Maintains aspect ratio */
.video-container {
    position: relative;
    width: 100%;
    background-color: #000;
}

    .video-container video {
        display: block;
        max-height: 70vh;
        margin: 0 auto;
    }

/* Modal overlay improvements for video */
.modal-xl {
    max-width: 90vw;
}

@media (min-width: 1200px) {
    .modal-xl {
        max-width: 1140px;
    }
}

/* Ensure video controls are visible */
video::-webkit-media-controls {
    visibility: visible !important;
}

video::-webkit-media-controls-enclosure {
    visibility: visible !important;
}

/* ========================================
   MOBILE ADMIN DASHBOARD STYLES
   ======================================== */

/* Main Container - Full viewport mobile-first */
.mobile-admin-container {
    min-height: 100vh;
    background: #f5f7fa;
    padding-bottom: env(safe-area-inset-bottom, 20px);
}

/* Authentication Gate */
.auth-gate {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    max-width: 340px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.auth-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 20px;
}

.auth-card h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #1a202c;
}

/* PIN Display */
.pin-display {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.pin-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #cbd5e0;
    background: white;
    transition: all 0.2s ease;
}

    .pin-dot.filled {
        background: #667eea;
        border-color: #667eea;
    }

/* PIN Pad */
.pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 280px;
    margin: 0 auto;
}

.pin-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: white;
    font-size: 1.5rem;
    font-weight: 500;
    color: #1a202c;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

    .pin-btn:hover {
        background: #f7fafc;
        transform: scale(1.05);
    }

    .pin-btn:active {
        background: #e2e8f0;
        transform: scale(0.95);
    }

.pin-btn-icon {
    font-size: 1.3rem;
    color: #667eea;
}

/* Mobile Header */
.mobile-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    padding-top: max(20px, env(safe-area-inset-top));
}

    .mobile-header h1 {
        font-size: 1.5rem;
        margin: 0;
        font-weight: 600;
    }

/* Tab Navigation */
.mobile-tabs {
    display: flex;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.tab-btn {
    flex: 1;
    padding: 15px 10px;
    border: none;
    background: none;
    font-size: 0.85rem;
    color: #718096;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

    .tab-btn i {
        font-size: 1.2rem;
    }

    .tab-btn.active {
        color: #667eea;
        border-bottom-color: #667eea;
        background: rgba(102, 126, 234, 0.05);
    }

/* Mobile Content */
.mobile-content {
    padding: 15px;
}

/* Stats Grid */
.stats-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Stat Cards */
.stat-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.stat-card-header {
    padding: 12px 15px;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-card-primary .stat-card-header {
    background: #667eea;
}

.stat-card-success .stat-card-header {
    background: #48bb78;
}

.stat-card-info .stat-card-header {
    background: #4299e1;
}

.stat-card-warning .stat-card-header {
    background: #ed8936;
}

.stat-card-secondary .stat-card-header {
    background: #718096;
}

.stat-card-body {
    padding: 12px 15px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

    .stat-row:last-child {
        border-bottom: none;
    }

.stat-value {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Organization Cards */
.subscription-section h3 {
    font-size: 1rem;
    color: #4a5568;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.org-card {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 4px solid #667eea;
}

    .org-card:hover {
        transform: translateX(5px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

.org-card-expired {
    border-left-color: #e53e3e;
    opacity: 0.85;
}

.org-name {
    font-weight: 600;
    font-size: 1rem;
    color: #1a202c;
}

.org-domain {
    font-size: 0.8rem;
    color: #718096;
}

.org-card-status {
    text-align: right;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 30px 20px;
    color: #a0aec0;
}

    .empty-state i {
        font-size: 2.5rem;
        margin-bottom: 10px;
        display: block;
    }

/* Search Box */
.search-box {
    position: relative;
}

    .search-box i {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        color: #a0aec0;
    }

    .search-box input {
        padding-left: 45px;
        border-radius: 10px;
        border: 1px solid #e2e8f0;
        height: 50px;
        font-size: 1rem;
    }

        .search-box input:focus {
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
        }

/* Selected Organization Card */
.selected-org-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #667eea;
}

    .selected-org-card h4 {
        margin: 0 0 5px 0;
        font-size: 1.2rem;
    }

.subscription-info {
    background: #f7fafc;
    padding: 12px;
    border-radius: 8px;
}

/* Quick Extend Grid */
.quick-extend-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.quick-extend-btn {
    padding: 15px 10px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

    .quick-extend-btn:hover {
        border-color: #667eea;
        background: rgba(102, 126, 234, 0.05);
    }

    .quick-extend-btn:active {
        transform: scale(0.95);
    }

    .quick-extend-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.quick-extend-btn-primary {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

    .quick-extend-btn-primary:hover {
        background: #5a67d8;
    }

.extend-days {
    font-size: 1.3rem;
    font-weight: 700;
}

.extend-label {
    font-size: 0.7rem;
    color: #718096;
}

.quick-extend-btn-primary .extend-label {
    color: rgba(255, 255, 255, 0.8);
}

/* Custom Date Section */
.custom-date-section {
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

    .custom-date-section input[type="date"] {
        border-radius: 8px;
        height: 45px;
    }

/* Loading Container */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #718096;
}

/* Spin animation for refresh icon */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.spin {
    animation: spin 1s linear infinite;
}

/* Search Results */
.search-results {
    max-height: 400px;
    overflow-y: auto;
}

/* Mobile-specific adjustments */
@media (max-width: 400px) {
    .pin-btn {
        width: 60px;
        height: 60px;
        font-size: 1.3rem;
    }

    .quick-extend-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .extend-days {
        font-size: 1.1rem;
    }
}

/* Larger screens - still mobile optimized but better spacing */
@media (min-width: 500px) {
    .mobile-content {
        max-width: 500px;
        margin: 0 auto;
    }

    .auth-card {
        padding: 50px 40px;
    }

    .stats-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   Mobile Admin - Additional Styles (Phase 2)
   Add these to your existing app.css
   ============================================ */

/* Tab badge for alerts */
.tab-btn {
    position: relative;
}

.tab-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: #dc3545;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Alerts Banner */
.alerts-banner {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    border-left: 4px solid #ffc107;
}

    .alerts-banner h5 {
        margin: 0 0 10px 0;
        font-size: 14px;
        font-weight: 600;
    }

.alert-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: transform 0.15s;
}

    .alert-item:active {
        transform: scale(0.98);
    }

    .alert-item i {
        font-size: 16px;
    }

.alert-item-danger {
    border-left: 3px solid #dc3545;
}

    .alert-item-danger i {
        color: #dc3545;
    }

.alert-item-warning {
    border-left: 3px solid #ffc107;
}

    .alert-item-warning i {
        color: #856404;
    }

.alert-item-info {
    border-left: 3px solid #17a2b8;
}

    .alert-item-info i {
        color: #17a2b8;
    }

/* Activity Section */
.activity-section {
    padding: 0 4px;
}

    .activity-section h3 {
        font-size: 16px;
        font-weight: 600;
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e7f1ff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .activity-icon i {
        color: #0d6efd;
        font-size: 16px;
    }

    .activity-icon.bg-warning {
        background: #fff3cd;
    }

        .activity-icon.bg-warning i {
            color: #856404;
        }

.activity-details {
    flex: 1;
    min-width: 0;
}

.activity-user {
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-meta {
    font-size: 12px;
    margin-top: 2px;
}

.activity-time {
    font-size: 12px;
    color: #6c757d;
    white-space: nowrap;
}

/* Actions Section */
.actions-section {
    padding: 0 4px;
}

.action-card {
    background: white;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

    .action-card h4 {
        font-size: 15px;
        font-weight: 600;
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

        .action-card h4 i {
            color: #0d6efd;
        }

/* User Search Results */
.user-search-results {
    max-height: 200px;
    overflow-y: auto;
}

.user-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

    .user-result-item:last-child {
        border-bottom: none;
    }

.user-info {
    flex: 1;
    min-width: 0;
}

.user-email {
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Failed Emails List */
.failed-emails-list {
    max-height: 300px;
    overflow-y: auto;
}

.failed-email-item {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

    .failed-email-item:last-child {
        border-bottom: none;
    }

.email-to {
    font-weight: 500;
    font-size: 14px;
}

.email-subject {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-error {
    font-size: 11px;
    margin-top: 4px;
}

/* Search Box Enhancement */
.search-box {
    position: relative;
}

    .search-box i {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: #6c757d;
        z-index: 1;
    }

    .search-box input {
        padding-left: 38px;
    }

/* Spin animation for refresh button */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.spin {
    animation: spin 1s linear infinite;
}

/* Empty state styling */
.empty-state {
    text-align: center;
    padding: 30px 20px;
    color: #6c757d;
}

    .empty-state i {
        font-size: 40px;
        margin-bottom: 10px;
        opacity: 0.5;
    }

    .empty-state p {
        margin: 0;
        font-size: 14px;
    }
