/* ── GLOBAL VARIABLES ────────────────────────────────────────
   Define colors and values once here, use everywhere.
   Change color in one place = change throughout application */
:root {
    --bg: #080b14;
    --bg-card: #0d1120;
    --bg-sidebar: #090d1a;
    --bg-input: #131825;
    --border: #1c2338;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text: #e2e8f0;
    --text-muted: #64748b;
    --radius: 12px;
    --shadow: 0 4px 32px rgba(0,0,0,0.6);
}

/* ── RESET AND BASICS ─────────────────────────────────────────
   Remove default browser styles that differ between
   Chrome, Firefox and Edge */
*, *::before, *::after {
    box-sizing: border-box; /* padding doesn't expand element beyond its width */
    margin: 0;
    padding: 0;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

/* Syne font only for headings */
h1, h2, h3, .brand-icon {
    font-family: 'Syne', sans-serif;
}

/* ── STRONA LOGOWANIA ───────────────────────────────────────*/

/* Flexbox centruje kartę logowania na środku ekranu */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    /* Subtle gradient background instead of flat color */
    background: radial-gradient(ellipse at 60% 20%, #0f1e40 0%, #080b14 60%);
}

.login-container {
    background: var(--bg-card);
    border: 1px solid rgba(59,130,246,0.25);
    border-radius: 20px;
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow:
        0 4px 48px rgba(0,0,0,0.7),
        0 0 0 1px rgba(255,255,255,0.04) inset,
        0 0 60px rgba(59,130,246,0.1),
        0 0 120px rgba(59,130,246,0.05);
    animation: fadeUp 0.5s ease;
}

.login-lang-picker {
    position: fixed;
    top: 20px;
    right: 24px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.login-flag-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 10px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, color .15s;
}

.login-flag-btn svg {
    border-radius: 2px;
    display: block;
    flex-shrink: 0;
}

.login-flag-btn:hover { border-color: var(--accent); color: var(--text); }
.login-flag-btn.active { border-color: var(--accent); color: var(--accent); }

.login-brand {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 90px;
    overflow: hidden;
    margin-bottom: 16px;
}

.login-logo-img {
    max-width: 300px;
    width: 100%;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
    margin-top: -8px;
    margin-bottom: 28px;
    letter-spacing: 0.03em;
}

/* ── FORMULARZE ─────────────────────────────────────────────*/

.login-form {
    display: flex;
    flex-direction: column; /* elementy jeden pod drugim */
    gap: 20px;              /* odstęp między elementami */
}

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

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

.form-group input,
.form-group select,
.form-group textarea,
.manage-add-panel input[type="text"],
.manage-add-panel input[type="tel"],
.manage-add-panel input[type="email"] {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    transition: border-color 0.2s;
    outline: none;
}

/* Highlight field when user is typing */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.manage-add-panel input:focus {
    border-color: var(--accent);
}

/* ── PRZYCISKI ──────────────────────────────────────────────*/

.btn-primary {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    padding: 13px 24px;
    font-family: 'Syne', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    width: 100%;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px); /* gentle lift on hover */
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 20px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.btn-secondary:hover {
    border-color: var(--accent);
    background: rgba(59,130,246, 0.08);
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
    border-radius: var(--radius);
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ── KOMUNIKAT BŁĘDU ────────────────────────────────────────*/

.error-msg {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 14px;
}

/* ── LAYOUT DASHBOARDU ──────────────────────────────────────*/

/* CSS Grid dzieli ekran na dwie kolumny: wąski sidebar i główna treść */
.app-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

/* ── SIDEBAR (left navigation panel) ────────────────────────*/

.sidebar {
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 0 0 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
    height: 70px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo-img {
    max-width: 180px;
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.brand-shark-text {
    font-family: 'Syne', sans-serif;
    font-size: 17px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.04em;
}

.brand-sep {
    font-family: 'Syne', sans-serif;
    font-size: 17px;
    font-weight: 300;
    color: #3b82f6;
    margin: 0 3px;
    opacity: 0.85;
}

.brand-flow-text {
    font-family: 'Syne', sans-serif;
    font-size: 17px;
    font-weight: 800;
    background: linear-gradient(135deg, #93c5fd, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.04em;
}

/* Login page — większy rozmiar tekstu logo */
.login-brand-text .brand-shark-text,
.login-brand-text .brand-sep,
.login-brand-text .brand-flow-text {
    font-size: 34px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    background: rgba(59,130,246,0.06);
    border: 1px solid var(--border);
    margin-bottom: 4px;
}

.sidebar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Syne', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.sidebar-user-info { min-width: 0; }

.sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 11px;
    color: var(--text-muted);
}

/* Single link in sidebar */
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.nav-item:hover {
    background: rgba(59,130,246,0.08);
    color: var(--text);
}

.nav-item.active {
    background: rgba(59,130,246,0.15);
    color: var(--accent);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--accent);
    animation: navGlow 3s ease-in-out infinite;
}

/* Logout button — red and rounded */
.logout-btn {
    background: var(--danger) !important;
    color: white !important;
    border-radius: 50px !important;
    margin-top: 16px;
}

.logout-btn:hover {
    background: #dc2626 !important;
    color: white !important;
}

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

/* Push logout button to the very bottom of sidebar */
.sidebar-spacer { flex: 1; }

/* ── GŁÓWNA TREŚĆ ───────────────────────────────────────────*/

.main-content {
    padding: 32px;
    overflow-y: auto;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.page-title {
    font-size: 24px;
    font-weight: 800;
    font-family: 'Syne', sans-serif;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.page-title.active {
    background: linear-gradient(135deg, var(--text) 0%, var(--accent) 45%, #93c5fd 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s ease infinite;
}

/* ── KARTY ──────────────────────────────────────────────────*/

.card {
    background: var(--bg-card);
    border: 1px solid rgba(59,130,246,0.35);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow:
        0 4px 32px rgba(0,0,0,0.5),
        0 0 0 1px rgba(255,255,255,0.06) inset,
        0 0 30px rgba(59,130,246,0.18),
        0 0 80px rgba(59,130,246,0.10),
        0 0 140px rgba(59,130,246,0.06);
}

/* ── KALENDARZ ──────────────────────────────────────────────*/

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.calendar-nav h2 {
    font-size: 20px;
    font-weight: 700;
    min-width: 200px;
    text-align: center;
}

/* Calendar grid — 7 columns (days of week) */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

/* Week day headers (Mon, Tue, Wed...) */
.calendar-day-header {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 8px 0;
    letter-spacing: 0.05em;
}

/* Single day in calendar */
.calendar-day {
    height: 100px;
    overflow: hidden;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s, background 0.2s;
}

.calendar-day:hover {
    border-color: var(--accent);
    background: rgba(59,130,246, 0.07);
    box-shadow: 0 0 0 1px rgba(59,130,246,0.2), 0 4px 16px rgba(59,130,246,0.12);
    transform: translateY(-1px);
}

/* Day from different month — dimmed */
.calendar-day.other-month {
    opacity: 0.3;
}

/* Today's day — highlighted */
.calendar-day.today {
    border-color: var(--accent);
    background: rgba(59,130,246, 0.08);
}

.day-number {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.calendar-day.today .day-number {
    color: var(--accent);
}

/* Shift tile inside day */
.shift-chip {
    background: rgba(59,130,246, 0.2);
    border: 1px solid rgba(59,130,246, 0.4);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 11px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* "..." when text is too long */
    color: var(--accent);
}

/* "+N more" badge in calendar cell */
.shift-chip-more {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 1px 5px;
    margin-top: 1px;
}

/* ── ANNOUNCEMENTS ──────────────────────────────────*/

.announcement-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px 26px;
    margin-bottom: 16px;
    transition: border-color 0.2s;
}

.announcement-card:hover {
    border-color: var(--accent);
}

.announcement-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.announcement-title {
    font-family: 'Syne', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.announcement-content {
    font-size: 14px;
    color: var(--text);
    line-height: 1.75;
    white-space: pre-wrap;
    margin: 0 0 16px;
}

.announcement-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

/* ── DEPARTMENT TABS ────────────────────────────────*/

.dept-tabs {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.dept-tab {
    padding: 7px 18px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.dept-tab:hover {
    border-color: var(--accent);
    color: var(--text);
}

.dept-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 600;
}

.dept-more-wrap {
    position: relative;
}

.dept-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.dept-more-dots {
    font-size: 18px;
    letter-spacing: 1px;
    line-height: 1;
    margin-top: -2px;
}

.dept-more-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.dept-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 5px;
    min-width: 170px;
    z-index: 60;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.04) inset;
    opacity: 0;
    transform: translateY(-10px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    transform-origin: top left;
}

.dept-more-wrap.open .dept-dropdown {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.dept-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: var(--text-muted);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, color 0.15s;
}

.dept-dropdown-item:hover {
    background: var(--bg-input);
    color: var(--text);
}

.dept-dropdown-item.active {
    color: var(--accent);
    font-weight: 600;
}

.dept-dd-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── CUSTOM DATEPICKER ──────────────────────────────*/

.dp-input-wrap {
    display: flex;
    align-items: stretch;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s;
}

.dp-input-wrap:focus-within {
    border-color: var(--accent);
}

.dp-input-wrap input.dp-input {
    flex: 1;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 12px 16px;
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    outline: none;
    cursor: pointer;
}

.dp-trigger {
    background: none;
    border: none;
    border-left: 1px solid var(--border);
    padding: 0 14px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color 0.2s, background 0.2s;
}

.dp-trigger:hover {
    color: var(--accent);
    background: rgba(59,130,246, 0.08);
}

.dp-popup {
    position: fixed;
    z-index: 300;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
    width: 272px;
    display: none;
    animation: fadeUp 0.2s ease;
}

.dp-popup.active {
    display: block;
}

.dp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.dp-month-title {
    font-family: 'Syne', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.dp-nav-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, color 0.2s;
}

.dp-nav-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.dp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 4px;
}

.dp-weekdays span {
    text-align: center;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 4px 0;
    letter-spacing: 0.04em;
}

.dp-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.dp-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text);
    background: none;
    border: 1px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    font-family: 'DM Sans', sans-serif;
}

.dp-day:hover {
    background: rgba(59,130,246, 0.15);
    color: var(--accent);
}

.dp-day.today {
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
}

.dp-day.selected {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    font-weight: 600;
}

.dp-day.other-month {
    color: var(--text-muted);
    opacity: 0.35;
    pointer-events: none;
}

/* ── CUSTOM TIMEPICKER ──────────────────────────────*/

.tp-popup {
    position: fixed;
    z-index: 300;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
    width: 300px;
    display: none;
    animation: fadeUp 0.2s ease;
}

.tp-popup.active { display: block; }

.tp-display {
    font-family: 'Syne', sans-serif;
    font-size: 30px;
    font-weight: 800;
    color: var(--accent);
    text-align: center;
    letter-spacing: 0.08em;
    background: rgba(59,130,246, 0.08);
    border-radius: 10px;
    padding: 8px 0;
    margin-bottom: 14px;
    font-variant-numeric: tabular-nums lining-nums;
    font-feature-settings: "tnum";
}

.tp-body {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    gap: 10px;
    align-items: start;
}

.tp-divider {
    background: var(--border);
    align-self: stretch;
}

.tp-col-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    margin-bottom: 6px;
}

.tp-grid-hours {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
}

.tp-grid-mins {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}

.tp-cell {
    padding: 6px 4px;
    text-align: center;
    font-size: 12px;
    font-family: 'DM Sans', sans-serif;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text);
    background: none;
    border: 1px solid transparent;
    transition: background 0.15s, color 0.15s;
}

.tp-cell:hover {
    background: rgba(59,130,246, 0.15);
    color: var(--accent);
}

.tp-cell.selected {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
}

/* ── COLOR SWATCH PICKER ────────────────────────────*/

.color-swatch-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    flex-shrink: 0;
    outline: none;
}

.color-swatch:hover {
    transform: scale(1.2);
}

.color-swatch.selected {
    border-color: #fff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
    transform: scale(1.15);
}

/* ── DAY DETAIL MODAL ───────────────────────────────*/

.modal-day {
    max-width: 520px;
}

.day-modal-list {
    max-height: 360px;
    overflow-y: auto;
}

.day-shift-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.day-shift-row:last-child {
    border-bottom: none;
}

.day-shift-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.day-shift-indicator {
    width: 4px;
    height: 36px;
    border-radius: 2px;
    flex-shrink: 0;
}

.day-shift-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}

