/* Workers Tracker - Modern Mobile-First Dark Theme */

/* === CSS Variables === */
:root {
    --primary-color: #0f172a;
    --secondary-color: #1e293b;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --accent-light: rgba(59, 130, 246, 0.15);
    --success-color: #22c55e;
    --success-light: rgba(34, 197, 94, 0.15);
    --warning-color: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.15);
    --danger-color: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.15);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --bg-dark: #020617;
    --bg-card: #0f172a;
    --bg-input: #1e293b;
    --bg-hover: #334155;
    --border-color: #1e293b;
    --border-light: #334155;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 15px;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

h1 { font-size: 1.625rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }

p { margin-bottom: 0.75rem; }

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

/* === Layout === */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* === Header === */
.app-header {
    background: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0.875rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 0.75rem;
}

.header-content h1 {
    font-size: 1.25rem;
    margin: 0;
    background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.back-btn {
    font-size: 1.375rem;
    text-decoration: none !important;
    color: var(--text-primary);
    margin-right: 0.75rem;
    display: flex;
    align-items: center;
    width: 36px;
    height: 36px;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.back-btn:hover {
    background: var(--bg-hover);
    text-decoration: none;
}

/* === Main Content === */
.main-content {
    flex: 1;
    padding: 1rem;
    padding-bottom: 90px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* === Cards === */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: border-color var(--transition);
}

.card:hover {
    border-color: var(--border-light);
}

.card h2 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-card {
    border-left: 3px solid var(--warning-color);
    background: linear-gradient(135deg, var(--bg-card), rgba(245, 158, 11, 0.05));
}

.alert-text {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    text-decoration: none !important;
    white-space: nowrap;
    line-height: 1.4;
    letter-spacing: 0.01em;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: white;
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-warning {
    background: var(--warning-color);
    color: #000;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #16a34a;
}

.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-large {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    width: 100%;
    border-radius: var(--radius);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
}

.btn-outline:hover {
    background: var(--accent-light);
    color: var(--accent-color);
}

/* === Forms === */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.375rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.8125rem;
    letter-spacing: 0.02em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: all var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
    font-size: 0.9375rem;
}

.checkbox-label:hover {
    background: var(--bg-hover);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-color);
}

.team-select {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.25rem;
}

/* === Login Page === */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
    background: var(--bg-dark);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08), transparent 70%);
    top: -200px;
    right: -200px;
    pointer-events: none;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.06), transparent 70%);
    bottom: -100px;
    left: -100px;
    pointer-events: none;
}

.login-container {
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: var(--bg-card);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.login-card h1 {
    text-align: center;
    margin-bottom: 0.25rem;
    font-size: 1.75rem;
    background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-card h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 0.9375rem;
    color: var(--text-muted);
    border: none;
    font-weight: 400;
    padding: 0;
}

.login-card .btn {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.error-message {
    background: var(--danger-light);
    border-left: 3px solid var(--danger-color);
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    font-size: 0.875rem;
}

/* === Work Session === */
.work-session-card {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.work-session-card::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1), transparent 70%);
    top: -150px;
    right: -100px;
    pointer-events: none;
}

.work-session-status {
    text-align: center;
    position: relative;
}

