/**
 * Gama Attendance System Styles
 * Theme: Modern Glass (Premium)
 */

/* CSS Variables - Premium Dark Theme */
:root {
    /* --- NEW CORE PALETTE --- */
    --p-50: #f5f7ff;
    --p-100: #ebf0fe;
    --p-500: #6366f1;
    /* Primary */
    --p-600: #4f46e5;
    --p-700: #4338ca;

    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;

    /* Semantic Tokens */
    --primary: var(--p-500);
    --primary-dark: var(--p-700);
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    /* Surface & Text (High Contrast) */
    --bg-page: #f8fafc;
    --bg-app: #f1f5f9;
    --surface: #ffffff;
    --text-main: var(--slate-900);
    --text-secondary: var(--slate-700);
    --text-muted: var(--slate-500);
    --border: var(--slate-200);

    /* Radius & Shadows */
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
    --shadow-premium: 0 25px 50px -12px rgba(67, 56, 202, 0.12);

    --font-main: 'Outfit', -apple-system, sans-serif;
}

/* Base Styles */
body {
    background-color: var(--bg-app);
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.03) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-main);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    margin: 0;
}

/* NUCLEAR LAYOUT RESET & ADMIN BAR HIDING */
html {
    margin-top: 0 !important;
}

/* Hide WP Admin Bar and default theme elements when in dashboard mode */
.gama-app-container {
    min-height: 100vh;
    display: flex;
}

/* Aggressively hide all standard WP/Theme headers and footers */
#wpadminbar,
#adminmenumain,
#wphead,
#wpfooter,
.site-header,
.site-footer,
header.site-header,
footer.site-footer,
.elementor-location-header,
.elementor-location-footer {
    display: none !important;
}

/* Fix for body classes added by WP */
body.admin-bar {
    margin-top: 0 !important;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(0, 112, 243, 0.1) 0%, transparent 70%),
        radial-gradient(circle at 80% 70%, rgba(16, 185, 129, 0.05) 0%, transparent 70%);
    z-index: -1;
    transition: opacity 0.5s ease;
}

body.light-mode {
    background: #f0f4f8 radial-gradient(circle at center, #ffffff 0%, #f0f4f8 100%) no-repeat fixed;
}

body.light-mode::before {
    opacity: 0.5;
    background: radial-gradient(circle at 80% 20%, rgba(0, 112, 243, 0.05) 0%, transparent 60%),
        radial-gradient(circle at 20% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 60%);
}

.gama-attendance-dashboard,
.gama-admin-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-premium);
    padding: 24px;
    margin: 20px auto;
    max-width: 1200px;
    width: calc(100% - 32px);
    box-sizing: border-box;
}

/* Skip Link */
.gama-skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px;
    z-index: 100000;
    transition: top 0.2s;
}

.gama-skip-link:focus {
    top: 0;
}

/* Focus Styles */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Dashboard Header */
.gama-dashboard-header {
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.gama-header-content h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    letter-spacing: -1px;
    line-height: 1.2;
}

.gama-date-display {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gama-day-name {
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 13px;
}

.gama-department {
    font-size: 13px;
    color: var(--text-mute);
    margin-top: 8px;
    display: inline-block;
    padding: 2px 8px;
    background: var(--border-light);
    border-radius: 6px;
    font-weight: 600;
}

/* Main Check-in Card (Compact Premium Clean) */
.gama-checkin-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 32px;
    margin-bottom: 24px;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.gama-checkin-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), #ec4899);
}

.gama-checkin-button {
    background: var(--p-500);
    color: #ffffff !important;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.gama-checkin-button:hover {
    background: var(--p-600);
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
}

.gama-checkin-button:active {
    transform: translateY(1px);
}

/* Subtitles & Info text (Enforced Contrast) */
.gama-checkin-info h2 {
    margin: 0 0 4px 0;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.gama-button-icon {
    background: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gama-button-title {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: #ffffff !important;
}

.gama-button-subtitle {
    display: block;
    font-size: 13px;
    opacity: 0.95;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9) !important;
}

.gama-checkin-success .gama-checkin-icon {
    background: #ecfdf5;
    color: var(--success);
    width: 72px;
    height: 72px;
    font-size: 32px;
    border: 2px solid #10b981;
}

.gama-checkin-info h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -1px;
}

.gama-checkin-time {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 500;
}

.gama-checkin-icon svg {
    width: 32px;
    height: 32px;
}

.gama-checkin-info h2 {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.gama-checkin-time {
    margin: 0;
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
}



/* Month Navigation */
.gama-month-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
}

.gama-nav-btn {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    background: #ffffff;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: var(--text-main);
}

.gama-nav-btn:hover {
    background: #f1f5f9;
    color: var(--primary);
    border-color: var(--primary);
}

.gama-month-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -1px;
    margin: 0;
    min-width: 220px;
    text-align: center;
    color: var(--text-main);
}

/* Summary Cards */
.gama-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 24px;
    margin-bottom: 40px;
}

#gama-month-chart-card {
    grid-column: span 3;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    min-height: 400px;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
}

.light-mode #gama-month-chart-card {
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-premium);
}

@media (max-width: 1100px) {
    .gama-summary-grid {
        grid-template-columns: 1fr;
    }

    #gama-month-chart-card {
        grid-column: span 1;
        flex-direction: column;
    }
}

.gama-summary-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.gama-card-present::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--success);
}

.gama-card-absence::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--danger);
}

.gama-card-nodata::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--text-muted);
}


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

.gama-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-app);
    font-size: 20px;
    color: var(--primary);
}

.gama-card-value {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
    letter-spacing: -1px;
}

.gama-card-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Calendar */
.gama-calendar-container {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 32px;
    margin-bottom: 32px;
    border: 1px solid var(--border);
}

.gama-calendar-header {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 12px !important;
    margin-bottom: 24px !important;
}

.gama-calendar-day-name {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 0;
}

.gama-calendar-grid {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 8px !important;
}

.gama-calendar-day {
    aspect-ratio: 1;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    border: 1px solid #f1f5f9;
    background: #f8fafc;
    color: var(--text-main);
}

.gama-calendar-day:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    z-index: 10;
    background: #f1f5f9;
    color: var(--primary);
}

.gama-calendar-day.gama-empty {
    background: transparent;
    cursor: default;
}

.gama-calendar-day.gama-empty:hover {
    border-color: transparent;
}

.gama-day-number {
    font-weight: 600;
}

.gama-day-status {
    font-size: 10px;
    margin-top: 2px;
}

/* Calendar Status Colors - Premium */
.gama-calendar-day.gama-status-present {
    background: #ecfdf5;
    color: #065f46;
    border-color: #10b981;
}

.gama-calendar-day.gama-status-absence {
    background: #fff1f2;
    color: #9f1239;
    border-color: #f43f5e;
}

/* Specific Absence Types - Each with unique color */
/* Nieusprawiedliwiona (Unexcused) - RED */
.gama-calendar-day.gama-absence-nieusprawiedliwiona {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

/* Urlop Wypoczynkowy (Vacation) - BLUE */
.gama-calendar-day.gama-absence-urlop-wypoczynkowy {
    background: #eff6ff;
    color: #1e40af;
    border-color: #3b82f6;
}

/* Urlop na żądanie (On Demand Leave) - INDIGO */
.gama-calendar-day.gama-absence-urlop-na-zadanie {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border-color: rgba(99, 102, 241, 0.3);
}

/* Urlop Bezpłatny (Unpaid Leave) - GRAY */
.gama-calendar-day.gama-absence-urlop-bezplatny {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.3);
}

/* Urlop Okolicznościowy (Occasional Leave) - PURPLE */
.gama-calendar-day.gama-absence-urlop-okolicznosciowy {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border-color: rgba(168, 85, 247, 0.3);
}

/* Urlop Macierzyński (Maternity/Parental) - PINK */
.gama-calendar-day.gama-absence-urlop-macierzynski {
    background: rgba(236, 72, 153, 0.15);
    color: #f472b6;
    border-color: rgba(236, 72, 153, 0.3);
}

/* Urlop Wychowawczy (Childcare Leave) - ROSE */
.gama-calendar-day.gama-absence-urlop-wychowawczy {
    background: rgba(251, 113, 133, 0.15);
    color: #fda4af;
    border-color: rgba(251, 113, 133, 0.3);
}

/* L4 - Zwolnienie Lekarskie (Sick Leave) - AMBER */
.gama-calendar-day.gama-absence-l4 {
    background: #fff7ed;
    color: #9a3412;
    border-color: #f59e0b;
}