.day-shift-time {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.day-pos-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid;
}

.day-shift-note {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
}

.day-colleagues-header {
    margin: 16px 0 8px;
    padding: 6px 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

/* ── EMPLOYEE TABLE ───────────────────────────────*/

.table {
    width: 100%;
    border-collapse: collapse; /* remove spacing between cells */
    font-size: 14px;
}

.table th {
    text-align: left;
    padding: 12px 16px;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

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

.table tr:hover td {
    background: rgba(255,255,255,0.02);
}

/* ── EMPLOYEE LABELS ──────────────────────────────────*/

/* Colored label e.g. "Operator" — color set dynamically by JS */
.label-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(59,130,246, 0.15);
    color: var(--accent);
}

/* ── STATUS PRÓŚB ───────────────────────────────────────────*/

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending  { background: rgba(245,158,11,0.15); color: var(--warning); border: 1px solid rgba(245,158,11,0.25); }
.status-approved { background: rgba(34,197,94,0.15);  color: var(--success); border: 1px solid rgba(34,197,94,0.25);  }
.status-rejected { background: rgba(239,68,68,0.15);  color: var(--danger);  border: 1px solid rgba(239,68,68,0.25);  }

/* ── REQUESTS ────────────────────────────────────────*/

.req-card {
    display: flex;
    background: var(--bg-card);
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 12px;
    transition: border-color 0.2s;
    box-shadow:
        0 2px 16px rgba(0,0,0,0.4),
        0 0 0 1px rgba(255,255,255,0.04) inset,
        0 0 24px rgba(59,130,246,0.08);
}

.req-card:hover {
    border-color: var(--accent);
}

.req-card-stripe {
    width: 4px;
    flex-shrink: 0;
}

.req-card-body {
    flex: 1;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.req-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.req-type-icon {
    display: inline-flex;
    align-items: center;
    margin-right: 7px;
    opacity: 0.75;
    vertical-align: middle;
}

.req-card-type {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.req-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.req-card-emp {
    font-weight: 600;
    color: var(--text);
}

.req-card-dates {
    display: flex;
    align-items: center;
    gap: 5px;
}

.req-card-days {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 2px;
}

.req-card-reason {
    font-style: italic;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 360px;
}

.req-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.req-action-btn {
    padding: 5px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    position: relative;
    overflow: hidden;
}

.req-card-times {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1px 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}

.req-time-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.req-time-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.req-time-row .form-group {
    flex: 1;
    min-width: 0;
}

.req-time-row .dp-input-wrap input.dp-input {
    padding: 10px 8px;
    min-width: 0;
    width: 0;
}

.req-time-arrow {
    color: var(--text-muted);
    font-size: 16px;
    padding-bottom: 10px;
    flex-shrink: 0;
}

.req-action-btn:hover { background: var(--bg-input); color: var(--text); border-color: var(--accent); }
.req-approve-btn { border-color: rgba(34,197,94,0.35); color: var(--success); }
.req-approve-btn:hover { background: rgba(34,197,94,0.12); border-color: var(--success); }
.req-reject-btn  { border-color: rgba(239,68,68,0.35);  color: var(--danger); }
.req-reject-btn:hover  { background: rgba(239,68,68,0.12);  border-color: var(--danger); }

/* Request detail modal */
.req-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-radius: 10px;
    border: 1px solid;
    margin-bottom: 20px;
}

.req-detail-type {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.req-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 8px;
}

.req-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.req-detail-value {
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
}

/* ── MODAL (dialog box) ─────────────────────────────*/

/* Dark background behind modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 100;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 24px 16px;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease both;
}

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

.modal {
    background: var(--bg-card);
    border: 1px solid rgba(59,130,246,0.25);
    border-radius: 20px;
    padding: 32px;
    width: 100%;
    max-width: 480px;
    margin: auto;
    box-shadow:
        0 4px 32px rgba(0,0,0,0.6),
        0 0 0 1px rgba(255,255,255,0.04) inset,
        0 0 40px rgba(59,130,246,0.08),
        0 0 80px rgba(59,130,246,0.04);
    animation: modalEnter 0.38s cubic-bezier(0.34, 1.42, 0.64, 1) both;
}

@keyframes modalEnter {
    from { opacity: 0; transform: translateY(24px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.modal-wide {
    max-width: 700px;
    width: 95vw;
}

.modal-xl {
    max-width: 960px;
    width: 96vw;
}

/* ── EMPLOYEE SCHEDULE MODAL ───────────────────────────────── */
.emp-sched-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.emp-sched-identity {
    display: flex;
    align-items: center;
    gap: 14px;
}

.emp-sched-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, #6366f1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #fff;
    flex-shrink: 0;
}

.emp-sched-name {
    font-family: 'Syne', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.emp-sched-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.emp-sched-stats-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.emp-sched-stat {
    flex: 1;
    min-width: 100px;
    background: var(--bg-secondary, var(--bg-input));
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
}

.emp-sched-stat-val {
    font-family: 'Syne', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
    font-variant-numeric: tabular-nums lining-nums;
}

.emp-sched-stat-lbl {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.emp-sched-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.emp-sched-month-title {
    font-family: 'Syne', sans-serif;
    font-size: 16px;
    font-weight: 700;
    min-width: 180px;
    text-align: center;
    color: var(--text);
}

.emp-sched-nav-btn {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.emp-sched-nav-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.emp-sched-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 16px;
}

.emp-sched-day-header {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 6px 0;
}

.emp-sched-cell {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    transition: border-color 0.15s;
}

.emp-sched-cell.other-month {
    background: transparent;
    border-color: transparent;
}

.emp-sched-cell.today {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent)44;
}

.emp-sched-cell.has-shift {
    border-color: var(--border);
    background: rgba(59,130,246,0.05);
}

.emp-sched-day-num {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.emp-sched-cell.today .emp-sched-day-num {
    color: var(--accent);
}

.emp-sched-chip {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 5px;
    border-left: 3px solid;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.emp-sched-legend {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.emp-sched-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.emp-sched-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ds-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

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

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

.modal-title {
    font-family: 'Syne', sans-serif;
    font-size: 20px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover { color: var(--text); }

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* ── CUSTOM NOTIFICATION MODAL ─────────────────────────────*/

.notification-modal {
    text-align: center;
    max-width: 400px;
}

.notification-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.notification-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.notification-message {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}

/* ── POWIADOMIENIA ──────────────────────────────────────────*/

.notif-badge {
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    position: relative;
}

.notif-badge::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid var(--danger);
    animation: pulseRing 2.2s ease-out infinite;
    pointer-events: none;
}

.notif-item {
    background: var(--bg-card);
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 12px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-shadow:
        0 2px 16px rgba(0,0,0,0.4),
        0 0 0 1px rgba(255,255,255,0.04) inset,
        0 0 24px rgba(59,130,246,0.08);
}

.notif-item:hover {
    border-color: var(--accent);
}

.notif-item.unread {
    color: var(--text);
    border-color: rgba(59,130,246,0.35);
}

.notif-item.read {
    color: var(--text-muted);
    opacity: 0.75;
}

.notif-time {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}


/* ── STATYSTYKI ─────────────────────────────────────────────*/

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

.stat-card {
    background: var(--bg-card);
    border: 1px solid rgba(59,130,246,0.35);
    border-radius: 16px;
    padding: 20px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 4px 32px rgba(0,0,0,0.5),
        0 0 0 1px rgba(255,255,255,0.06) inset,
        0 0 30px rgba(59,130,246,0.18),
        0 0 80px rgba(59,130,246,0.10),
        0 0 140px rgba(59,130,246,0.06);
}

.stat-card:hover {
    background: rgba(59,130,246,0.14);
    transform: translateY(-3px);
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow:
        0 8px 32px rgba(0,0,0,0.5),
        0 0 0 1px rgba(255,255,255,0.08) inset,
        0 0 40px rgba(59,130,246,0.28),
        0 0 100px rgba(59,130,246,0.15);
}

.stat-value {
    font-family: 'Syne', sans-serif;
    font-size: 36px;
    font-weight: 800;
    color: var(--accent);
    font-variant-numeric: tabular-nums lining-nums;
    letter-spacing: 0.01em;
    line-height: 1.2;
    display: inline-block;
}

.stat-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-top: 8px;
}

/* ── STATS DASHBOARD ────────────────────────────────────────*/

.stats-month-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stats-month-label {
    font-family: 'Syne', sans-serif;
    font-size: 14px;
    font-weight: 700;
    min-width: 130px;
    text-align: center;
    color: var(--text);
}

.stats-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.stats-kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
}

.stats-kpi-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.2s;
}

.stats-kpi-card:hover { transform: translateY(-2px); }
.stats-kpi-card:hover::before { opacity: 1; }

.stats-kpi-card.kpi-blue  { border-color: rgba(59,130,246,.35); }
.stats-kpi-card.kpi-blue::before  { background: rgba(59,130,246,.04); }
.stats-kpi-card.kpi-blue  .stats-kpi-icon { background: rgba(59,130,246,.15); color: #3b82f6; }
.stats-kpi-card.kpi-blue  .stats-kpi-val  { color: #3b82f6; }

.stats-kpi-card.kpi-violet { border-color: rgba(139,92,246,.35); }
.stats-kpi-card.kpi-violet::before { background: rgba(139,92,246,.04); }
.stats-kpi-card.kpi-violet .stats-kpi-icon { background: rgba(139,92,246,.15); color: #8b5cf6; }
.stats-kpi-card.kpi-violet .stats-kpi-val  { color: #8b5cf6; }

.stats-kpi-card.kpi-teal { border-color: rgba(20,184,166,.35); }
.stats-kpi-card.kpi-teal::before { background: rgba(20,184,166,.04); }
.stats-kpi-card.kpi-teal .stats-kpi-icon { background: rgba(20,184,166,.15); color: #14b8a6; }
.stats-kpi-card.kpi-teal .stats-kpi-val  { color: #14b8a6; }

.stats-kpi-card.kpi-green { border-color: rgba(34,197,94,.35); }
.stats-kpi-card.kpi-green::before { background: rgba(34,197,94,.04); }
.stats-kpi-card.kpi-green .stats-kpi-icon { background: rgba(34,197,94,.15); color: #22c55e; }
.stats-kpi-card.kpi-green .stats-kpi-val  { color: #22c55e; }

.stats-kpi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.stats-kpi-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stats-kpi-delta {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 20px;
}

.stats-kpi-delta.up   { background: rgba(34,197,94,.15); color: #22c55e; }
.stats-kpi-delta.down { background: rgba(239,68,68,.15);  color: #ef4444; }
.stats-kpi-delta.neutral { background: var(--bg-input); color: var(--text-muted); }

.stats-kpi-val {
    font-family: 'Syne', sans-serif;
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
    font-variant-numeric: tabular-nums lining-nums;
}

.stats-kpi-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.stats-charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.stats-chart-card {
    padding: 20px 24px;
}

.stats-chart-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 16px;
}

.stats-chart-wrap {
    position: relative;
    height: 220px;
}

.stats-section-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 14px;
}

/* ── ANIMACJE ───────────────────────────────────────────────*/

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes viewEnter {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
    0%   { opacity: 0; transform: scale(0.82); }
    65%  { transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-10px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes pulseRing {
    0%   { transform: scale(1);   opacity: 0.7; }
    70%  { transform: scale(2.1); opacity: 0; }
    100% { transform: scale(2.1); opacity: 0; }
}

@keyframes rippleAnim {
    to { transform: scale(20); opacity: 0; }
}

@keyframes gradientShift {
    0%   { background-position: 0%   50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0%   50%; }
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

@keyframes navGlow {
    0%, 100% { box-shadow: 0 0 8px rgba(59,130,246,0.25); }
    50%       { box-shadow: 0 0 18px rgba(59,130,246,0.5); }
}

/* View transition */
.view-entering {
    animation: viewEnter 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Stagger helpers */
.stagger-pop {
    animation: popIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.stagger-slide {
    animation: slideInLeft 0.25s ease both;
}

/* Ripple */
.btn-primary,
.btn-secondary,
.btn-danger,
.dept-tab {
    position: relative;
    overflow: hidden;
}

.btn-ripple {
    position: absolute;
    width: 6px;
    height: 6px;
    margin: -3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    animation: rippleAnim 0.55s ease-out forwards;
    pointer-events: none;
}

/* ── SETTINGS MODAL ─────────────────────────────────────────*/

.modal-settings {
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    padding: 28px;
}

.modal-settings form {
    overflow-y: auto;
    flex: 1;
    padding-right: 4px;
}

.modal-settings form::-webkit-scrollbar { width: 4px; }
.modal-settings form::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ── LANGUAGE PICKER ────────────────────────────────────────*/

.lang-picker {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

.lang-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 12px;
    border: 2px solid var(--border);
    background: var(--bg-input);
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color .2s, background .2s, color .2s;
    flex: 1;
}

.lang-option:hover {
    border-color: var(--accent);
    background: rgba(59,130,246,.08);
    color: var(--text);
}

.lang-option.active {
    border-color: var(--accent);
    background: rgba(59,130,246,.15);
    color: var(--accent);
}

.lang-flag {
    width: 44px;
    height: 30px;
    border-radius: 4px;
    overflow: hidden;
    display: block;
    flex-shrink: 0;
}

.lang-name {
    font-size: 13px;
    font-weight: 600;
}

/* ── SHIFT MODAL TABS ───────────────────────────────────────*/

.shift-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    background: var(--bg-input);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 22px;
}

.shift-tab {
    background: none;
    border: none;
    border-radius: 7px;
    padding: 9px 12px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background .15s, color .15s;
    letter-spacing: .02em;
}

.shift-tab:hover { color: var(--text); }

.shift-tab.active {
    background: var(--accent);
    color: #fff;
}

/* ── RECURRING SHIFT CALENDAR ────────────────────────────────*/

.recur-cal-section {
    margin-top: 20px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.recur-section-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 12px;
}

.recur-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.recur-cal-title {
    font-family: 'Syne', sans-serif;
    font-size: 14px;
    font-weight: 700;
}

.recur-cal-nav {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 6px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .15s, color .15s;
    line-height: 1;
}

.recur-cal-nav:hover { border-color: var(--accent); color: var(--accent); }

.recur-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 4px;
}

.recur-cal-weekdays span {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 4px 0;
}

.recur-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.recur-day-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--border);
    color: var(--text);
    transition: background .1s, border-color .1s, color .1s;
    user-select: none;
}

.recur-day-cell:hover { border-color: var(--accent); color: var(--accent); }

.recur-day-cell.selected {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.recur-day-cell.empty { border: none; cursor: default; pointer-events: none; }

.recur-selected-count {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 10px;
    min-height: 18px;
}

/* ── MANAGE MODAL TABS ──────────────────────────────────────*/

.manage-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    background: var(--bg-input);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 22px;
}

.manage-tab {
    background: none;
    border: none;
    border-radius: 7px;
    padding: 9px 12px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background .15s, color .15s;
    letter-spacing: .02em;
}

.manage-tab:hover { color: var(--text); }

.manage-tab.active {
    background: var(--accent);
    color: #fff;
}

.manage-tab-content {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 18px;
    min-height: 220px;
}

.manage-add-panel {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.manage-panel-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.manage-list-panel {
    overflow-y: auto;
    max-height: 320px;
}

/* ── CUSTOM SELECT ──────────────────────────────────────────*/

.cs-wrap {
    position: relative;
}

.cs-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s;
    outline: none;
    gap: 8px;
}

.cs-trigger:hover,
.cs-wrap.open .cs-trigger {
    border-color: var(--accent);
}

.cs-wrap.open .cs-trigger {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

.cs-display {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cs-arrow {
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.2s;
}

.cs-wrap.open .cs-arrow {
    transform: rotate(180deg);
    color: var(--accent);
}

.cs-list {
    display: none;
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    z-index: 400;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    animation: fadeUp 0.15s ease;
}

.cs-wrap.open .cs-list {
    display: block;
}

.cs-item {
    padding: 10px 16px;
    font-size: 14px;
    cursor: pointer;
    color: var(--text);
    transition: background 0.15s, color 0.15s;
}

.cs-item:hover {
    background: rgba(59,130,246, 0.1);
    color: var(--accent);
}

.cs-item.selected {
    background: rgba(59,130,246, 0.15);
    color: var(--accent);
    font-weight: 600;
}

.cs-item:last-child {
    border-radius: 0 0 var(--radius) var(--radius);
}

/* ── SCROLLBAR ──────────────────────────────────────────────*/

/* Style scrollbar to match dark theme */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── SCHEDULE STATS BAR ─────────────────────────────────────*/

.schedule-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.sstat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0 20px;
    height: 76px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: border-color 0.2s;
}

.sstat-card:hover { border-color: var(--accent); }

.sstat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(59,130,246,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--accent);
}

.sstat-value {
    font-family: 'Syne', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
    font-variant-numeric: tabular-nums lining-nums;
    display: inline-block;
}

.sstat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    white-space: nowrap;
}

/* ── VIEW TOGGLE ─────────────────────────────────────────────*/

.calendar-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.view-toggle {
    display: flex;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
    flex-shrink: 0;
}

.view-toggle-btn {
    padding: 7px 18px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.view-toggle-btn.active {
    background: var(--accent);
    color: white;
}

.view-toggle-btn:hover:not(.active) {
    color: var(--text);
    background: rgba(255,255,255,0.05);
}

.calendar-nav-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.calendar-nav-inner h2 {
    font-size: 18px;
    font-weight: 700;
    min-width: 180px;
    text-align: center;
}

/* ── WEEKLY CALENDAR ─────────────────────────────────────────*/

.wk-card { padding: 0; overflow: hidden; border-radius: 16px; }

.weekly-grid {
    overflow-x: auto;
    display: flex;
    flex-direction: column;
    height: 640px;
}

.wk-header {
    display: grid;
    grid-template-columns: 58px repeat(7, 1fr);
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 5;
    min-width: 600px;
}

.wk-scroll {
    overflow-y: auto;
    flex: 1;
    min-width: 600px;
    scroll-behavior: smooth;
}

.wk-corner {
    padding: 14px 8px;
    border-right: 1px solid var(--border);
}

.wk-day-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 4px;
    gap: 6px;
    border-left: 1px solid var(--border);
    transition: background 0.15s;
}

.wk-day-header.today { background: rgba(59,130,246,0.06); }

.wk-day-name {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.wk-day-num {
    font-family: 'DM Sans', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-variant-numeric: tabular-nums lining-nums;
    transition: background 0.15s, color 0.15s;
}

.wk-day-num.today {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 14px rgba(59,130,246,0.5);
}

.wk-body {
    display: grid;
    grid-template-columns: 58px repeat(7, 1fr);
    min-width: 600px;
    position: relative;
}

.wk-gutter {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
    background: var(--bg-card);
    position: sticky;
    left: 0;
    z-index: 2;
}

.wk-hour-lbl {
    height: 60px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 4px 8px 0 0;
    font-size: 10px;
    color: rgba(100,116,139,0.55);
    font-weight: 600;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums lining-nums;
}

.wk-col {
    position: relative;
    border-left: 1px solid rgba(28,35,56,0.8);
    cursor: pointer;
    transition: background 0.15s;
}

.wk-col:hover { background: rgba(59,130,246,0.025); }
.wk-col.today { background: rgba(59,130,246,0.04); }

.wk-hline {
    height: 60px;
    border-top: 1px solid rgba(28,35,56,0.9);
    pointer-events: none;
    position: relative;
}

.wk-hline::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0; right: 0;
    height: 1px;
    background: rgba(28,35,56,0.45);
    pointer-events: none;
}

.wk-shift {
    position: absolute;
    border-radius: 8px;
    padding: 6px 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
    z-index: 2;
}

.wk-shift:hover {
    transform: scale(1.015) translateY(-1px);
    z-index: 10;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    filter: brightness(1.1);
}

.wk-shift-name {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.wk-shift-time {
    font-size: 10px;
    opacity: 0.8;
    margin-top: 2px;
    font-variant-numeric: tabular-nums lining-nums;
}

.wk-shift-pos {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wk-now-line {
    position: absolute;
    left: 0; right: 0;
    height: 2px;
    background: #ef4444;
    z-index: 8;
    pointer-events: none;
    box-shadow: 0 0 6px rgba(239,68,68,0.6);
}

.wk-now-line::before {
    content: "";
    position: absolute;
    left: -3px;
    top: -3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 6px rgba(239,68,68,0.6);
}

.wk-day-header { cursor: pointer; }
.wk-day-header:hover { background: rgba(59,130,246,0.07) !important; }

.wk-day-count {
    font-size: 10px;
    font-weight: 700;
    background: rgba(59,130,246,0.18);
    color: #3b82f6;
    border-radius: 10px;
    padding: 1px 7px;
    min-width: 18px;
    text-align: center;
    font-variant-numeric: tabular-nums lining-nums;
    transition: background 0.15s;
}
.wk-day-header:hover .wk-day-count { background: rgba(59,130,246,0.3); }

.day-sort-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.day-sort-btn {
    padding: 5px 13px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.day-sort-btn:hover { background: rgba(255,255,255,.04); color: var(--text); border-color: rgba(255,255,255,.12); }
.day-sort-btn.active { background: rgba(59,130,246,.15); color: #3b82f6; border-color: rgba(59,130,246,.4); }

.day-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin: 14px 0 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}
.day-group-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.day-group-count {
    margin-left: auto;
    background: rgba(100,116,139,.15);
    color: var(--text-muted);
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 10px;
    font-variant-numeric: tabular-nums lining-nums;
}


/* ══════════════════════════════════════════════════════════════
   MOBILE — ukryte na desktopie
   ══════════════════════════════════════════════════════════════ */
.mobile-topbar, .mobile-nav, .mobile-more-overlay { display: none; }

/* ══════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE  (max-width: 768px)
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* ── Layout ── */
    .app-layout { grid-template-columns: 1fr; }
    .sidebar { display: none; }

    /* ── Mobile top bar ── */
    .mobile-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        top: 0; left: 0; right: 0;
        height: 56px;
        background: var(--bg-sidebar);
        border-bottom: 1px solid var(--border);
        padding: 0 16px;
        z-index: 200;
    }

    .mobile-topbar-logo {
        height: 36px;
        width: auto;
    }

    .mobile-topbar-right { display: flex; align-items: center; gap: 10px; }

    .mobile-avatar {
        width: 32px; height: 32px;
        border-radius: 50%;
        background: linear-gradient(135deg, #3b82f6, #8b5cf6);
        display: flex; align-items: center; justify-content: center;
        font-size: 13px; font-weight: 700; color: #fff;
        cursor: pointer;
    }

    /* ── Mobile bottom nav ── */
    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        height: 64px;
        background: var(--bg-sidebar);
        border-top: 1px solid var(--border);
        z-index: 200;
    }

    .mobile-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        background: none;
        border: none;
        color: var(--text-muted);
        font-size: 10px;
        font-weight: 500;
        cursor: pointer;
        position: relative;
        padding: 6px 4px;
        transition: color 0.2s;
    }

    .mobile-nav-item.active { color: var(--accent); }
    .mobile-nav-item span { line-height: 1; }
    .mobile-nav-item .notif-badge { top: 4px; right: 20%; }

    /* ── Main content ── */
    .main-content {
        padding: 72px 14px 80px;
    }

    /* ── Hide desktop stats on mobile ── */
    .schedule-stats { display: none; }

    /* ── Page header ── */
    .page-header {
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 16px;
    }
    .page-title { font-size: 20px; }

    /* ── Calendar controls ── */
    .calendar-controls { flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
    .calendar-nav-inner { flex: 1 1 100%; justify-content: space-between; }
    .calendar-nav-inner h2 { font-size: 14px; }

    /* ── Monthly calendar ── */
    .calendar-day { height: 64px; padding: 3px; }
    .day-number { font-size: 10px; margin-bottom: 2px; }
    .shift-chip { font-size: 9px; padding: 1px 3px; margin-bottom: 1px; }
    .shift-chip-more { font-size: 9px; }
    .calendar-day-header { font-size: 10px; padding: 3px 0; }

    /* ── Weekly calendar ── */
    .card.wk-card { overflow-x: auto; padding: 0; }
    .weekly-grid { min-width: 560px; }

    /* ── Dept tabs ── */
    .dept-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }

    /* ── Tables ── */
    .card { overflow-x: auto; }
    .table { min-width: 540px; }

    /* ── Stats grid ── */
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stats-kpi-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stats-charts-row { grid-template-columns: 1fr; }
    .stats-chart-wrap { height: 180px; }

    /* ── Modals — bottom sheet ── */
    .modal-overlay { align-items: flex-end; padding: 0 0 64px 0; overflow-y: hidden; }
    .modal {
        border-radius: 20px 20px 0 0;
        max-width: 100%; width: 100%;
        margin: 0;
        padding: 24px 20px 32px;
        max-height: calc(88vh - 64px);
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .modal-footer {
        position: sticky;
        bottom: 0;
        background: var(--bg-card);
        padding-top: 12px;
        margin-top: 8px;
    }
    .modal-wide { max-width: 100%; width: 100%; }
    .ds-summary-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .ds-summary-grid .stat-card { padding: 12px 10px; }
    .ds-summary-grid .stat-value { font-size: 20px; }
    .ds-summary-grid .stat-label { font-size: 11px; margin-top: 4px; }
    .ds-table-wrap table { font-size: 12px; }
    .ds-table-wrap td, .ds-table-wrap th { padding: 8px 5px !important; }
    .manage-tab-content { grid-template-columns: 1fr; min-height: unset; }

    /* ── Login ── */
    .login-container {
        border-radius: 0;
        min-height: 100vh;
        padding: 48px 24px 32px;
        max-width: 100%;
        border: none;
        display: flex; flex-direction: column; justify-content: center;
    }
    .login-brand { height: 70px; }
    .login-logo-img { max-width: 240px; width: 100%; }
    .login-lang-picker { top: 14px; right: 14px; }

    /* ── Mobile More overlay ── */
    .mobile-more-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.55);
        backdrop-filter: blur(4px);
        z-index: 300;
        align-items: flex-end;
    }
    .mobile-more-overlay.open { display: flex; }

    .mobile-more-sheet {
        background: var(--bg-card);
        border-radius: 20px 20px 0 0;
        width: 100%;
        padding: 20px 16px 80px;
        border-top: 1px solid var(--border);
    }

    .mobile-more-user {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 4px 8px 20px;
        border-bottom: 1px solid var(--border);
        margin-bottom: 12px;
    }

    .mobile-more-avatar {
        width: 44px; height: 44px;
        border-radius: 50%;
        background: linear-gradient(135deg, #3b82f6, #8b5cf6);
        display: flex; align-items: center; justify-content: center;
        font-size: 18px; font-weight: 700; color: #fff;
        flex-shrink: 0;
    }

    .mobile-more-name { font-size: 15px; font-weight: 600; color: var(--text); }
    .mobile-more-role { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

    .mobile-more-items { display: flex; flex-direction: column; gap: 4px; }

    .mobile-more-item {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 14px 12px;
        border-radius: 12px;
        background: none;
        border: none;
        color: var(--text);
        font-size: 15px;
        font-weight: 500;
        cursor: pointer;
        width: 100%;
        text-align: left;
        transition: background 0.15s;
    }
    .mobile-more-item:hover { background: rgba(59,130,246,0.08); }
    .mobile-more-item svg { flex-shrink: 0; color: var(--text-muted); }
    .mobile-more-logout { color: var(--danger); }
    .mobile-more-logout svg { color: var(--danger); }
}

/* ── ANNOUNCEMENT CARDS (redesign) ─────────────────────────*/

.ann-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 0;
    margin-bottom: 14px;
    overflow: hidden;
    transition: border-color .2s, transform .15s, box-shadow .2s;
}
.ann-card:hover {
    border-color: rgba(59,130,246,.4);
    transform: translateY(-1px);
    box-shadow: 0 8px 32px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.04) inset;
}

.ann-card-strip {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    border-radius: 16px 0 0 16px;
}

.ann-card-body { padding: 20px 22px 20px 26px; }

.ann-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.ann-left {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.ann-icon-wrap {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.ann-title-row { min-width: 0; }

.ann-title-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.ann-title {
    font-family: 'Syne', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.ann-new-badge {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .05em;
    background: rgba(59,130,246,.2);
    color: #3b82f6;
    border: 1px solid rgba(59,130,246,.35);
    flex-shrink: 0;
}

.ann-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.ann-author-avatar {
    width: 20px; height: 20px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.ann-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    align-items: center;
}

.ann-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.ann-action-btn:hover { background: rgba(255,255,255,.05); color: var(--text); border-color: rgba(255,255,255,.15); }
.ann-action-btn.danger { color: var(--danger); border-color: rgba(239,68,68,.25); }
.ann-action-btn.danger:hover { background: rgba(239,68,68,.1); border-color: var(--danger); }

.ann-content {
    font-size: 14px;
    color: var(--text);
    line-height: 1.75;
    white-space: pre-wrap;
    margin: 0 0 16px;
    padding-left: 54px;
}

.ann-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    padding-left: 54px;
}

.ann-dept-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
}

/* empty state */
.ann-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 64px 24px;
    color: var(--text-muted);
    text-align: center;
}
.ann-empty-icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    background: rgba(59,130,246,.1);
    display: flex; align-items: center; justify-content: center;
    color: rgba(59,130,246,.6);
    margin-bottom: 4px;
}
.ann-empty-title { font-size: 15px; font-weight: 600; color: var(--text); }
.ann-empty-sub   { font-size: 13px; }

/* ── NOTIFICATION ITEMS (redesign) ──────────────────────────*/

.notif-feed { display: flex; flex-direction: column; gap: 10px; }

.notif-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 18px;
    transition: border-color .2s, opacity .2s;
    position: relative;
}
.notif-row.unread {
    border-color: rgba(59,130,246,.3);
    background: rgba(59,130,246,.03);
}
.notif-row.read { opacity: .65; }
.notif-row:hover { border-color: rgba(59,130,246,.5); opacity: 1 !important; }

.notif-row-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: rgba(59,130,246,.12);
    display: flex; align-items: center; justify-content: center;
    color: #3b82f6;
    flex-shrink: 0;
}
.notif-row.read .notif-row-icon { background: rgba(100,116,139,.1); color: var(--text-muted); }

.notif-row-body { flex: 1; min-width: 0; }

.notif-row-msg {
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
}
.notif-row.read .notif-row-msg { color: var(--text-muted); }

.notif-row-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.notif-unread-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #3b82f6;
    flex-shrink: 0;
    margin-top: 6px;
    box-shadow: 0 0 6px rgba(59,130,246,.6);
}

.notif-mark-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 7px;
    border: 1px solid rgba(59,130,246,.3);
    background: transparent;
    color: #3b82f6;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s;
}
.notif-mark-btn:hover { background: rgba(59,130,246,.12); }

@media (max-width: 600px) {
    .ann-content  { padding-left: 0; }
    .ann-footer   { padding-left: 0; }
    .ann-actions  { flex-direction: column; align-items: flex-end; }
    .ann-action-btn { padding: 4px 8px; }
}

/* ── DETAILED STATS MODAL ───────────────────────────────────*/

.dstats-wrap { display: flex; flex-direction: column; gap: 0; }

.dstats-banner {
    background: linear-gradient(135deg, rgba(59,130,246,.12) 0%, rgba(139,92,246,.10) 60%, rgba(20,184,166,.08) 100%);
    border: 1px solid rgba(59,130,246,.2);
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}
.dstats-banner::before {
    content: "";
    position: absolute;
    top: -40px; right: -40px;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59,130,246,.15), transparent 70%);
    pointer-events: none;
}
.dstats-banner-month {
    font-family: 'Syne', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    text-transform: capitalize;
    line-height: 1.2;
}
.dstats-banner-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.dstats-kpi-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.dstats-kpi {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 18px;
    position: relative;
    overflow: hidden;
    transition: transform .2s, border-color .2s;
}
.dstats-kpi::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .2s;
    border-radius: 14px;
}
.dstats-kpi:hover { transform: translateY(-2px); }
.dstats-kpi:hover::before { opacity: 1; }

.dstats-kpi.kpi-blue  { border-color: rgba(59,130,246,.35); }
.dstats-kpi.kpi-blue::before  { background: rgba(59,130,246,.04); }
.dstats-kpi.kpi-blue  .dstats-kpi-val { color: #3b82f6; }
.dstats-kpi.kpi-blue  .dstats-kpi-icon { background: rgba(59,130,246,.15); color: #3b82f6; }

.dstats-kpi.kpi-violet { border-color: rgba(139,92,246,.35); }
.dstats-kpi.kpi-violet::before { background: rgba(139,92,246,.04); }
.dstats-kpi.kpi-violet .dstats-kpi-val { color: #8b5cf6; }
.dstats-kpi.kpi-violet .dstats-kpi-icon { background: rgba(139,92,246,.15); color: #8b5cf6; }

.dstats-kpi.kpi-teal { border-color: rgba(20,184,166,.35); }
.dstats-kpi.kpi-teal::before { background: rgba(20,184,166,.04); }
.dstats-kpi.kpi-teal .dstats-kpi-val { color: #14b8a6; }
.dstats-kpi.kpi-teal .dstats-kpi-icon { background: rgba(20,184,166,.15); color: #14b8a6; }

.dstats-kpi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.dstats-kpi-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
}
.dstats-kpi-val {
    font-family: 'DM Sans', sans-serif;
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums lining-nums;
}
.dstats-kpi-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.dstats-section-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.dstats-section-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.dstats-rank-list { display: flex; flex-direction: column; gap: 8px; }

.dstats-rank-item {
    display: grid;
    grid-template-columns: 36px 40px 1fr auto auto;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    transition: border-color .2s, transform .15s;
    cursor: default;
}
.dstats-rank-item:hover { border-color: rgba(59,130,246,.4); transform: translateX(3px); }

.dstats-rank-medal {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Syne', sans-serif;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    background: rgba(100,116,139,.15);
    color: var(--text-muted);
    border: 1.5px solid rgba(100,116,139,.25);
}
.dstats-rank-item.rank-gold   .dstats-rank-medal { background: rgba(245,158,11,.15); color: #f59e0b; border-color: rgba(245,158,11,.4); }
.dstats-rank-item.rank-silver .dstats-rank-medal { background: rgba(148,163,184,.12); color: #94a3b8; border-color: rgba(148,163,184,.35); }
.dstats-rank-item.rank-bronze .dstats-rank-medal { background: rgba(180,116,72,.15); color: #c2864a; border-color: rgba(180,116,72,.35); }

.dstats-rank-item.rank-gold   { border-color: rgba(245,158,11,.25); background: rgba(245,158,11,.03); }
.dstats-rank-item.rank-silver { border-color: rgba(148,163,184,.2); }
.dstats-rank-item.rank-bronze { border-color: rgba(180,116,72,.2); }

.dstats-rank-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 13px;
    color: #fff;
    flex-shrink: 0;
}

.dstats-rank-info { min-width: 0; }
.dstats-rank-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dstats-rank-dept {
    display: inline-block;
    margin-top: 3px;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .03em;
}

.dstats-rank-bar-wrap {
    width: 120px;
    height: 6px;
    background: rgba(255,255,255,.06);
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
}
.dstats-rank-bar {
    height: 100%;
    border-radius: 3px;
    transition: width .6s cubic-bezier(.4,0,.2,1);
}

.dstats-rank-nums { text-align: right; flex-shrink: 0; }
.dstats-rank-h {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    font-variant-numeric: tabular-nums lining-nums;
}
.dstats-rank-s { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

@media (max-width: 600px) {
    .dstats-kpi-row { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .dstats-kpi { padding: 12px 10px; }
    .dstats-kpi-val { font-size: 20px; }
    .dstats-rank-item { grid-template-columns: 28px 34px 1fr auto; gap: 8px; }
    .dstats-rank-bar-wrap { display: none; }
    .dstats-banner-month { font-size: 18px; }
}

/* ── Very small phones ── */
@media (max-width: 400px) {
    .stats-grid { grid-template-columns: 1fr; }
    .main-content { padding: 68px 10px 76px; }
}