/* Custom Font - Rabar */

@font-face {
    font-family: 'Rabar';
    src: url('fonts/Rabar_022.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}


/* Global Styles */

* {
    font-family: 'Rabar', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    font-family: 'Rabar', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}


/* Modern Select Styles - Incomplete Weeks in Red */
.modern-select option {
    color: #1f2937; /* Default dark gray */
    font-weight: normal;
}

.modern-select option[style*="color: #dc2626"] {
    color: #dc2626 !important; /* Red for incomplete weeks */
    font-weight: bold !important;
}

/* Modern Card Styles */

.modern-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.modern-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}


/* Modern Button Styles */

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary {
    background: white;
    color: #667eea;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #667eea;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.4);
}

.btn-outline {
    background: transparent;
    color: #667eea;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #667eea;
    cursor: pointer;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-delete {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 4px -1px rgba(239, 68, 68, 0.2);
}

.btn-delete:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.3);
}

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


/* Modern Input Styles */

.modern-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-family: 'Rabar', sans-serif;
    font-size: 1rem;
}

.modern-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modern-input:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
}


/* Modern Select Styles */

.modern-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-family: 'Rabar', sans-serif;
    font-size: 1rem;
    background: white;
}

.modern-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}


/* Modern Textarea Styles */

.modern-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-family: 'Rabar', sans-serif;
    font-size: 1rem;
    resize: vertical;
}

.modern-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}


/* Modern Badge Styles */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}


/* Priority badge colors */

.priority-1 {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.priority-2 {
    background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
    color: #9a3412;
}

.priority-3 {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #854d0e;
}

.priority-4 {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

.priority-5 {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}


/* Status badge colors */

.status-active {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.status-inactive {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #374151;
}


/* Outcome badge colors */

.outcome-positive {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.outcome-neutral {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #374151;
}

.outcome-negative {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}


/* Modern Modal Styles */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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


/* Modern Table Styles */

.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.modern-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modern-table thead th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.modern-table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #e5e7eb;
}

.modern-table tbody tr:hover {
    background: #f9fafb;
    transform: scale(1.01);
}

.modern-table tbody td {
    padding: 1rem;
}


/* Modern Navigation Styles */

.modern-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.modern-nav-item {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
    cursor: pointer;
}

.modern-nav-item:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.modern-nav-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(102, 126, 234, 0.3);
}


/* Login Card */

.login-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 3rem;
    max-width: 28rem;
    width: 100%;
    animation: slideUp 0.5s ease;
}


/* Header Styles */

.modern-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}


/* Filter Card */

.filter-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}


/* Custom Scrollbar */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}


/* Animations */

.fade-enter-active,
.fade-leave-active {
    transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
    opacity: 0;
}

.slide-enter-active,
.slide-leave-active {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.slide-enter-from {
    transform: translateX(20px);
    opacity: 0;
}

.slide-leave-to {
    transform: translateX(-20px);
    opacity: 0;
}


/* Loading Spinner */

.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

.spinner-small {
    display: inline-block;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

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

/* Mobile attendance calendar: force 7-column grid so it doesn't stack vertically */
.attendance-calendar-mobile {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    width: 100%;
}
.attendance-calendar-mobile > * {
    min-width: 0;
}

/* Empty State */

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

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


/* Mobile Navigation */

.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.mobile-nav-toggle:hover {
    background: rgba(102, 126, 234, 0.1);
}

.mobile-nav-toggle:active {
    background: rgba(102, 126, 234, 0.2);
}

.mobile-nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(31, 41, 55, 0.98) !important;
    backdrop-filter: blur(10px);
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 50;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-top: 0.5rem;
    border-radius: 0 0 12px 12px;
}

.mobile-nav-item {
    display: block;
    padding: 0.75rem 1rem;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    background: rgba(102, 126, 234, 0.2);
}

.mobile-nav-item:active {
    background: rgba(102, 126, 234, 0.3);
}


/* Slide down animation for mobile menu */

.slide-down-enter-active,
.slide-down-leave-active {
    transition: all 0.3s ease;
    max-height: 500px;
    opacity: 1;
}

.slide-down-enter-from,
.slide-down-leave-to {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}


/* Responsive Tables */

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}


/* Responsive */

@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        border: 2px solid #667eea !important;
        color: #667eea !important;
        background: transparent !important;
    }
    .modern-nav {
        position: relative;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(10px) !important;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
    }
    .modern-nav>div {
        position: relative;
        background: transparent !important;
    }
    .login-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    .modern-header {
        padding: 0 1rem;
    }
    .modern-header h1 {
        font-size: 1.25rem;
    }
    .modern-header .w-10 {
        width: 2rem;
        height: 2rem;
    }
    .modern-header .text-xl {
        font-size: 1rem;
    }
    .filter-card {
        padding: 1rem;
    }
    .filter-card .grid {
        grid-template-columns: 1fr !important;
    }
    .modern-card {
        padding: 1rem;
    }
    .modal-content {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
        max-height: calc(100vh - 2rem);
        padding: 1.5rem;
    }
    .modern-table {
        font-size: 0.875rem;
    }
    .modern-table thead th,
    .modern-table tbody td {
        padding: 0.75rem 0.5rem;
    }
    .btn-primary,
    .btn-secondary,
    .btn-success,
    .btn-danger,
    .btn-delete {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    .btn-outline {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
    .btn-delete {
        padding: 0.5rem 0.875rem;
        font-size: 0.75rem;
    }
    .grid {
        grid-template-columns: 1fr !important;
    }
    .grid.grid-cols-2 {
        grid-template-columns: 1fr !important;
    }
    .grid.grid-cols-3 {
        grid-template-columns: 1fr !important;
    }
    .grid.grid-cols-4 {
        grid-template-columns: 1fr !important;
    }
    .flex.flex-wrap {
        flex-direction: column;
    }
    .flex.flex-wrap>* {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    .flex.flex-wrap>*:last-child {
        margin-bottom: 0;
    }
    h1,
    h2,
    h3 {
        word-break: break-word;
    }
    .text-3xl {
        font-size: 1.5rem;
    }
    .text-2xl {
        font-size: 1.25rem;
    }
    .text-xl {
        font-size: 1.125rem;
    }
    .space-x-2>*+* {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    .space-x-4>*+* {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    main {
        padding: 1rem;
    }
    .mb-6 {
        margin-bottom: 1rem;
    }
    .gap-4 {
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem 1rem;
    }
    .modal-content {
        padding: 1rem;
        border-radius: 12px;
    }
    .modern-card {
        padding: 0.75rem;
    }
    .badge {
        font-size: 0.625rem;
        padding: 0.25rem 0.5rem;
    }
}