/* Opieka nad dzieckiem (Childcare Days) - ORANGE */
.gama-calendar-day.gama-absence-opieka-nad-dzieckiem {
    background: rgba(249, 115, 22, 0.15);
    color: #fb923c;
    border-color: rgba(249, 115, 22, 0.3);
}

/* Opieka zasiłek (Care Allowance) - ORANGE-DARK */
.gama-calendar-day.gama-absence-opieka-zasilek {
    background: rgba(234, 88, 12, 0.15);
    color: #f97316;
    border-color: rgba(234, 88, 12, 0.3);
}

/* Wezwanie sąd/urząd (Court/Office Summons) - SLATE */
.gama-calendar-day.gama-absence-wezwanie-sad {
    background: rgba(100, 116, 139, 0.15);
    color: #94a3b8;
    border-color: rgba(100, 116, 139, 0.3);
}

.gama-calendar-day.gama-absence-delegacja {
    background: #f5f3ff;
    color: #5b21b6;
    border-color: #8b5cf6;
}

.gama-calendar-day.is-today {
    background: var(--p-50);
    border: 3px solid var(--primary);
    color: var(--primary);
    font-weight: 800;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.gama-calendar-day.is-selected {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary-dark) !important;
    box-shadow: var(--shadow-premium);
}

/* Praca Zdalna (Remote Work) - TEAL */
.gama-calendar-day.gama-absence-praca-zdalna {
    background: rgba(20, 184, 166, 0.15);
    color: #2dd4bf;
    border-color: rgba(20, 184, 166, 0.3);
}

/* Praca Hybrydowa (Hybrid Work) - CYAN */
.gama-calendar-day.gama-absence-praca-hybrydowa {
    background: rgba(6, 182, 212, 0.15);
    color: #22d3ee;
    border-color: rgba(6, 182, 212, 0.3);
}

/* Holiday (Święto) - RED FESTIVE - More Prominent */
.gama-calendar-day.gama-holiday {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.35) 0%, rgba(220, 38, 38, 0.25) 100%);
    color: #fef2f2;
    border: 2px solid rgba(239, 68, 68, 0.6);
    position: relative;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.25), inset 0 0 20px rgba(239, 68, 68, 0.1);
}

.gama-calendar-day.gama-holiday .gama-day-number {
    color: #fecaca;
    font-weight: 700;
}

.gama-calendar-day.gama-holiday::before {
    content: '🚩';
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 14px;
    opacity: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Holiday working is BLOCKED */
.gama-calendar-day.gama-holiday.gama-status-present::before {
    content: '🚩';
}

/* Weekend - BLOCKED (no work allowed) */
.gama-calendar-day.gama-status-weekend {
    background: rgba(71, 85, 105, 0.12);
    color: rgba(255, 255, 255, 0.4);
    border: 1px dashed rgba(71, 85, 105, 0.3);
    cursor: not-allowed;
}

/* Holiday - also blocked */
.gama-calendar-day.gama-holiday {
    cursor: not-allowed;
}

.gama-calendar-day.gama-status-weekend .gama-day-number {
    color: rgba(255, 255, 255, 0.45);
}

/* Legend Holiday Color */
.gama-legend-color.gama-status-holiday {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.3) 0%, rgba(239, 68, 68, 0.2) 100%);
    border: 1px solid rgba(220, 38, 38, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
}

.gama-calendar-day.gama-status-weekend {
    background: rgba(255, 255, 255, 0.01);
    color: rgba(255, 255, 255, 0.2);
    border-color: transparent;
    box-shadow: none;
}

.gama-calendar-day.gama-status-none {
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.gama-calendar-day.gama-today {
    box-shadow: 0 0 0 2px var(--primary), 0 0 20px rgba(0, 112, 243, 0.4);
    background: rgba(0, 112, 243, 0.1);
}

/* Legend */
.gama-legend {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.2);
    padding: 16px;
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.gama-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.gama-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.gama-legend-color.gama-status-present {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.gama-legend-color.gama-status-absence {
    background: var(--danger);
    box-shadow: 0 0 8px var(--danger);
}

.gama-legend-color.gama-status-weekend {
    background: rgba(255, 255, 255, 0.2);
}

.gama-legend-color.gama-status-none {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Header Actions */
.gama-header-actions {
    display: flex;
    gap: 12px;
}

.gama-btn-help,
.gama-btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--text-secondary);
}

.gama-btn-help svg,
.gama-btn-logout svg {
    width: 18px;
    height: 18px;
}

.gama-btn-help:hover {
    background: #f1f5f9;
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.gama-btn-logout {
    background: #fef2f2;
    color: var(--danger);
    border-color: #fee2e2;
}

.gama-btn-logout:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fecaca;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

@media (max-width: 768px) {
    .gama-header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .gama-btn-help,
    .gama-btn-logout {
        flex: 1;
        justify-content: center;
    }
}


/* Modal */
.gama-modal {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 99999 !important;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

.gama-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gama-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.gama-modal-content {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 32px;
    max-width: 580px;
    width: 94%;
    box-shadow: var(--shadow-premium);
    border: 1px solid var(--border);
    position: relative;
    animation: modalPop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.gama-modal-header h3 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
    margin: 0;
}

/* Error States */
.gama-attendance-error {
    background: var(--gama-danger-light);
    border: 1px solid var(--danger);
    border-radius: var(--gama-radius-lg);
    padding: 30px;
    text-align: center;
}

.gama-attendance-network-error {
    background: white;
    border: none;
    box-shadow: var(--gama-shadow-lg);
}

.gama-error-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.gama-attendance-error h3 {
    margin: 0 0 10px 0;
    color: var(--text-main);
}

.gama-error-hint {
    color: var(--text-mute);
    font-size: 14px;
    margin-top: 15px;
}

/* Loading State */
.gama-loading {
    text-align: center;
    padding: 30px;
    color: var(--text-mute);
}

.gama-empty-state {
    text-align: center;
    padding: 40px 20px !important;
    background: white;
}

.gama-empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.gama-empty-text {
    font-size: 16px;
    color: var(--text-mute);
    font-weight: 500;
}

/* Forms */
.gama-form-group {
    margin-bottom: 20px;
}

.gama-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
}

.gama-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.gama-select,
.gama-input,
.gama-textarea {
    width: 100%;
    padding: 10px 16px;
    border: 1.5px solid var(--slate-200);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    background-color: #ffffff;
    color: var(--text-main);
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: var(--font-main);
}

.gama-select:focus,
.gama-input:focus,
.gama-textarea:focus {
    outline: none;
    border-color: var(--primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px var(--p-100);
}

.gama-validation-msg {
    font-size: 11px;
    margin-top: 4px;
    font-weight: 500;
}

.gama-input-error {
    border-color: #ef4444 !important;
}

.gama-select:focus,
.gama-input:focus,
.gama-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.gama-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    margin-top: 20px;
}

/* Buttons */
.gama-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}


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

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

.gama-btn-secondary {
    background: #f1f5f9;
    color: var(--text-secondary);
}

.gama-btn-secondary:hover {
    background: #e2e8f0;
    color: var(--text-main);
}

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

.gama-btn-success:hover {
    background: #059669;
}

/* Admin Panel Styles */
.gama-admin-header {
    margin-bottom: 25px;
}

.gama-admin-header h1 {
    margin: 0 0 5px 0;
    font-size: 24px;
}

.gama-admin-subtitle {
    margin: 0;
    color: var(--text-mute);
}

.gama-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-end;
    margin-bottom: 32px;
    padding: 32px;
    background: var(--slate-50);
    border-radius: 20px;
    border: 1px solid var(--border);
}

.gama-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gama-filter-group label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.gama-stat-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--gama-radius-lg);
    padding: 24px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.gama-stat-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
}

.gama-stat-value {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.gama-stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--gama-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}


