/* Workday Module Styles (Fase 1) - Inspired by Factorial HR / Sesame HR */
.workday-container {
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    font-family: 'Inter', sans-serif;
}

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

.workday-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Tabs */
.workday-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: var(--bg-card);
    padding: 0.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

.workday-tab {
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.workday-tab:hover {
    background: var(--bg-hover);
    color: var(--text-color);
}

.workday-tab.active {
    background: var(--primary-color);
    color: white;
}

/* Tab Content */
.workday-content {
    animation: fadeIn 0.3s ease;
}

/* Date Controls */
.date-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-card);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    width: max-content;
}

.date-controls button {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

.date-controls button:hover {
    color: var(--primary-color);
}

.date-controls input {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-weight: 600;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
}

/* Cards Grid */
.workday-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.wd-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.wd-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 4px; height: 100%;
    background: var(--border-color);
}
.wd-card.status-active::before { background: var(--warning-color); }
.wd-card.status-completed::before { background: var(--success-color); }
.wd-card.status-anomaly::before { background: var(--danger-color); }
.wd-card.status-incomplete::before { background: var(--text-muted); }

.wd-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.wd-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.wd-avatar {
    width: 40px;
    height: 40px;
    background: var(--bg-hover);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--primary-color);
}

.wd-name {
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.wd-area {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.wd-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.badge-active { background: #fef3c7; color: #b45309; }
.badge-completed { background: #d1fae5; color: #065f46; }
.badge-anomaly { background: #fee2e2; color: #b91c1c; }
.badge-incomplete { background: #f3f4f6; color: #4b5563; }

.wd-timeline {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.wd-time-item {
    display: flex;
    flex-direction: column;
}

.wd-time-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.wd-time-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

.wd-stats {
    margin-top: 1rem;
    background: var(--bg-body);
    border-radius: 8px;
    padding: 0.75rem;
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.wd-stat-val {
    font-weight: 700;
    color: var(--primary-color);
}
.wd-stat-lbl {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.wd-card-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
}

/* Anomalies List */
.anomalies-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.anomaly-item {
    background: var(--bg-card);
    border-left: 4px solid var(--danger-color);
    padding: 1.25rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Table styles */
.wd-table-container {
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

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

.wd-table th, .wd-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.wd-table th {
    background: var(--bg-hover);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

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

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

/* Modal */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}
.wd-modal {
    background: var(--bg-card);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    padding: 1.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
.wd-modal-title {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

/* Light / Dark Mode fixes */
[data-theme="dark"] .wd-card, 
[data-theme="dark"] .anomaly-item,
[data-theme="dark"] .wd-table-container,
[data-theme="dark"] .wd-modal {
    background: var(--bg-card);
    border-color: var(--border-color);
}
[data-theme="dark"] .badge-active { background: rgba(180,83,9,0.2); }
[data-theme="dark"] .badge-completed { background: rgba(6,95,70,0.2); }
[data-theme="dark"] .badge-anomaly { background: rgba(185,28,28,0.2); }
[data-theme="dark"] .badge-incomplete { background: rgba(75,85,99,0.2); }