.status-text {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.status-active {
    color: var(--success-color);
}

.status-completed {
    color: var(--text-secondary);
}

.time-info {
    margin: 0.375rem 0;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.time-info strong {
    color: var(--text-primary);
}

.duration-display {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
    font-variant-numeric: tabular-nums;
    margin: 0.5rem 0;
    letter-spacing: 0.05em;
}

/* === Quick Actions === */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

/* === Statistics Grid === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: var(--radius);
    text-align: center;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), #8b5cf6);
    opacity: 0;
    transition: opacity var(--transition);
}

.stat-card:hover::after {
    opacity: 1;
}

.stat-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.stat-card h3 {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-bottom: 0.375rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* === Activities === */
.activities-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.activity-item {
    background: var(--bg-input);
    padding: 1rem;
    border-radius: var(--radius);
    border-left: 3px solid var(--accent-color);
    transition: all var(--transition);
}

.activity-item:hover {
    background: var(--bg-hover);
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.activity-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 100px;
    font-size: 0.6875rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.activity-time {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.active-indicator {
    color: var(--success-color);
    font-weight: 700;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.activity-item h3 {
    font-size: 0.9375rem;
    margin-bottom: 0.375rem;
    font-weight: 600;
}

.activity-item p {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    margin-bottom: 0.375rem;
}

.activity-location {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.activity-user {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
}

/* === Salary === */
.salary-summary {
    margin-bottom: 1.25rem;
}

.salary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
}

.salary-total {
    background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
    font-size: 1rem;
    margin-top: 0.75rem;
    font-weight: 600;
}

.text-danger {
    color: var(--danger-color);
}

.daily-salary-list {
    margin-top: 0.75rem;
}

.daily-salary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.625rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
}

.daily-salary-item:last-child {
    border-bottom: none;
}

/* === Employees List === */
.employees-status-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.employee-status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    background: var(--bg-input);
    border-radius: var(--radius);
    transition: all var(--transition);
    gap: 0.75rem;
}

.employee-status-item:hover {
    background: var(--bg-hover);
}

.employee-info {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    flex: 1;
    min-width: 0;
}

.employee-info strong {
    font-size: 0.9375rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.1875rem 0.625rem;
    border-radius: 100px;
    font-size: 0.6875rem;
    font-weight: 700;
    margin-right: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-working {
    background: var(--success-light);
    color: var(--success-color);
}

.status-completed {
    background: var(--accent-light);
    color: var(--accent-color);
}

.status-absent {
    background: rgba(100, 116, 139, 0.2);
    color: var(--text-muted);
}

/* === Evaluations === */
.week-selector {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.week-display {
    font-weight: 700;
    text-align: center;
    font-size: 0.9375rem;
    color: var(--accent-color);
}

.evaluation-card {
    margin-bottom: 1.5rem;
}

.evaluation-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.evaluation-item {
    padding: 1rem;
    background: var(--bg-input);
    border-radius: var(--radius);
    border-left: 3px solid var(--text-muted);
    transition: all var(--transition);
}

.evaluation-item:hover {
    background: var(--bg-hover);
}

.evaluation-item.evaluated {
    border-left-color: var(--success-color);
}

.evaluation-item.pending {
    border-left-color: var(--warning-color);
}

.evaluation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.work-hours {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
}

.activities-count {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.evaluation-display {
    margin-top: 0.75rem;
}

.amount-display {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--success-color);
    display: block;
    margin-bottom: 0.375rem;
}

.eval-notes {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    margin: 0.375rem 0;
}

.eval-time {
    color: var(--text-muted);
    font-size: 0.6875rem;
    display: block;
    margin: 0.375rem 0 0.75rem;
}

.evaluation-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
    border-radius: var(--radius);
    margin-top: 0.75rem;
    font-size: 1rem;
}

.total-amount {
    font-size: 1.25rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.pending-text {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.875rem;
}

/* === Alerts === */
.alert {
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    border-left: 3px solid;
    font-size: 0.875rem;
}

.alert-success {
    background: var(--success-light);
    border-left-color: var(--success-color);
    color: var(--success-color);
}

.alert-error {
    background: var(--danger-light);
    border-left-color: var(--danger-color);
    color: var(--danger-color);
}

/* === Modal === */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    margin: 3% auto;
    padding: 1.75rem;
    border-radius: var(--radius-xl);
    width: 92%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h2 {
    border: none;
    padding: 0;
    margin-bottom: 1.25rem;
}

.close {
    color: var(--text-muted);
    float: right;
    font-size: 1.75rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.close:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

/* === Bottom Navigation === */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary-color);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    z-index: 90;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none !important;
    font-size: 0.625rem;
    transition: all var(--transition);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    position: relative;
}

.nav-item:hover {
    color: var(--text-secondary);
}

.nav-item.active {
    color: var(--accent-color);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 0 0 3px 3px;
}

.nav-icon {
    font-size: 1.375rem;
    margin-bottom: 0.125rem;
}

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* === Toast Notifications === */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    animation: toastIn 0.3s ease;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 250px;
    max-width: 380px;
    pointer-events: auto;
}

.toast-success {
    background: var(--success-color);
    color: white;
}

.toast-error {
    background: var(--danger-color);
    color: white;
}

.toast-warning {
    background: var(--warning-color);
    color: #000;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}

/* === Balance Summary === */
.balance-summary {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.balance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
}

.balance-total {
    background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
    font-size: 1rem;
    margin-top: 0.375rem;
    font-weight: 600;
}

/* === Payments List === */
.payments-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.payment-item {
    padding: 1rem;
    background: var(--bg-input);
    border-radius: var(--radius);
    border-left: 3px solid var(--success-color);
    transition: all var(--transition);
}

.payment-item:hover {
    background: var(--bg-hover);
}

.advance-item {
    border-left-color: var(--warning-color);
}

.payment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.payment-amount {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--success-color);
    font-variant-numeric: tabular-nums;
}

.advance-amount {
    color: var(--warning-color);
}

.payment-user {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
}

.payment-details {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.375rem;
    flex-wrap: wrap;
    align-items: center;
}

.payment-type {
    padding: 0.1875rem 0.625rem;
    background: var(--bg-hover);
    border-radius: 100px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
}

.payment-period {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.payment-notes {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    margin: 0.375rem 0;
}

.payment-meta {
    color: var(--text-muted);
    font-size: 0.6875rem;
    margin: 0.375rem 0 0;
}

/* === Activity Statistics === */
.activity-stat-item {
    margin-bottom: 1.25rem;
}

.activity-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.375rem;
}

.progress-bar {
    height: 8px;
    background: var(--bg-input);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.progress-fill {
    height: 100%;
    border-radius: 100px;
    transition: width 0.6s ease;
}

.progress-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

/* === Daily Statistics === */
.daily-stats-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.daily-stat-item {
    padding: 0.875rem 1rem;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.daily-stat-item:hover {
    background: var(--bg-hover);
}

.daily-stat-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
}

.daily-stat-content {
    display: flex;
    gap: 1rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* === Employee Management === */
.employees-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.employees-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.employees-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    color: var(--text-muted);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.employees-table th:first-child {
    border-radius: var(--radius-sm) 0 0 0;
}

.employees-table th:last-child {
    border-radius: 0 var(--radius-sm) 0 0;
}

.employees-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
    vertical-align: middle;
}

.employees-table tr:hover td {
    background: var(--bg-hover);
}

.employees-table .actions-cell {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* === Responsive === */
@media (min-width: 768px) {
    .main-content {
        padding: 1.5rem 2rem;
    }

    .card {
        padding: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .quick-actions {
        grid-template-columns: repeat(4, 1fr);
    }

    .modal-content {
        margin: 8% auto;
        width: 80%;
    }

    .bottom-nav {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        border-left: 1px solid var(--border-color);
        border-right: 1px solid var(--border-color);
    }
}

@media (min-width: 1024px) {
    h1 { font-size: 1.875rem; }
    h2 { font-size: 1.375rem; }

    .login-card {
        padding: 3rem 2.5rem;
    }

    .stat-card {
        padding: 1.5rem;
    }

    .bottom-nav {
        display: none;
    }

    .main-content {
        padding-bottom: 2rem;
    }
}

/* === Utilities === */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-success { color: var(--success-color); }
.text-warning { color: var(--warning-color); }
.text-danger { color: var(--danger-color); }
.text-accent { color: var(--accent-color); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.d-flex { display: flex; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* === Loading === */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn.loading-btn {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 100px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* === Print === */
@media print {
    .app-header, .bottom-nav, .quick-actions, .btn {
        display: none !important;
    }
    body {
        background-color: white;
        color: black;
    }
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    .main-content {
        padding-bottom: 0;
    }
}