.gama-stat-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gama-stat-present .gama-stat-value {
    color: var(--success);
    background: linear-gradient(135deg, #34d399 0%, #059669 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gama-stat-leave .gama-stat-value {
    color: var(--gama-warning);
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gama-stat-absent .gama-stat-value {
    color: var(--gama-color-absent);
    background: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Table */
/* Table */
/* Table */
/* Table */
.gama-table-container {
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border: 1px solid var(--border);
}

.gama-table th {
    background: var(--slate-50);
    color: var(--slate-600);
    font-weight: 800;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.gama-table td {
    padding: 18px 24px;
    font-size: 15px;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-light);
}

.gama-table tr:hover td {
    background: var(--p-50);
    color: var(--primary);
}

.gama-table th::after {
    content: ' ↕';
    opacity: 0.3;
    font-size: 10px;
    margin-left: 4px;
}

.gama-table tbody tr {
    transition: background 0.2s ease;
}

.gama-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.gama-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.06) !important;
}


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

/* Badges */
.gama-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.gama-badge.gama-status-present {
    background: var(--gama-success-light);
    color: #065f46;
}

.gama-badge.gama-status-weekend {
    background: var(--gama-gray-100);
    color: var(--text-mute);
}

.gama-badge.gama-status-none {
    background: var(--gama-gray-100);
    color: var(--gama-gray-400);
}

.gama-badge.gama-status-absence {
    background: var(--gama-warning-light);
    color: #92400e;
}

.gama-badge.gama-absence-urlop-wypoczynkowy {
    background: #dbeafe;
    color: #1e40af;
}

.gama-badge.gama-absence-urlop-na-zadanie {
    background: #bfdbfe;
    color: #1e3a8a;
}

.gama-badge.gama-absence-urlop-bezplatny {
    background: #f1f5f9;
    color: #475569;
}

.gama-badge.gama-absence-urlop-okolicznosciowy {
    background: #f3e8ff;
    color: #6b21a8;
}

.gama-badge.gama-absence-urlop-macierzynski,
.gama-badge.gama-absence-urlop-wychowawczy {
    background: #fce7f3;
    color: #9d174d;
}

.gama-badge.gama-absence-l4 {
    background: #ffe4e6;
    color: #9f1239;
}

.gama-badge.gama-absence-opieka-nad-dzieckiem,
.gama-badge.gama-absence-opieka-zasilek {
    background: #ffedd5;
    color: #9a3412;
}

.gama-badge.gama-absence-wezwanie-sad {
    background: #f1f5f9;
    color: #1e293b;
}

.gama-badge.gama-absence-delegacja {
    background: #e0e7ff;
    color: #3730a3;
}

.gama-badge.gama-absence-praca-zdalna {
    background: #dcfce7;
    color: #166534;
}

.gama-badge.gama-absence-praca-hybrydowa {
    background: #f0fdf4;
    color: #3f6212;
}

.gama-badge.gama-absence-nieusprawiedliwiona {
    background: #fee2e2;
    color: #991b1b;
}

/* Pagination */
.gama-pagination {
    margin-top: 15px;
    margin-bottom: 25px;
}

.gama-pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.gama-pagination-info {
    font-size: 13px;
    color: var(--text-mute);
    margin-left: 15px;
}

.gama-pagination-ellipsis {
    color: var(--gama-gray-400);
    padding: 0 4px;
}

/* Export Panel */
.gama-export-panel {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--gama-radius-lg);
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
}

.gama-export-panel h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
}

.gama-export-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.gama-export-option {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gama-export-option select {
    margin-left: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .gama-summary-grid {
        grid-template-columns: 1fr;
    }

    .gama-quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .gama-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .gama-table-container {
        overflow-x: auto;
    }

    .gama-checkin-success {
        flex-direction: column;
        text-align: center;
    }

    /* Stacked Table for Mobile */
    .gama-table.gama-employees-table-responsive {
        display: block;
    }

    .gama-table.gama-employees-table-responsive thead {
        display: none;
    }

    .gama-table.gama-employees-table-responsive tbody,
    .gama-table.gama-employees-table-responsive tr,
    .gama-table.gama-employees-table-responsive td {
        display: block;
        width: 100%;
    }

    .gama-table.gama-employees-table-responsive tr {
        margin-bottom: 15px;
        border: 1px solid var(--gama-gray-200);
        border-radius: var(--radius);
        padding: 10px;
    }

    .gama-table.gama-employees-table-responsive td {
        text-align: right;
        padding: 8px 10px;
        border: none;
        border-bottom: 1px solid var(--gama-gray-100);
        position: relative;
        padding-left: 50%;
    }

    .gama-table.gama-employees-table-responsive td:last-child {
        border-bottom: none;
    }

    .gama-table.gama-employees-table-responsive td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 45%;
        text-align: left;
        font-weight: 700;
        font-size: 12px;
        color: var(--text-mute);
        text-transform: uppercase;
    }

    .gama-modal-content {
        width: 95%;
        padding: 15px;
        margin: 10px;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* WordPress Admin Overrides */
.gama-admin-wrap {
    margin-right: 20px;
}

.gama-admin-wrap .gama-admin-panel {
    max-width: 100%;
    padding: 0;
    font-size: 14px;
    /* Reduced base font size for admin */
}

.gama-admin-panel .gama-page-title {
    font-size: 24px;
    margin-bottom: 24px;
}


.gama-admin-actions {
    margin-bottom: 20px;
}

/* Context Switcher */
.gama-search-dropdown {
    position: relative;
    width: 400px;
    /* Expanded for better visibility */
    margin-right: 20px;
}


#gama-user-search {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 10px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

#gama-user-search:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 112, 243, 0.2);
    outline: none;
}

.gama-dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    display: none;
    /* JS toggles this */
}

.gama-dropdown-item {
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.1s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.gama-dropdown-item:last-child {
    border-bottom: none;
}

.gama-dropdown-item:hover {
    background: var(--primary);
    color: white;
}

/* Light mode overrides for dropdown */
.light-mode #gama-user-search {
    background: white;
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-main);
}

.light-mode .gama-dropdown-list {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.light-mode .gama-dropdown-item {
    color: var(--text-secondary);
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

.light-mode .gama-dropdown-item:hover {
    background: var(--primary);
    color: white;
}

/* Audit Log Badges */
.gama-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    display: inline-block;
}

.gama-badge-checkin {
    background: #dcfce7;
    color: #166534;
}

.gama-badge-add_absence {
    background: #fef9c3;
    color: #854d0e;
}

.gama-badge-delete_absence {
    background: #fee2e2;
    color: #991b1b;
}

.gama-badge-edit_log {
    background: #dbeafe;
    color: #1e40af;
}

.gama-badge-add_presence {
    background: #dcfce7;
    color: #166534;
}

.gama-badge-create_user {
    background: #f3e8ff;
    color: #6b21a8;
}

.gama-badge-update_user {
    background: #f3e8ff;
    color: #6b21a8;
}

.gama-badge-delete_user {
    background: #fef2f2;
    color: #991b1b;
}

/* Dashboard Redesign & Chart */
.gama-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.gama-btn-help {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 18px;
    border-radius: var(--gama-radius-lg);
    color: var(--text-main);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.gama-btn-help:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.gama-btn-help svg {
    width: 20px;
    height: 20px;
}

.gama-chart-wrapper {
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.gama-chart-wrapper:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.2);
}

.gama-chart-container {
    position: relative;
    width: 280px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px auto;
}

@media (max-width: 768px) {
    .gama-chart-container {
        width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
    }
}

.gama-chart-center-pct {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    line-height: 1;
}

.gama-pct-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -1px;
}

.gama-pct-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-top: 2px;
}

.gama-chart-legend {
    width: 100%;
    max-width: 550px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    margin-top: 0;
    min-height: 80px;
    justify-content: center;
}

.gama-loading-text {
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
}

.gama-chart-legend-header {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.gama-chart-legend-items {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .gama-chart-legend-items {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }
}

.gama-legend-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.gama-legend-row:hover {
    transform: translateY(-2px);
    color: var(--text-main);
}

.gama-chart-totals-footer {
    display: flex;
    gap: 40px;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px dashed var(--border);
    font-size: 13px;
    color: var(--text-secondary);
}

.gama-chart-totals-footer strong {
    color: var(--text-main);
}

.gama-legend-value-badge.badge-work {
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.gama-legend-value-badge.badge-none {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.gama-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.gama-legend-label {
    font-weight: 500;
}

.gama-legend-value-badge {
    font-weight: 700;
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.gama-legend-value-badge.badge-absence {
    color: #f43f5e;
    background: rgba(244, 63, 94, 0.1);
    border-color: rgba(244, 63, 94, 0.2);
}

.gama-legend-value-badge.badge-none {
    color: var(--text-muted);
    background: rgba(148, 163, 184, 0.1);
    border-color: rgba(148, 163, 184, 0.2);
}

.gama-legend-muted {
    opacity: 0.8;
}

#gama-month-chart {
    max-width: 100%;
}

.light-mode #gama-month-chart {
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.05));
}

