:root {
    --primary: #374151;
    --primary-dark: #1f2937;
    --primary-light: #6b7280;
    --secondary: #4b5563;
    --success: #059669;
    --danger: #dc2626;
    --warning: #d97706;
    --info: #0284c7;
    --bg: #f9fafb;
    --surface: #ffffff;
    --text: #111827;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.2s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}


.nav-menu {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    background: var(--bg);
    color: var(--text);
    transform: translateY(-1px);
}

.nav-link.active {
    background: var(--primary);
    color: white;
}

.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
}

.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

.card {
    background: var(--surface);
    border-radius: 16px;
    padding: 28px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0;
}

.filters-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 28px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
}

.filter-select {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 0.9375rem;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.filter-select:hover {
    border-color: var(--primary-light);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(55, 65, 81, 0.1);
}

.table-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 28px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.table-card:hover {
    box-shadow: var(--shadow-lg);
}

.table-wrapper {
    overflow-x: auto;
}

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

thead {
    background: var(--bg);
}

th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border);
}

td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9375rem;
}

tbody tr {
    transition: var(--transition);
}

tbody tr:hover {
    background: var(--bg);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.badge-vacation {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.badge-sick {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.no-data {
    text-align: center;
    padding: 48px;
    color: var(--text-muted);
    font-style: italic;
}

.tabs-container {
    margin-bottom: 24px;
}

.tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid var(--border);
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
    position: relative;
}

.tab-btn:hover {
    color: var(--text);
    background: var(--bg);
    transform: translateY(-2px);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.tab-btn.active::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field.full-width {
    grid-column: 1 / -1;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-input {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 0.9375rem;
    background: var(--surface);
    color: var(--text);
    transition: var(--transition);
    font-family: inherit;
}

.form-input:hover {
    border-color: var(--primary-light);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(55, 65, 81, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-primary:active {
    background: var(--primary-dark);
}

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

.btn-danger:hover {
    background: #b91c1c;
}

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

.btn-edit:hover {
    background: #047857;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8125rem;
}

.edit-form {
    background: var(--bg);
    padding: 16px;
    border-radius: 8px;
    margin-top: 12px;
    border: 1px solid var(--border);
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 16px;
        flex-wrap: wrap;
        height: auto;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .nav-menu {
        width: 100%;
        margin-top: 12px;
    }

    .main-content {
        padding: 24px 16px;
    }

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

    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    table {
        font-size: 0.875rem;
    }

    th, td {
        padding: 8px;
    }
}

.ot-link,
.days-link {
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}

.ot-link:hover,
.days-link:hover {
    background: rgba(55, 65, 81, 0.1);
    text-decoration: none;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

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

.modal-content {
    background-color: white;
    margin: auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 1000px;
    max-height: 80vh;
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
    animation: slideUpModal 0.3s ease-out;
}

@keyframes slideUpModal {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-color);
    font-weight: 600;
}

.modal-close {
    color: var(--text-muted);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.modal-close:hover {
    color: var(--text);
    background: var(--bg);
    transform: rotate(90deg);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    background-color: white;
    color: var(--text-color);
}

.ot-details-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background-color: white;
}

.ot-details-table thead {
    background-color: var(--background-light);
}

.ot-details-table th {
    padding: 12px;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
    background-color: var(--background-light);
}

.ot-details-table th.text-left {
    text-align: left;
}

.ot-details-table th.text-right {
    text-align: right;
}

.ot-details-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    background-color: white;
}

.ot-details-table tbody tr:hover {
    background-color: var(--background-light);
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .modal-header {
        padding: 15px;
    }

    .modal-body {
        padding: 15px;
    }

    .ot-details-table th,
    .ot-details-table td {
        padding: 8px;
        font-size: 0.875rem;
    }
}
