@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #475569;
    --success: #059669;
    --danger: #dc2626;
    --warning: #d97706;
    --light: #f8fafc;
    --dark: #0f172a;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --border: #e2e8f0;
    --shadow: rgba(0, 0, 0, 0.08);
    --shadow-md: rgba(0, 0, 0, 0.12);
    --shadow-lg: rgba(0, 0, 0, 0.16);
    --radius: 10px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--dark);
    line-height: 1.6;
    letter-spacing: -0.01em;
}

/* Navigation */
.navbar {
    background: white;
    box-shadow: 0 1px 3px var(--shadow), 0 2px 12px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.02em;
}

.logo {
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.brand-name {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--dark);
    border-radius: 3px;
    transition: var(--transition);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    color: var(--secondary);
    font-weight: 500;
    border-radius: var(--radius);
    transition: var(--transition);
}

.nav-menu a:hover {
    background: var(--light);
    color: var(--primary);
}

.nav-menu a.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.nav-icon {
    font-size: 1.25rem;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 2rem 2.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.page-header h1 {
    font-size: 2.5rem;
    color: white;
    font-weight: 800;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.03em;
    margin: 0;
}

/* Cards */
.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px var(--shadow), 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(226, 232, 240, 0.6);
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 4px 6px var(--shadow-md), 0 8px 24px rgba(0, 0, 0, 0.08);
}

.card h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(71, 85, 105, 0.25);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.625rem;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9375rem;
    letter-spacing: -0.01em;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
    background: #f8fafc;
}

.form-control:hover {
    border-color: #cbd5e1;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    background: white;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.form-help {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: linear-gradient(to bottom, #f8fafc 0%, #f1f5f9 100%);
}

.data-table th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border);
}

.data-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9375rem;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: linear-gradient(to right, #f8fafc 0%, #ffffff 100%);
    box-shadow: inset 3px 0 0 var(--primary);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.total-row {
    background: linear-gradient(to right, #eff6ff 0%, #dbeafe 100%);
    font-weight: 700;
}

.total-row td {
    border-top: 3px solid var(--primary);
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
    color: var(--primary-dark);
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(to right, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-left: 4px solid var(--success);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.15);
}

.alert-error {
    background: linear-gradient(to right, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border-left: 4px solid var(--danger);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.15);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid var(--border);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray);
    transition: var(--transition);
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    background: var(--light);
    color: var(--dark);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: var(--gray);
}

/* Settings */
.settings-section {
    margin-bottom: 2rem;
}

.settings-section h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.text-muted {
    color: var(--gray);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.summary-item {
    padding: 1.5rem;
    background: var(--light);
    border-radius: var(--radius);
    text-align: center;
}

.summary-label {
    font-size: 0.875rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.summary-value {
    font-size: 1.875rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

/* Report Filter */
.report-filter .form-row {
    align-items: end;
}

/* Callout Details in Modal */
.callout-item {
    padding: 1.5rem;
    background: linear-gradient(to bottom right, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary);
    box-shadow: 0 1px 3px var(--shadow);
    transition: var(--transition);
}

.callout-item:hover {
    box-shadow: 0 4px 6px var(--shadow-md);
    transform: translateX(2px);
}

.callout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.callout-date {
    font-weight: 600;
    color: var(--primary);
    font-size: 1.125rem;
}

.callout-hours {
    background: var(--primary);
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
}

.callout-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.75rem;
    color: var(--gray);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.detail-value {
    font-weight: 600;
    color: var(--dark);
}

.callout-work {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.callout-work h4 {
    font-size: 0.875rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.callout-work p {
    color: var(--dark);
    line-height: 1.6;
}

.callout-totals {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    color: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-top: 1.5rem;
    box-shadow: 0 4px 6px var(--shadow-md), 0 8px 20px rgba(37, 99, 235, 0.3);
}

.totals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.total-item {
    text-align: center;
}

.total-label {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.total-value {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: white;
    font-size: 0.875rem;
    opacity: 0.8;
    margin-top: 4rem;
}

.footer a {
    color: white;
    text-decoration: underline;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    background: var(--primary);
    color: white;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success {
    background: var(--success);
}

.badge-warning {
    background: var(--warning);
}

.badge-danger {
    background: var(--danger);
}

/* Stats Card Enhancement */
.stats-card {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 3px var(--shadow);
}

/* Utilities */
.text-center {
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 8px var(--shadow);
        display: none;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu a {
        width: 100%;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    .card {
        padding: 1.5rem;
    }

    .data-table {
        font-size: 0.875rem;
    }

    .data-table thead {
        display: none;
    }

    .data-table tr {
        display: block;
        margin-bottom: 1rem;
        border: 2px solid var(--border);
        border-radius: var(--radius);
        overflow: hidden;
    }

    .data-table td {
        display: flex;
        justify-content: space-between;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--border);
    }

    .data-table td:last-child {
        border-bottom: none;
    }

    .data-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--gray);
    }

    .action-buttons {
        width: 100%;
        justify-content: flex-end;
    }

    .modal-content {
        max-height: 95vh;
    }

    .modal-body {
        padding: 1rem;
    }

    .callout-details {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
    }
}