.light-mode .gama-legend-row {
    color: #64748B;
}

/* Tour Tooltips (Driver.js overrides) */
.driver-popover {
    border-radius: 12px !important;
    padding: 24px !important;
    background: white !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    max-width: 320px !important;
}

.driver-popover-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--gama-gray-900) !important;
    margin-bottom: 8px !important;
}

.driver-popover-description {
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: var(--gama-gray-600) !important;
}

.driver-popover-btn {
    padding: 8px 16px !important;
    font-size: 13px !important;
    border-radius: 6px !important;
    background: var(--primary) !important;
    text-shadow: none !important;
    border: none !important;
    color: white !important;
}

.driver-popover-btn:hover {
    background: var(--gama-primary-dark) !important;
}

.driver-popover-close-btn {
    color: var(--gama-gray-400) !important;
}

/* Sidebar Navigation */
.gama-app-container {
    display: flex;
    min-height: 100vh;
    background: var(--bg);
    margin-left: -20px;
    /* Counteract WP Admin padding if needed, though usually inside #wpbody-content */
    width: calc(100% + 40px);
}

.gama-sidebar {
    width: 240px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    flex-shrink: 0;
}

.gama-brand {
    padding: 0 24px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gama-brand-link {
    display: block;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    line-height: 0;
}

.gama-brand-link:hover {
    transform: scale(1.08);
}

.gama-brand-link:hover .gama-brand-logo {
    filter: brightness(1.2) invert(1);
}

.light-mode .gama-brand-link:hover .gama-brand-logo {
    filter: brightness(0.8);
}

.gama-brand-link:active {
    transform: scale(0.95);
}

.gama-brand span {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.gama-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    margin: 0 12px 4px;
    border-radius: 10px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
    background: transparent;
    cursor: pointer;
    width: calc(100% - 24px);
    text-align: left;
}

.gama-nav-item:hover {
    background: var(--bg-app);
    color: var(--primary);
    transform: translateX(4px);
}

.gama-nav-item.active {
    background: var(--p-50);
    color: var(--primary);
}

.gama-nav-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.gama-nav-icon {
    font-size: 18px;
}

.gama-main-content {
    flex: 1;
    padding: 24px;
    max-width: 100%;
    margin: 0;
}

@media (max-width: 1024px) {
    .gama-app-container {
        flex-direction: column;
        margin-left: 0;
        width: 100%;
    }

    .gama-sidebar {
        width: 100%;
        height: auto;
        padding: 16px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .gama-brand {
        margin-bottom: 0;
    }

    .gama-nav-menu {
        flex-direction: row;
    }

    .gama-nav-label {
        display: none;
    }

    .gama-main-content {
        padding: 20px;
    }
}

/* Admin Header & Segmented Tabs */
.gama-admin-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.gama-page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    letter-spacing: -0.02em;
}

.gama-admin-tabs {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 12px;
    gap: 4px;
    border-bottom: none;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.gama-admin-tab {
    padding: 6px 16px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.gama-admin-tab:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.gama-admin-tab.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 112, 243, 0.3);
}


/* Edit/Delete Actions in Table */
.gama-btn-icon {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-right: 4px;
    color: var(--gama-text-muted);
    backdrop-filter: blur(4px);
    padding: 0;
}


.gama-edit-user-btn:hover,
.gama-edit-dept-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    color: #60a5fa;
    transform: translateY(-2px);
}

.gama-delete-user-btn:hover,
.gama-delete-dept-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #f87171;
    transform: translateY(-2px);
}

/* Light Mode Overrides for Buttons */
.light-mode .gama-btn-help {
    background: white;
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-secondary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.light-mode .gama-btn-help:hover {
    background: white;
    color: var(--primary);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.light-mode .gama-btn-icon {
    background: white;
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-secondary);
}

.light-mode .gama-edit-user-btn:hover {
    background: #eff6ff;
    color: #2563eb;
}

.light-mode .gama-delete-user-btn:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* Modal Form Styles Upgrade */
.gama-form-group input,
.gama-form-group select,
.gama-form-group textarea {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.gama-form-group input:focus,
.gama-form-group select:focus,
.gama-form-group textarea:focus {
    transform: translateY(-1px);
}

/* login.gamastg.pl - Premium Overhaul */
/* Modern Login Overhaul - Premium Light Mode @import "https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;800&display=swap"; */

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

.gama-login-container {
    min-height: 100vh;
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    margin: 0;
    background: #f8fafc;
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(245, 158, 11, 0.08) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(99, 102, 241, 0.08) 0px, transparent 50%);
    position: relative;
    overflow: hidden;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Background floating shapes */
.gama-login-container::before,
.gama-login-container::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.5;
    pointer-events: none;
}

.gama-login-container::before {
    width: 400px;
    height: 400px;
    background: rgba(99, 102, 241, 0.15);
    top: -100px;
    left: -100px;
    animation: floatShape 20s infinite alternate ease-in-out;
}

.gama-login-container::after {
    width: 300px;
    height: 300px;
    background: rgba(236, 72, 153, 0.15);
    bottom: -50px;
    right: -50px;
    animation: floatShape 25s infinite alternate-reverse ease-in-out;
}

@keyframes floatShape {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    100% {
        transform: translate(100px, 100px) scale(1.2) rotate(15deg);
    }
}

.gama-login-card {
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 40px;
    padding: 60px 48px;
    width: 100%;
    max-width: 460px;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.08),
        0 10px 20px -5px rgba(0, 0, 0, 0.04),
        inset 0 2px 4px rgba(255, 255, 255, 1);
    animation: loginCardEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 10;
}

@keyframes loginCardEntrance {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.gama-login-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    height: 10px;
    background: linear-gradient(90deg, #6366f1, #ec4899, #f59e0b);
    border-radius: 40px 40px 0 0;
}

.gama-login-header {
    text-align: center;
    margin-bottom: 40px;
}

.gama-login-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
}

.gama-logo-icon {
    font-size: 40px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gama-brand-logo {
    max-width: 150px;
    height: auto;
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
}

.light-mode .gama-brand-logo {
    filter: brightness(0);
}

.gama-login-header h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -2px;
    margin: 0 0 8px 0;
    color: #1e293b;
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gama-login-header p {
    color: #64748b;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

#gama-login-form p {
    margin-bottom: 24px;
}

#gama-login-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

#gama-login-form input[type="text"],
#gama-login-form input[type="password"] {
    width: 100%;
    padding: 14px 20px;
    border-radius: 16px;
    border: 1.5px solid #e2e8f0;
    background: #f1f5f9;
    font-size: 16px;
    color: #1e293b;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

#gama-login-form input:focus {
    background: #ffffff;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    outline: none;
    transform: translateY(-1px);
}

#gama-login-form .login-remember {
    margin: 24px 0;
}

#gama-login-form .login-remember label {
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-transform: none;
    letter-spacing: normal;
}

#gama-login-form input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1.5px solid #cbd5e1;
    background: #fff;
    cursor: pointer;
    appearance: none;
    position: relative;
    transition: all 0.2s;
}

#gama-login-form input[type="checkbox"]:checked {
    background: #6366f1;
    border-color: #6366f1;
}

#gama-login-form input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    left: 4px;
    top: 0;
}

#gama-login-form input[type="submit"] {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 8px;
}

#gama-login-form input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(99, 102, 241, 0.4);
    filter: brightness(1.05);
}

#gama-login-form input[type="submit"]:active {
    transform: translateY(0);
}

/* SSO Integration Styles */
.gama-login-card .gama-sso-separator {
    display: flex;
    align-items: center;
    margin: 30px 0;
    text-align: center;
}

.gama-login-card .gama-sso-separator::before,
.gama-login-card .gama-sso-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.gama-login-card .gama-sso-separator span {
    padding: 0 16px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gama-login-card .gama-sso-button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 20px;
    background: #f8fafc !important;
    color: #1e293b !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 16px !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

.gama-login-card .gama-sso-button:hover {
    background: #ffffff !important;
    border-color: #6366f1 !important;
    color: #6366f1 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.gama-login-card .gama-sso-button svg {
    stroke: #6366f1;
}

/* Error visibility */
.gama-login-card .gama-attendance-error {
    background: #fef2f2;
    border: 1px solid #fee2e2;
    color: #dc2626;
    margin-bottom: 24px;
    padding: 14px 18px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Responsive Overrides */
@media (max-width: 480px) {
    .gama-login-card {
        padding: 48px 24px;
        border-radius: 32px;
    }

    .gama-login-header h1 {
        font-size: 28px;
    }
}

.gama-login-card #nav,
.gama-login-card #backtoblog {
    display: none;
}

/* ===== SETTINGS TAB STYLES ===== */
.gama-settings-form {
    max-width: 900px;
}

.gama-settings-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 28px;
}

