/**
 * EVIDIO — Profesionalni Sistem za Upravljanje Radnom Snagom
 * Main Stylesheet - Mobile-first design with Sidebar
 * Palette: Steel (#2D3748) + Petrol (#0694A2) + Signal Orange (#E8590C)
 * Theme switch: edit /css/themes/current-theme.css (loaded via luxury-theme.css)
 */

:root {
    --primary-color: #0694A2;
    --primary-dark: #047481;
    --primary-light: #E0F7FA;
    --secondary-color: #2D3748;
    --accent-color: #047481;
    --background: #F7FAFC;
    --white: #FFFFFF;
    --text-dark: #2D3748;
    --text-light: #718096;
    --border-color: #EDF2F7;
    --success-color: #38A169;
    --error-color: #E53E3E;
    --warning-color: #D69E2E;
    --info-color: #3182CE;
    --signal-orange: #E8590C;
    
    --touch-target: 44px;
    --border-radius: 8px;
    --shadow: 0 2px 4px rgba(45,55,72,0.08);
    --shadow-lg: 0 4px 12px rgba(45,55,72,0.12);
    --sidebar-width: 260px;
}

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

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

body {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--white);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: var(--secondary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.sidebar-logo {
    display: block;
    text-decoration: none;
    flex: 1;
    min-width: 0;
    max-width: 100%;
}

.sidebar-logo .logo-text {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--white);
}

.sidebar-logo .logo-plus {
    color: var(--primary-color);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.5rem;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-nav-item:hover {
    background: var(--primary-light);
    color: var(--secondary-color);
}

.sidebar-nav-item.active {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

.sidebar-nav-item .nav-icon {
    flex-shrink: 0;
    stroke: currentColor;
}

.sidebar-nav-item .nav-text {
    font-size: 0.95rem;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--background);
}

.user-info-sidebar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.user-avatar-sidebar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--secondary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.user-role {
    font-size: 0.8rem;
    color: var(--text-light);
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
    width: 100%;
}

.sidebar-logout:hover {
    color: var(--error-color);
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--secondary-color);
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s;
    min-height: var(--touch-target);
    text-decoration: none;
    line-height: 1.5;
}

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

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

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

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

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

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    min-height: 36px;
}

.btn-block {
    width: 100%;
    display: block;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--white);
    color: var(--text-dark);
    min-height: var(--touch-target);
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(6, 148, 162, 0.1);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

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

.form-row {
    margin-bottom: 1rem;
}

.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-success {
    background: #F0FFF4;
    border-color: var(--success-color);
    color: #276749;
}

.alert-error {
    background: #FFF5F5;
    border-color: var(--error-color);
    color: #9B2C2C;
}

.alert-warning {
    background: #FFFFF0;
    border-color: var(--warning-color);
    color: #975A16;
}

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

.content-header h1 {
    margin-bottom: 0;
}

.page-header {
    margin-bottom: 2rem;
}

.page-actions {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
}

.btn-add {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    box-shadow: var(--shadow);
}

.btn-add svg {
    flex-shrink: 0;
}

.header-actions-attendance {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.date-selector-modern {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.date-form-modern {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.date-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.date-icon {
    position: absolute;
    left: 0.75rem;
    color: var(--primary-color);
    pointer-events: none;
    z-index: 1;
}

.date-select-modern {
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    font-size: 0.95rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--white);
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s;
    min-height: var(--touch-target);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%232D3748' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.date-select-modern:hover {
    border-color: var(--primary-color);
}

.date-select-modern:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(6, 148, 162, 0.1);
}

.date-picker {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    min-height: var(--touch-target);
    background: var(--white);
    transition: all 0.2s;
}

.date-picker:hover {
    border-color: var(--primary-color);
}

.date-picker:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(6, 148, 162, 0.1);
}

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

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    background: var(--white);
    color: var(--text-dark);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

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

.stats-grid-reports {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    color: var(--primary-color);
    stroke: currentColor;
}

