/*
 * OrgShine - Organization Exercise Verification System
 * Custom Styles
 *
 * Color Scheme: INSEAD Colors
 * Primary Blue: #003E7E
 * Gray: #58595B
 * White: #FFFFFF
 */

:root {
    --insead-blue: #003E7E;
    --insead-blue-dark: #002d5c;
    --insead-gray: #58595B;
    --insead-gray-light: #f8f9fa;
}

/* Global Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navbar */
.bg-insead {
    background-color: var(--insead-blue) !important;
}

.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

/* Buttons */
.btn-insead {
    background-color: var(--insead-blue);
    border-color: var(--insead-blue);
    color: white;
}

.btn-insead:hover,
.btn-insead:focus {
    background-color: var(--insead-blue-dark);
    border-color: var(--insead-blue-dark);
    color: white;
}

.btn-insead-outline {
    background-color: transparent;
    border-color: var(--insead-blue);
    color: var(--insead-blue);
}

.btn-insead-outline:hover {
    background-color: var(--insead-blue);
    color: white;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border-radius: 0.5rem;
}

.card-header {
    background-color: var(--insead-gray-light);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

/* Status Badges */
.badge-status-setup {
    background-color: #6c757d;
}

.badge-status-active {
    background-color: #198754;
}

.badge-status-completed {
    background-color: var(--insead-blue);
}

/* Progress Indicators */
.progress-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.progress-circle-pending {
    background-color: #ffc107;
    color: #000;
}

.progress-circle-approved {
    background-color: #198754;
    color: white;
}

.progress-circle-rejected {
    background-color: #dc3545;
    color: white;
}

/* Timer Display */
.timer-display {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 2rem;
    font-weight: bold;
    color: var(--insead-blue);
    background-color: var(--insead-gray-light);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    display: inline-block;
}

/* Group Cards */
.group-card {
    transition: all 0.2s ease;
}

.group-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.group-card .access-code {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 2px;
}

/* Task Progress */
.task-indicator {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0.25rem;
}

.task-indicator-completed {
    background-color: #198754;
    color: white;
}

.task-indicator-current {
    background-color: #ffc107;
    color: #000;
    animation: pulse 2s infinite;
}

.task-indicator-pending {
    background-color: #e9ecef;
    color: #6c757d;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Mobile-First Styles for GM Portal */
.gm-portal {
    background-color: var(--insead-gray-light);
    min-height: 100vh;
}

.gm-header {
    background-color: var(--insead-blue);
    color: white;
    padding: 1rem;
    text-align: center;
}

.gm-task-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin: 1rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.gm-upload-area {
    border: 3px dashed #dee2e6;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gm-upload-area:hover,
.gm-upload-area.dragover {
    border-color: var(--insead-blue);
    background-color: rgba(0, 62, 126, 0.05);
}

.gm-upload-area input[type="file"] {
    display: none;
}

.gm-upload-icon {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

/* Large Touch Targets for Mobile */
.btn-mobile {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 0.5rem;
    min-height: 56px;
}

/* Role Assignment Grid */
.role-grid {
    display: grid;
    gap: 1rem;
}

.role-item {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid #dee2e6;
}

.role-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.role-badge-gm { background-color: #dc3545; color: white; }
.role-badge-rm { background-color: #fd7e14; color: white; }
.role-badge-sm { background-color: #198754; color: white; }
.role-badge-pm { background-color: #0d6efd; color: white; }
.role-badge-observer { background-color: #6f42c1; color: white; }
.role-badge-absent { background-color: #6c757d; color: white; }

/* Admin Dashboard */
.admin-sidebar {
    background-color: var(--insead-gray-light);
    min-height: calc(100vh - 56px);
    padding: 1rem;
}

.pending-review-card {
    border-left: 4px solid #ffc107;
}

.pending-review-card.ai-approved {
    border-left-color: #198754;
}

.pending-review-card.ai-rejected {
    border-left-color: #dc3545;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Access Code Input */
.access-code-input {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 0.5rem;
    text-transform: uppercase;
    padding: 1rem;
}

/* Status Indicators */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.status-dot-active {
    background-color: #198754;
    animation: blink 1s infinite;
}

.status-dot-inactive {
    background-color: #6c757d;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Confidence Meter */
.confidence-meter {
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
    overflow: hidden;
}

.confidence-meter-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.confidence-high { background-color: #198754; }
.confidence-medium { background-color: #ffc107; }
.confidence-low { background-color: #dc3545; }

/* Verification Status Banner */
.verification-banner {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.verification-banner-pending {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

.verification-banner-approved {
    background-color: #d1e7dd;
    border: 1px solid #198754;
    color: #0f5132;
}

.verification-banner-rejected {
    background-color: #f8d7da;
    border: 1px solid #dc3545;
    color: #842029;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .timer-display {
        font-size: 1.5rem;
    }

    .task-indicator {
        width: 35px;
        height: 35px;
        font-size: 0.875rem;
    }

    .gm-task-card {
        margin: 0.5rem;
        padding: 1rem;
    }

    .access-code-input {
        font-size: 1.25rem;
        letter-spacing: 0.3rem;
    }
}

/* Print Styles for Access Codes */
@media print {
    .no-print {
        display: none !important;
    }

    .access-code-print {
        page-break-inside: avoid;
        border: 2px solid #000;
        padding: 1rem;
        margin: 0.5rem;
        text-align: center;
    }

    .access-code-print .code {
        font-size: 2rem;
        font-weight: bold;
        letter-spacing: 0.5rem;
    }
}

/* Table Styles */
.table-hover tbody tr:hover {
    background-color: rgba(0, 62, 126, 0.05);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--insead-gray);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Extra Small Button */
.btn-xs {
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.2rem;
}

/* Access Code in Table */
.access-code {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-weight: bold;
    letter-spacing: 1px;
}