.gama-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 24px 0;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.gama-section-icon {
    font-size: 22px;
}

.gama-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

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

.gama-form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

/* Settings form specific input styling */
.gama-settings-form .gama-input {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    font-size: 15px;
    border-radius: 12px;
}

.gama-settings-form .gama-input[readonly] {
    background: rgba(255, 255, 255, 0.02);
    color: var(--gama-text-muted);
    cursor: not-allowed;
}

.gama-helper-text {
    font-size: 12px;
    color: var(--gama-text-muted);
    margin-top: 4px;
}

.gama-subtitle {
    color: var(--gama-text-muted);
    font-size: 15px;
    margin-top: 8px;
}

/* Radio Group Styles */
.gama-radio-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.gama-radio-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 140px;
}

.gama-radio-label:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--primary);
}

.gama-radio-label input[type="radio"] {
    display: none;
}

.gama-radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    position: relative;
    transition: all 0.2s ease;
}

.gama-radio-label input[type="radio"]:checked+.gama-radio-custom {
    border-color: var(--primary);
    background: var(--primary);
}

.gama-radio-label input[type="radio"]:checked+.gama-radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.gama-radio-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-main);
}

.gama-theme-preview {
    font-size: 20px;
}

/* Form Actions */
.gama-form-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.gama-btn-icon {
    margin-right: 8px;
}

.gama-status-message {
    font-size: 14px;
    color: var(--success);
}

.gama-status-message.error {
    color: var(--danger);
}

/* Responsive Settings */
@media (max-width: 768px) {
    .gama-form-grid {
        grid-template-columns: 1fr;
    }

    .gama-radio-group {
        flex-direction: column;
    }

    .gama-settings-section {
        padding: 20px;
    }
}

/* ===== TAB CONTENT VISIBILITY ===== */
.gama-tab-content {
    display: none;
}

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

/* ===== IMPROVED LIGHT MODE OVERRIDES ===== */
.light-mode .gama-attendance-dashboard,
.light-mode .gama-admin-panel {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.light-mode .gama-summary-card {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.light-mode .gama-calendar-day {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.06);
    color: #1e293b;
}

.light-mode .gama-calendar-day:hover {
    background: rgba(0, 112, 243, 0.08);
    border-color: rgba(0, 112, 243, 0.2);
}

.light-mode .gama-sidebar {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.08);
}

.light-mode .gama-nav-item {
    color: #475569;
}

.light-mode .gama-nav-item:hover,
.light-mode .gama-nav-item.active {
    background: rgba(0, 112, 243, 0.1);
    color: #0070F3;
}

.light-mode .gama-settings-section {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.08);
}

.light-mode .gama-input {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.12);
    color: #1e293b;
}

.light-mode .gama-input:focus {
    border-color: #0070F3;
    box-shadow: 0 0 0 3px rgba(0, 112, 243, 0.15);
}

.light-mode .gama-radio-label {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.08);
}

.light-mode .gama-radio-label:hover {
    background: rgba(0, 112, 243, 0.05);
}

.light-mode .gama-btn-help,
.light-mode .gama-btn-logout {
    background: rgba(0, 0, 0, 0.05);
    color: #475569;
}

.light-mode .gama-btn-help:hover,
.light-mode .gama-btn-logout:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1e293b;
}

.light-mode h1,
.light-mode h2,
.light-mode h3 {
    color: #0F172A;
}

.light-mode .gama-section-title {
    border-color: rgba(0, 0, 0, 0.08);
}

/* Light mode table styling */
.light-mode .gama-data-table th {
    background: rgba(0, 0, 0, 0.03);
    color: #475569;
}

.light-mode .gama-data-table td {
    color: #1e293b;
    border-color: rgba(0, 0, 0, 0.06);
}

.light-mode .gama-data-table tr:hover {
    background: rgba(0, 112, 243, 0.04);
}

/* Summary Card Values and Labels */
.light-mode .gama-card-value {
    color: #0F172A;
}

.light-mode .gama-card-label {
    color: #64748B;
}

.light-mode .gama-card-icon {
    background: rgba(0, 0, 0, 0.05);
}

/* Brand / Logo */
.light-mode .gama-brand span {
    color: #0F172A;
}

.light-mode .gama-logo-icon {
    background: linear-gradient(135deg, #0070F3 0%, #00C6FB 100%);
    color: white;
}

/* Calendar Navigation Buttons */
.light-mode .gama-calendar-nav button,
.light-mode .gama-calendar-header button,
.light-mode .gama-btn-icon-only {
    background: rgba(0, 0, 0, 0.05);
    color: #475569;
    border-color: rgba(0, 0, 0, 0.1);
}

.light-mode .gama-calendar-nav button:hover,
.light-mode .gama-calendar-header button:hover,
.light-mode .gama-btn-icon-only:hover {
    background: rgba(0, 112, 243, 0.1);
    color: #0070F3;
}

/* Calendar Title (Month/Year) */
.light-mode .gama-calendar-title,
.light-mode .gama-calendar-month {
    color: #0F172A;
}

/* Calendar Container */
.light-mode .gama-calendar-container {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* Calendar Day Names (Header) */
.light-mode .gama-calendar-weekday {
    color: #64748B;
}

/* Calendar Status Colors - Presence/Absence */
.light-mode .gama-day-present {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
    color: #047857 !important;
}

.light-mode .gama-day-absent {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #DC2626 !important;
}

.light-mode .gama-day-vacation,
.light-mode .gama-day-holiday {
    background: rgba(59, 130, 246, 0.15) !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
    color: #2563EB !important;
}

.light-mode .gama-day-sick {
    background: rgba(245, 158, 11, 0.15) !important;
    border-color: rgba(245, 158, 11, 0.4) !important;
    color: #D97706 !important;
}

.light-mode .gama-day-weekend {
    background: rgba(148, 163, 184, 0.1);
    color: #94A3B8;
}

/* Calendar Day Number */
.light-mode .gama-calendar-day-number {
    color: #334155;
}

/* Chart Styling */
.light-mode .gama-chart-container {
    background: rgba(255, 255, 255, 0.9);
}

.light-mode .gama-chart-title {
    color: #0F172A;
}

/* Donut/Pie Chart Labels */
.light-mode .gama-chart-label {
    color: #475569;
}

/* Legend */
.light-mode .gama-legend-item span {
    color: #475569;
}

/* Header Actions (Help, Logout buttons) */
.light-mode .gama-header-actions button,
.light-mode .gama-header-actions a {
    background: rgba(0, 0, 0, 0.05);
    color: #475569;
}

.light-mode .gama-header-actions button:hover,
.light-mode .gama-header-actions a:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #0F172A;
}

/* Summary Cards with specific status */
.light-mode .gama-card-present {
    background: rgba(16, 185, 129, 0.08);
    border-left-color: #10B981;
}

.light-mode .gama-card-absence {
    background: rgba(239, 68, 68, 0.08);
    border-left-color: #EF4444;
}

/* Stats/Metric boxes */
.light-mode .gama-stat-value,
.light-mode .gama-metric-value {
    color: #0F172A;
}

.light-mode .gama-stat-label,
.light-mode .gama-metric-label {
    color: #64748B;
}

/* Quick Actions Panel */
.light-mode .gama-quick-actions {
    background: rgba(255, 255, 255, 0.9);
}

/* Current time display */
.light-mode .gama-current-time {
    color: #0F172A;
}

/* ===== CRITICAL LIGHT MODE FIXES ===== */

/* Month Navigation Buttons */
.light-mode .gama-nav-btn {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.12);
    color: #475569;
}

.light-mode .gama-nav-btn:hover {
    background: rgba(0, 112, 243, 0.15);
    color: #0070F3;
    border-color: rgba(0, 112, 243, 0.3);
}

.light-mode .gama-nav-btn svg {
    color: inherit;
}

/* Month Title */
.light-mode .gama-month-title {
    color: #0F172A;
}

/* Calendar Day Names */
.light-mode .gama-calendar-day-name {
    color: #64748B;
}