.stat-content h3 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
    color: var(--secondary-color);
}

.stat-content p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

.stat-success { border-left: 4px solid var(--success-color); }
.stat-warning { border-left: 4px solid var(--warning-color); }
.stat-info { border-left: 4px solid var(--info-color); }

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

table thead {
    background: var(--secondary-color);
    color: var(--white);
}

table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

table td {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

table tbody tr:hover {
    background: var(--background);
}

.text-center { text-align: center; }
.text-muted { color: var(--text-light); }

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 20px;
    background: var(--background);
    color: var(--text-dark);
}

.badge-success {
    background: #F0FFF4;
    color: #276749;
}

.badge-warning {
    background: #FFFFF0;
    color: #975A16;
}

.badge-present {
    background: #F0FFF4;
    color: #276749;
}

.badge-absent {
    background: #FFF5F5;
    color: #9B2C2C;
}

.employee-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.employee-avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #4A5568;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

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

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--secondary-color);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 1rem;
}

.login-box {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.logo-section {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
    width: 100%;
}

.login-brand-logo {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.logo-section .logo-text {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.tagline {
    color: var(--text-light);
    font-size: 0.9rem;
}

.login-form { margin-top: 1rem; }

.login-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
}

.attendance-kanban {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.kanban-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    transition: all 0.2s;
    border-left: 4px solid var(--border-color);
}

.kanban-card.present { border-left-color: var(--success-color); }

.kanban-card.absent {
    border-left-color: var(--text-light);
    opacity: 0.8;
}

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

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.employee-avatar-large {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #4A5568;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.employee-info-card { flex: 1; }

.employee-name-card {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--secondary-color);
}

.employee-position-card {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}

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

.badge-absent {
    background: var(--text-light);
    color: var(--white);
}

.card-stats {
    padding: 1rem;
    background: var(--background);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

.stat-value {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 1.1rem;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-toggle {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-height: var(--touch-target);
}

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

.btn-present:hover { background: #2F855A; }

.btn-absent {
    background: var(--text-light);
    color: var(--white);
}

.btn-absent:hover { background: #4A5568; }

.btn-details {
    padding: 0.75rem 1rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-height: var(--touch-target);
}

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

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(45,55,72,0.5);
    overflow: auto;
}

.modal:not(.hidden) { display: block; }

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 0;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

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

.modal-header h2 {
    color: var(--white);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--white);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover { opacity: 0.7; }

.modal-body { padding: 1.5rem; }

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

.modal-body .form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.modal-body .form-hint {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.attendance-history { margin-bottom: 2rem; }

.history-table {
    width: 100%;
    font-size: 0.9rem;
}

.history-table th {
    background: var(--primary-light);
    color: var(--secondary-color);
    padding: 0.75rem;
    font-size: 0.85rem;
}

.history-table td { padding: 0.75rem; }

.attendance-form-modal h3 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.hours-control-modal {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-hours {
    width: 44px;
    height: 44px;
    border: 2px solid var(--primary-color);
    background: var(--white);
    color: var(--primary-color);
    border-radius: var(--border-radius);
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

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

.quick-actions { margin: 2rem 0; }

.quick-actions h2 {
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

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

.action-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.2s;
    display: block;
    text-decoration: none;
    color: var(--text-dark);
    border: 2px solid transparent;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.action-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    color: var(--primary-color);
    stroke: currentColor;
    flex-shrink: 0;
}

.action-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.action-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    grid-column: 1 / -1;
}

.absent-section { margin-top: 2rem; }

.absent-section h2 {
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.absent-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.absent-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--signal-orange);
    border-radius: var(--border-radius);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

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

.absent-card.blinking {
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% {
        border-left-color: var(--signal-orange);
        box-shadow: 0 0 0 0 rgba(232, 89, 12, 0.3);
    }
    50% {
        border-left-color: #F97316;
        box-shadow: 0 0 0 4px rgba(232, 89, 12, 0.1);
    }
}

.absent-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.absent-card-info h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--secondary-color);
}

.absent-card-info p {
    margin: 0.25rem 0 0 0;
    font-size: 0.85rem;
    color: var(--text-light);
}

.absent-card-status {
    display: flex;
    justify-content: flex-end;
}

.hidden { display: none !important; }

.inline-form {
    display: inline-flex;
    gap: 0.5rem;
}

.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    padding: 0.75rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle svg { stroke: currentColor; }

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 55, 72, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 1rem;
}

.sidebar-close svg { stroke: currentColor; }

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

.table-card { display: none; }

@media (max-width: 768px) {
    .mobile-menu-toggle { display: flex; }
    .sidebar-close { display: flex; }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        z-index: 1000;
    }
    
    .sidebar.open { transform: translateX(0); }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-top: 4rem;
    }
    
    .attendance-kanban { grid-template-columns: 1fr; }
    
    table { display: none; }
    
    .table-card {
        display: block;
        background: var(--white);
        border-radius: var(--border-radius);
        box-shadow: var(--shadow);
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .table-card-row {
        display: flex;
        justify-content: space-between;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .table-card-row:last-child { border-bottom: none; }
    
    .table-card-label {
        font-weight: 600;
        color: var(--text-dark);
        flex: 1;
    }
    
    .table-card-value {
        color: var(--text-light);
        flex: 1;
        text-align: right;
    }

    .table-cards-mobile { display: none; }
    
    .table-card-header {
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--secondary-color);
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
        border-bottom: 2px solid var(--primary-color);
    }
    
    .modal { padding: 0; }
    
    .modal-content {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        margin: 0;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }
    
    .modal-header {
        flex-shrink: 0;
        padding: 1rem;
    }
    
    .modal-body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 1rem;
    }
    
    .modal-body .form-grid { grid-template-columns: 1fr; }
    
    .modal-body .form-actions {
        flex-direction: column;
        position: sticky;
        bottom: 0;
        background: var(--white);
        padding-top: 1rem;
        margin-top: auto;
    }
    
    .modal-body .form-actions .btn { width: 100%; }
    
    .attendance-history {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 2rem;
        padding-bottom: 1rem;
        border-bottom: 2px solid var(--border-color);
    }
    
    .attendance-history h3 {
        margin-bottom: 1rem;
        color: var(--secondary-color);
        font-size: 1.1rem;
    }
    
    .history-table {
        min-width: 100%;
        font-size: 0.85rem;
        width: 100%;
    }
    
    .history-table th,
    .history-table td {
        padding: 0.5rem;
        white-space: nowrap;
        text-align: left;
    }
    
    .history-table th {
        background: var(--primary-light);
        color: var(--secondary-color);
        font-weight: 600;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .content-header h1 { margin-bottom: 1rem; }
    
    .header-actions-attendance {
        width: 100%;
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-buttons {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
    
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-wrapper table {
        display: table;
        min-width: 800px;
    }
    
    .table-cards-mobile { display: block; }
    .table-wrapper { display: none; }
}

@media (min-width: 768px) {
    .form-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid-reports { grid-template-columns: repeat(2, 1fr); }
    .table-cards-mobile { display: none; }
    .table-wrapper { display: block; }
}

@media (min-width: 1024px) {
    .form-grid { grid-template-columns: repeat(3, 1fr); }
    .stats-grid-reports { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
}

@media (max-width: 767px) {
    .stats-grid-reports { grid-template-columns: 1fr; }
    .absent-cards-grid { grid-template-columns: 1fr; }
    
    .btn, .btn-toggle, .btn-details, .btn-hours, .filter-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .page-actions { margin-bottom: 1rem; }
    .page-actions .btn { width: 100%; }
}

.payroll-kanban-card { cursor: pointer; }
.payroll-kanban-card.sent { border-left-color: var(--success-color); }
.payroll-kanban-card.pending { border-left-color: var(--warning-color); }

.stat-value.highlight-value {
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 1.1rem;
}

.stat-value.advance-value {
    color: var(--signal-orange);
    font-weight: 600;
}

.detail-column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label-modern {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.detail-value-modern {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
}

.detail-value-modern.advance-value { color: var(--signal-orange); }

.detail-value-modern.highlight-value {
    color: var(--primary-dark);
    font-size: 1.05rem;
    font-weight: 700;
}

.detail-value-modern small {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 400;
}

.payroll-card-actions-modern {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.btn-modern {
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 120px;
    font-family: inherit;
}

.btn-modern-outline {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

.btn-modern-primary {
    background: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

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

.btn-modern-success {
    background: var(--success-color);
    color: white;
    border: 2px solid var(--success-color);
}

.btn-modern-success:hover {
    background: #2F855A;
    border-color: #2F855A;
}

.btn-modern-danger {
    background: var(--error-color);
    color: white;
    border: 2px solid var(--error-color);
}

.btn-modern-danger:hover {
    background: #C53030;
    border-color: #C53030;
}

.modal-large {
    max-width: 700px;
    width: 90%;
}

.payroll-modal-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--background);
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.header-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-info-label {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.header-info-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.payroll-modal-table-wrapper {
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.payroll-modal-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

.payroll-modal-table tbody tr { border-bottom: 1px solid var(--border-color); }
.payroll-modal-table tbody tr:last-child { border-bottom: none; }
.payroll-modal-table tbody tr.highlight-row { background: var(--background); }

.payroll-modal-table tbody tr.highlight-row:first-child {
    background: rgba(6, 148, 162, 0.05);
}

.payroll-modal-table td {
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
}

.payroll-modal-table .table-label {
    width: 35%;
    color: var(--text-light);
    font-weight: 500;
    background: var(--background);
    border-right: 1px solid var(--border-color);
}

.payroll-modal-table .table-value {
    width: 15%;
    color: var(--text-dark);
    font-weight: 600;
    text-align: right;
}

.payroll-modal-table .table-value.highlight-value {
    color: var(--primary-dark);
    font-size: 1.15rem;
    font-weight: 700;
}

.payroll-modal-table .table-value.advance-value {
    color: var(--signal-orange);
    font-weight: 600;
}

.payroll-modal-table .table-value strong {
    color: var(--text-dark);
    font-weight: 700;
}

.payroll-modal-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
}

.payroll-modal-actions .btn {
    flex: 1;
    min-width: 140px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
}

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

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

.payroll-modal-actions .btn-success {
    background: var(--success-color);
    color: var(--white);
}

.payroll-modal-actions .btn-success:hover { background: #2F855A; }

.payroll-modal-actions .btn-outline {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.payroll-modal-actions .btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

.payroll-modal-actions .btn-danger {
    background: var(--error-color);
    color: var(--white);
}

.payroll-modal-actions .btn-danger:hover { background: #C53030; }

@media (max-width: 768px) {
    .payroll-cards-grid { grid-template-columns: 1fr; gap: 1rem; }
    .payroll-details-modern { grid-template-columns: 1fr; }
    .payroll-card-actions-modern { flex-direction: column; }
    .btn-modern { width: 100%; }
    
    .payroll-modal-header-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .payroll-modal-table { font-size: 0.85rem; }
    .payroll-modal-table td { padding: 0.75rem 0.5rem; }
    .payroll-modal-table .table-label { width: 40%; }
    .payroll-modal-table .table-value { width: 10%; }
    .payroll-modal-actions { flex-direction: column; }
    .payroll-modal-actions .btn { width: 100%; }
}

@media (min-width: 769px) and (max-width: 1200px) {
    .payroll-cards-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1201px) {
    .payroll-cards-grid { grid-template-columns: repeat(3, 1fr); }
}

@media print {
    .sidebar, .btn, .action-buttons { display: none; }
    .main-content { margin-left: 0; }
    body { background: white; }
}
