/* Custom styles for Online Timesheet System */
:root {
  --brand-50: #f0f9ff;
  --brand-100: #e0f2fe;
  --brand-200: #bae6fd;
  --brand-300: #7dd3fc;
  --brand-400: #38bdf8;
  --brand-500: #5BC2E7;
  --brand-600: #0ea5e9;
  --brand-700: #0284c7;
  --brand-800: #0369a1;
  --brand-900: #075985;
  --brand-primary: #5BC2E7;
  --brand-secondary: #2C2A29;
  --brand-accent: #F2A900;
}

body {
    background: #f8fafc;
    color: #0f172a;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

.card {
    border: none;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    box-shadow: 0 24px 48px -24px rgba(15, 23, 42, 0.28);
}

.btn {
    border-radius: 14px;
    font-weight: 600;
    padding: 0.55rem 1.1rem;
}

.table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 28px -18px rgba(15, 23, 42, 0.25);
}

.table thead th {
    background: #f8fafc;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748b;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.table tbody tr:hover {
    background: rgba(91, 194, 231, 0.05);
}

.badge {
    border-radius: 9999px;
    padding: 0.35rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.form-control,
.form-select {
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    padding: 0.65rem 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(91, 194, 231, 0.55);
    box-shadow: 0 0 0 3px rgba(91, 194, 231, 0.18);
}

.modal-content {
    border-radius: 26px;
    border: none;
    box-shadow: 0 28px 60px -25px rgba(15, 23, 42, 0.35);
}

.modal-header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.alert {
    border-radius: 18px;
}

.stats-card {
    border-radius: 24px;
    padding: 22px;
    background: linear-gradient(135deg, rgba(91, 194, 231, 0.92), rgba(0, 165, 233, 0.88));
    color: #ffffff;
    box-shadow: 0 28px 56px -30px rgba(91, 194, 231, 0.55);
}

.stats-card .card-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.stats-card .card-text {
    font-size: 0.9rem;
    opacity: 0.85;
}

/* Form styles */
.form-control:focus {
    border-color: #5BC2E7;
    box-shadow: 0 0 0 0.2rem rgba(91, 194, 231, 0.25);
}

.form-select:focus {
    border-color: #5BC2E7;
    box-shadow: 0 0 0 0.2rem rgba(91, 194, 231, 0.25);
}

/* Alert styles */
.alert {
    border-radius: 8px;
    border: none;
}

/* Table styles */
.table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
}

.table-hover tbody tr:hover {
    background-color: rgba(91, 194, 231, 0.05);
}

/* Badge styles */
.badge {
    font-size: 0.75em;
}

/* Modal styles */
.modal-content {
    border-radius: 10px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    border-radius: 10px 10px 0 0;
}

/* Button group styles */
.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-radius: 6px 0 0 6px;
}

.btn-group .btn:last-child {
    border-radius: 0 6px 6px 0;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.1rem;
    }

    .stats-card .card-title {
        font-size: 1.5rem;
    }

    .calendar-cell {
        min-height: 60px;
        padding: 5px;
    }

    .calendar-date {
        font-size: 11px;
    }

    .calendar-event {
        font-size: 9px;
    }

    .btn-group {
        display: flex;
        flex-direction: column;
    }

    .btn-group .btn {
        border-radius: 6px !important;
        margin-bottom: 2px;
    }
}

/* Utility classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075) !important;
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15) !important;
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0,0,0,0.175) !important;
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Employee status table uniform column widths */
.employee-status-table th,
.employee-status-table td {
    width: 25%;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.employee-status-table th:nth-child(1),
.employee-status-table td:nth-child(1) {
    width: 30%;
}

.employee-status-table th:nth-child(2),
.employee-status-table td:nth-child(2) {
    width: 25%;
}

.employee-status-table th:nth-child(3),
.employee-status-table td:nth-child(3) {
    width: 20%;
}

.employee-status-table th:nth-child(4),
.employee-status-table td:nth-child(4) {
    width: 25%;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }

    body {
        background: white;
    }
}

.calendar-grid-wrapper {
    overflow-x: auto;
    scrollbar-width: thin;
    padding-bottom: 0.75rem;
}

.calendar-grid-wrapper::-webkit-scrollbar {
    height: 6px;
}

.calendar-grid-wrapper::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.4);
    border-radius: 9999px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1rem;
    width: 100%;
}

.calendar-header {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748b;
    padding-bottom: 0.25rem;
}

@media (max-width: 640px) {
    .calendar-grid-wrapper {
        overflow-x: auto;
        padding-bottom: 0.75rem;
    }

    .calendar-grid {
        display: grid;
        grid-auto-flow: column;
        grid-template-rows: repeat(7, minmax(0, 1fr));
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 0.75rem;
        width: max-content;
    }

    .calendar-header {
        text-align: left;
        padding-left: 0.75rem;
        font-size: 0.68rem;
    }

    .calendar-cell {
        min-width: 160px;
        width: 160px;
        height: 140px;
    }
}