.light-mode .gama-calendar-day-name.gama-weekend {
    color: #94A3B8;
}

/* Calendar Status Colors - Present */
.light-mode .gama-calendar-day.gama-status-present {
    background: rgba(16, 185, 129, 0.2) !important;
    color: #047857 !important;
    border-color: rgba(16, 185, 129, 0.5) !important;
}

/* Calendar Status Colors - Absence (General) */
.light-mode .gama-calendar-day.gama-status-absence {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #DC2626 !important;
    border-color: rgba(239, 68, 68, 0.5) !important;
}

/* Calendar Status Colors - Specific Absence Types */
.light-mode .gama-calendar-day[class*="gama-absence-"] {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #2563EB !important;
    border-color: rgba(59, 130, 246, 0.5) !important;
}

/* Vacation */
.light-mode .gama-calendar-day.gama-absence-vacation,
.light-mode .gama-calendar-day.gama-absence-urlop {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #1D4ED8 !important;
    border-color: rgba(59, 130, 246, 0.5) !important;
}

/* Sick Leave */
.light-mode .gama-calendar-day.gama-absence-sick,
.light-mode .gama-calendar-day.gama-absence-chorobowe {
    background: rgba(245, 158, 11, 0.2) !important;
    color: #B45309 !important;
    border-color: rgba(245, 158, 11, 0.5) !important;
}

/* Delegation / Business Trip */
.light-mode .gama-calendar-day.gama-absence-delegation,
.light-mode .gama-calendar-day.gama-absence-delegacja {
    background: rgba(139, 92, 246, 0.2) !important;
    color: #6D28D9 !important;
    border-color: rgba(139, 92, 246, 0.5) !important;
}

/* Home Office / Remote */
.light-mode .gama-calendar-day.gama-absence-remote,
.light-mode .gama-calendar-day.gama-absence-praca-zdalna {
    background: rgba(20, 184, 166, 0.2) !important;
    color: #0D9488 !important;
    border-color: rgba(20, 184, 166, 0.5) !important;
}

/* Calendar Status Colors - Weekend */
.light-mode .gama-calendar-day.gama-status-weekend {
    background: rgba(148, 163, 184, 0.08) !important;
    color: #94A3B8 !important;
    border-color: transparent !important;
}

/* Calendar Status Colors - No Data */
.light-mode .gama-calendar-day.gama-status-none {
    background: rgba(241, 245, 249, 0.6) !important;
    color: #94A3B8 !important;
    border-color: rgba(0, 0, 0, 0.05) !important;
}

/* Today Indicator */
.light-mode .gama-calendar-day.gama-today {
    box-shadow: 0 0 0 2px #0070F3, 0 0 12px rgba(0, 112, 243, 0.3) !important;
}

/* Legend */
.light-mode .gama-legend {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

.light-mode .gama-legend-item {
    color: #475569;
}

.light-mode .gama-legend-color.gama-status-none {
    border-color: #94A3B8;
}

/* Chart Container */
.light-mode #gama-month-chart {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    padding: 16px;
}

/* Donut/Pie Chart - Canvas styling via wrapper */
.light-mode .gama-chart-wrapper {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
}

/* Quick Actions Section */
.light-mode .gama-quick-actions-title,
.light-mode .gama-section-heading {
    color: #0F172A;
}

/* All buttons in light mode */
.light-mode button:not(.gama-btn-primary):not(.gama-btn-danger):not(.gama-nav-item) {
    color: #475569;
}

.light-mode button:not(.gama-btn-primary):not(.gama-btn-danger):hover {
    color: #0F172A;
}

/* ===== LIGHT MODE ABSENCE TYPES ===== */

/* Nieusprawiedliwiona (Unexcused) - RED */
.light-mode .gama-calendar-day.gama-absence-nieusprawiedliwiona {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #B91C1C !important;
    border-color: rgba(239, 68, 68, 0.5) !important;
}

/* Urlop Wypoczynkowy (Vacation) - BLUE */
.light-mode .gama-calendar-day.gama-absence-urlop-wypoczynkowy {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #1D4ED8 !important;
    border-color: rgba(59, 130, 246, 0.5) !important;
}

/* Urlop na żądanie (On Demand Leave) - INDIGO */
.light-mode .gama-calendar-day.gama-absence-urlop-na-zadanie {
    background: rgba(99, 102, 241, 0.2) !important;
    color: #4338CA !important;
    border-color: rgba(99, 102, 241, 0.5) !important;
}

/* Urlop Bezpłatny (Unpaid Leave) - GRAY */
.light-mode .gama-calendar-day.gama-absence-urlop-bezplatny {
    background: rgba(100, 116, 139, 0.2) !important;
    color: #475569 !important;
    border-color: rgba(100, 116, 139, 0.5) !important;
}

/* Urlop Okolicznościowy (Occasional Leave) - PURPLE */
.light-mode .gama-calendar-day.gama-absence-urlop-okolicznosciowy {
    background: rgba(168, 85, 247, 0.2) !important;
    color: #7C3AED !important;
    border-color: rgba(168, 85, 247, 0.5) !important;
}

/* Urlop Macierzyński (Maternity/Parental) - PINK */
.light-mode .gama-calendar-day.gama-absence-urlop-macierzynski {
    background: rgba(236, 72, 153, 0.2) !important;
    color: #BE185D !important;
    border-color: rgba(236, 72, 153, 0.5) !important;
}

/* Urlop Wychowawczy (Childcare Leave) - ROSE */
.light-mode .gama-calendar-day.gama-absence-urlop-wychowawczy {
    background: rgba(244, 63, 94, 0.2) !important;
    color: #E11D48 !important;
    border-color: rgba(244, 63, 94, 0.5) !important;
}

/* L4 - Zwolnienie Lekarskie (Sick Leave) - AMBER */
.light-mode .gama-calendar-day.gama-absence-l4 {
    background: rgba(245, 158, 11, 0.2) !important;
    color: #B45309 !important;
    border-color: rgba(245, 158, 11, 0.5) !important;
}

/* Opieka nad dzieckiem (Childcare Days) - ORANGE */
.light-mode .gama-calendar-day.gama-absence-opieka-nad-dzieckiem {
    background: rgba(249, 115, 22, 0.2) !important;
    color: #C2410C !important;
    border-color: rgba(249, 115, 22, 0.5) !important;
}

/* Opieka zasiłek (Care Allowance) - ORANGE-DARK */
.light-mode .gama-calendar-day.gama-absence-opieka-zasilek {
    background: rgba(234, 88, 12, 0.2) !important;
    color: #9A3412 !important;
    border-color: rgba(234, 88, 12, 0.5) !important;
}

/* Wezwanie sąd/urząd (Court/Office Summons) - SLATE */
.light-mode .gama-calendar-day.gama-absence-wezwanie-sad {
    background: rgba(71, 85, 105, 0.2) !important;
    color: #334155 !important;
    border-color: rgba(71, 85, 105, 0.5) !important;
}

/* Delegacja (Business Trip) - VIOLET */
.light-mode .gama-calendar-day.gama-absence-delegacja {
    background: rgba(139, 92, 246, 0.2) !important;
    color: #6D28D9 !important;
    border-color: rgba(139, 92, 246, 0.5) !important;
}

/* Praca Zdalna (Remote Work) - TEAL */
.light-mode .gama-calendar-day.gama-absence-praca-zdalna {
    background: rgba(20, 184, 166, 0.2) !important;
    color: #0D9488 !important;
    border-color: rgba(20, 184, 166, 0.5) !important;
}

/* Praca Hybrydowa (Hybrid Work) - CYAN */
.light-mode .gama-calendar-day.gama-absence-praca-hybrydowa {
    background: rgba(6, 182, 212, 0.2) !important;
    color: #0891B2 !important;
    border-color: rgba(6, 182, 212, 0.5) !important;
}

/* Holiday - Light Mode */
.light-mode .gama-calendar-day.gama-holiday {
    background: rgba(220, 38, 38, 0.15) !important;
    color: #B91C1C !important;
    border-color: rgba(220, 38, 38, 0.4) !important;
}

/* Weekend - Light Mode Better Visibility */
.light-mode .gama-calendar-day.gama-status-weekend {
    background: rgba(148, 163, 184, 0.12) !important;
    color: #64748B !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
}

.light-mode .gama-calendar-day.gama-status-weekend .gama-day-number {
    color: #94A3B8 !important;
}

/* ===== SEARCH FILTERS STYLING ===== */
.gama-search-filters {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: nowrap;
}

.gama-filter-group {
    position: relative;
}

.gama-dept-picker {
    min-width: 180px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gama-dept-picker:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.gama-dept-picker:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 112, 243, 0.2);
}

.gama-dept-picker option {
    background: #1e293b;
    color: white;
}

/* Light mode department picker */
.light-mode .gama-dept-picker {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.12);
    color: #1e293b;
}

.light-mode .gama-dept-picker:hover {
    background: white;
    border-color: rgba(0, 0, 0, 0.2);
}

.light-mode .gama-dept-picker option {
    background: white;
    color: #1e293b;
}

/* Enhanced dropdown styling */
.gama-dropdown-my-view {
    background: rgba(0, 112, 243, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

.gama-emp-dept {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.light-mode .gama-emp-dept {
    background: rgba(0, 0, 0, 0.06);
    color: #64748B;
}

.light-mode .gama-dropdown-my-view {
    background: rgba(0, 112, 243, 0.08);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

/* User switcher label */
.gama-user-switcher>label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.light-mode .gama-user-switcher>label {
    color: #64748B;
}

/* Responsive */
@media (max-width: 768px) {
    .gama-search-filters {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .gama-dept-picker {
        width: 100%;
    }
}

/* ===== VIEWING EMPLOYEE BANNER ===== */
.gama-viewing-employee {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(99, 102, 241, 0.12) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    color: #93c5fd;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.gama-viewing-employee .gama-viewing-icon {
    font-size: 20px;
}

.gama-viewing-employee strong {
    color: #60a5fa;
    font-weight: 700;
}

/* Light mode */
.light-mode .gama-viewing-employee {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(99, 102, 241, 0.08) 100%);
    border-color: rgba(59, 130, 246, 0.25);
    color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.light-mode .gama-viewing-employee strong {
    color: #1d4ed8;
}

/* Standardized Cards (Admin & General) */
.gama-card {
    background: var(--surface);
    backdrop-filter: blur(var(--glass-blur));
    border-radius: var(--radius);
    padding: var(--gap-3);
    margin-bottom: var(--gap-3);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.gama-card:hover {
    border-color: var(--primary);
}

.gama-card h2 {
    margin-top: 0;
    padding-bottom: var(--gap-1);
    border-bottom: 1px solid var(--border-light);
    color: var(--text-main);
    font-size: 18px;
    font-weight: 700;
}

/* Status Badges */
.gama-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
}

.gama-status-ok {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.gama-status-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.gama-form-section {
    margin-bottom: var(--gap-4);
}

/* Skeleton Loaders */
.gama-skeleton {
    background: linear-gradient(90deg,
            var(--surface) 25%,
            var(--surface-elevated) 50%,
            var(--surface) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
    display: block;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.gama-skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
    width: 100%;
}

.gama-skeleton-title {
    height: 1.5em;
    margin-bottom: 1em;
    width: 60%;
}

.gama-skeleton-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* Calendar Refinements */
.gama-calendar-day {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.gama-calendar-day:hover:not(.gama-empty) {
    transform: scale(1.05) translateY(-2px);
    z-index: 10;
    box-shadow: var(--shadow-lg);
}

.gama-calendar-day::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: var(--bg);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-premium);
    z-index: 100;
}

.gama-calendar-day:hover[data-tooltip]::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-12px);
}

/* Toast Notifications */
.gama-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gama-toast {
    background: var(--surface-elevated);
    backdrop-filter: blur(20px);
    padding: 12px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-premium);
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: toast-slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toast-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.gama-toast-success {
    border-left: 4px solid var(--success);
}

.gama-toast-error {
    border-left: 4px solid var(--danger);
}

.gama-toast-warning {
    border-left: 4px solid var(--warning);
}

.gama-mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.05);
    border-top: 1px solid var(--border);
    padding: 12px 0;
    justify-content: space-around;
    z-index: 10000;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

@media (max-width: 768px) {
    .gama-mobile-nav {
        display: flex;
    }
}

.gama-mobile-nav-item {
    background: none;
    border: none;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.gama-mobile-nav-item.active {
    color: var(--primary);
}

.gama-mobile-nav-item i {
    width: 20px;
    height: 20px;
}

/* ===== GLOBAL BOX-SIZING & OVERFLOW FIX ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

.gama-app-container,
.gama-attendance-dashboard,
.gama-admin-panel,
.gama-login-container,
.gama-main-content {
    max-width: 100vw;
    overflow-x: hidden;
}

/* ===== WP ADMIN SETTINGS - BASE FIXES ===== */
.gama-admin-wrap {
    box-sizing: border-box;
    overflow-x: hidden;
}

.gama-settings-container {
    max-width: 100%;
    box-sizing: border-box;
}

.gama-settings-container .gama-card {
    box-sizing: border-box;
    overflow: hidden;
    max-width: 100%;
}

/* Access mode cards */
.gama-access-mode-cards {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.gama-access-card {
    box-sizing: border-box;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* WP form-table fixes */
.gama-settings-container .form-table {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
}

.gama-settings-container .form-table th,
.gama-settings-container .form-table td {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.gama-settings-container .form-table textarea.large-text {
    max-width: 100%;
    box-sizing: border-box;
}

.gama-settings-container .form-table code {
    word-break: break-all;
}

.gama-settings-container .wp-list-table {
    width: 100%;
    max-width: 100%;
}

.gama-settings-container select.regular-text,
.gama-settings-container select {
    max-width: 100%;
    box-sizing: border-box;
}

/* ============================================================
   RESPONSIVE: 768px — TABLETS & PHONES
   ============================================================ */
@media (max-width: 768px) {

    /* ---- GLOBAL LAYOUT ---- */
    .gama-app-container {
        flex-direction: column !important;
        margin-left: 0 !important;
        width: 100% !important;
    }

    .gama-sidebar {
        width: 100% !important;
        height: auto !important;
        padding: 12px 16px !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        border-right: none !important;
        border-bottom: 1px solid var(--border) !important;
    }

    .gama-brand {
        margin-bottom: 0 !important;
        padding: 0 8px !important;
    }

    .gama-brand-logo {
        max-width: 100px;
    }

    .gama-nav-menu {
        flex-direction: row !important;
        gap: 4px !important;
    }

    .gama-nav-label {
        display: none !important;
    }

    .gama-nav-item {
        padding: 8px 12px !important;
        margin: 0 !important;
        width: auto !important;
    }

    .gama-main-content {
        padding: 12px !important;
        min-width: 0 !important;
    }

    /* ---- DASHBOARD PANELS ---- */
    .gama-attendance-dashboard,
    .gama-admin-panel {
        padding: 16px !important;
        margin: 8px auto !important;
        width: 100% !important;
        border-radius: 16px !important;
    }

    /* ---- DASHBOARD HEADER ---- */
    .gama-dashboard-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }

    .gama-header-content h1 {
        font-size: 22px !important;
        letter-spacing: -0.5px !important;
    }

    .gama-header-actions {
        width: 100% !important;
        justify-content: space-between !important;
    }

    .gama-btn-help,
    .gama-btn-logout {
        flex: 1 !important;
        justify-content: center !important;
        padding: 10px 12px !important;
        font-size: 13px !important;
    }

    .gama-btn-help span,
    .gama-btn-logout span {
        display: none;
    }

    .gama-btn-help svg,
    .gama-btn-logout svg {
        width: 20px !important;
        height: 20px !important;
    }

    /* ---- USER SWITCHER / SEARCH ---- */
    .gama-user-switcher {
        width: 100%;
    }

    .gama-search-filters {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 8px !important;
    }

    .gama-search-dropdown {
        width: 100% !important;
        margin-right: 0 !important;
    }

    .gama-dept-picker {
        width: 100% !important;
        min-width: 0 !important;
    }

    #gama-user-search {
        width: 100% !important;
    }

    /* ---- CHECKIN CARD ---- */
    .gama-checkin-card {
        padding: 20px 16px !important;
    }

    .gama-checkin-button {
        width: 100%;
        justify-content: center;
    }

    .gama-checkin-success {
        flex-direction: column !important;
        text-align: center !important;
        gap: 12px !important;
    }

    .gama-checkin-info h2 {
        font-size: 20px !important;
    }

    /* ---- MONTH NAVIGATION ---- */
    .gama-month-nav {
        gap: 12px !important;
    }

    .gama-month-title {
        font-size: 18px !important;
        min-width: 0 !important;
    }

    .gama-nav-btn {
        width: 38px !important;
        height: 38px !important;
    }

    /* ---- SUMMARY CARDS ---- */
    .gama-summary-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        margin-bottom: 20px !important;
    }

    #gama-month-chart-card {
        grid-column: span 1 !important;
        padding: 20px 12px !important;
        min-height: 300px !important;
    }

    .gama-summary-card {
        padding: 16px !important;
    }

    .gama-chart-container {
        width: 200px !important;
        height: 200px !important;
    }

    .gama-chart-legend-items {
        gap: 12px !important;
    }

    .gama-chart-totals-footer {
        flex-direction: column;
        gap: 8px !important;
        text-align: center;
    }

    /* ---- CALENDAR ---- */
    .gama-calendar-container {
        padding: 12px !important;
        border-radius: 16px !important;
        margin-bottom: 16px !important;
    }

    .gama-calendar-header {
        gap: 4px !important;
        margin-bottom: 8px !important;
    }

    .gama-calendar-day-name {
        font-size: 10px !important;
        padding: 6px 0 !important;
        letter-spacing: 0 !important;
    }

    .gama-calendar-grid {
        gap: 4px !important;
    }

    .gama-calendar-day {
        border-radius: 8px !important;
        font-size: 12px !important;
    }

    .gama-day-number {
        font-size: 12px !important;
    }

    .gama-day-status {
        font-size: 8px !important;
    }

    /* Calendar tooltips hidden on mobile (touch unfriendly) */
    .gama-calendar-day::after {
        display: none !important;
    }

    /* ---- LEGEND ---- */
    .gama-legend {
        flex-wrap: wrap;
        gap: 8px !important;
    }

    .gama-legend-item {
        font-size: 12px;
    }

    /* ---- MODAL ---- */
    .gama-modal-content {
        width: 95% !important;
        max-width: 95vw !important;
        padding: 16px !important;
        margin: 8px auto !important;
        border-radius: 16px !important;
    }

    /* ---- TOAST ---- */
    .gama-toast-container {
        left: 8px !important;
        right: 8px !important;
        top: 8px !important;
    }

    .gama-toast {
        min-width: 0 !important;
        width: 100% !important;
    }

    /* ---- LOGIN SCREEN ---- */
    .gama-login-container {
        padding: 16px !important;
    }

    .gama-login-card {
        padding: 40px 24px !important;
        border-radius: 28px !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .gama-login-logo {
        width: 64px !important;
        height: 64px !important;
        border-radius: 18px !important;
    }

    .gama-login-header {
        margin-bottom: 28px !important;
    }

    .gama-login-header h1 {
        font-size: 26px !important;
        letter-spacing: -1px !important;
    }

    .gama-login-header p {
        font-size: 14px !important;
    }

    #gama-login-form input[type="text"],
    #gama-login-form input[type="password"] {
        padding: 12px 16px !important;
        font-size: 16px !important;
        /* prevents iOS zoom */
    }

    #gama-login-form input[type="submit"] {
        padding: 14px !important;
        font-size: 15px !important;
    }

    .gama-login-card .gama-sso-button {
        padding: 12px 16px !important;
        font-size: 14px !important;
    }

    /* ---- SETTINGS TAB (in-app) ---- */
    .gama-settings-form {
        max-width: 100% !important;
    }

    .gama-settings-section {
        padding: 16px !important;
        border-radius: 14px !important;
    }

    .gama-section-title {
        font-size: 16px !important;
    }

    .gama-form-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .gama-radio-group {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .gama-radio-label {
        min-width: 0 !important;
    }

    .gama-form-actions {
        flex-direction: column;
        gap: 12px;
    }

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

    /* ---- WP ADMIN SETTINGS ---- */
    .gama-admin-wrap {
        margin-right: 0 !important;
        padding: 0 8px !important;
    }

    .gama-admin-wrap>h1 {
        font-size: 20px !important;
        margin-bottom: 12px !important;
    }

    .gama-settings-container .gama-card {
        padding: 16px !important;
        border-radius: 12px !important;
        margin-bottom: 16px !important;
    }

    .gama-settings-container .gama-card h2 {
        font-size: 16px !important;
    }

    .gama-settings-container .gama-card h3 {
        font-size: 14px !important;
    }

    .gama-access-mode-cards {
        flex-direction: column !important;
        gap: 12px !important;
    }

    .gama-access-card {
        padding: 16px !important;
    }

    .gama-settings-container .form-table,
    .gama-settings-container .form-table tbody,
    .gama-settings-container .form-table tr,
    .gama-settings-container .form-table th,
    .gama-settings-container .form-table td {
        display: block !important;
        width: 100% !important;
    }

    .gama-settings-container .form-table th {
        padding: 12px 0 4px 0 !important;
        font-weight: 700;
    }

    .gama-settings-container .form-table td {
        padding: 4px 0 12px 0 !important;
    }

    .gama-settings-container .wp-list-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .gama-settings-container .wp-list-table thead,
    .gama-settings-container .wp-list-table tbody,
    .gama-settings-container .wp-list-table tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }

    .gama-settings-container .wp-list-table th,
    .gama-settings-container .wp-list-table td {
        font-size: 13px;
        padding: 8px 6px;
    }

    .gama-settings-container select.regular-text {
        width: 100%;
    }

    .gama-settings-container textarea.large-text {
        width: 100% !important;
        font-size: 14px;
    }

    .gama-settings-container .submit .button {
        width: 100%;
        text-align: center;
        padding: 10px 20px;
    }

    .gama-settings-container .description {
        font-size: 12px;
        line-height: 1.5;
    }

    /* ---- ADMIN PANEL TAB ---- */
    .gama-admin-header-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }

    .gama-segmented-tabs {
        width: 100% !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .gama-table-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .gama-quick-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .gama-filters {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    /* ---- VIEWING EMPLOYEE BANNER ---- */
    .gama-viewing-employee {
        font-size: 13px !important;
        padding: 10px 14px !important;
    }
}

/* ============================================================
   RESPONSIVE: 480px — SMALL PHONES
   ============================================================ */
@media (max-width: 480px) {

    .gama-main-content {
        padding: 8px !important;
    }

    .gama-attendance-dashboard,
    .gama-admin-panel {
        padding: 12px !important;
        border-radius: 12px !important;
    }

    .gama-header-content h1 {
        font-size: 18px !important;
    }

    .gama-btn-help,
    .gama-btn-logout {
        padding: 8px 10px !important;
    }

    /* Calendar ultra-compact */
    .gama-calendar-container {
        padding: 8px !important;
        border-radius: 12px !important;
    }

    .gama-calendar-header {
        gap: 2px !important;
    }

    .gama-calendar-grid {
        gap: 2px !important;
    }

    .gama-calendar-day {
        border-radius: 6px !important;
        font-size: 11px !important;
        aspect-ratio: auto !important;
        min-height: 36px;
    }

    .gama-day-number {
        font-size: 11px !important;
    }

    .gama-day-status {
        display: none !important;
    }

    .gama-calendar-day-name {
        font-size: 9px !important;
    }

    .gama-checkin-card {
        padding: 16px 12px !important;
    }

    .gama-button-title {
        font-size: 15px !important;
    }

    .gama-button-subtitle {
        font-size: 11px !important;
    }

    .gama-month-title {
        font-size: 16px !important;
    }

    /* Login */
    .gama-login-card {
        padding: 32px 16px !important;
        border-radius: 24px !important;
    }

    .gama-login-header h1 {
        font-size: 22px !important;
    }

    .gama-login-logo {
        width: 56px !important;
        height: 56px !important;
    }

    /* Summary */
    .gama-summary-card {
        padding: 12px !important;
    }

    .gama-card-value {
        font-size: 22px !important;
    }

    .gama-card-label {
        font-size: 11px !important;
    }

    .gama-chart-container {
        width: 160px !important;
        height: 160px !important;
    }

    .gama-pct-value {
        font-size: 22px !important;
    }

    /* Admin settings */
    .gama-admin-wrap {
        padding: 0 4px !important;
    }

    .gama-admin-wrap>h1 {
        font-size: 18px !important;
    }

    .gama-settings-container .gama-card {
        padding: 12px !important;
        border-radius: 10px !important;
    }

    .gama-access-card {
        padding: 12px !important;
        border-radius: 10px !important;
    }

    .gama-settings-section {
        padding: 12px !important;
        border-radius: 12px !important;
    }
}