/* Systém bezpečnostní služby - Hlavní styly */

:root {
    --primary-blue: #2D2D2D;
    --accent-yellow: #EDF000;
    --bg: #ffffff;
    --text: #000000;
    --text-muted: #4b5563;
    --border: #cbd5e1;
    --card-bg: #ffffff;
    --shadow: 0 5px 14px rgba(15, 23, 42, 0.13), 0 1px 3px rgba(15, 23, 42, 0.1);
}

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

html {
    font-size: 16px;
    overflow-x: hidden;
    overflow-x: clip;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    font-size: 12px;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-x: clip;
}

h1 { font-size: 18px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
h4 { font-size: 13px; }
h5 { font-size: 12px; }
h6 { font-size: 12px; }

/* Dashboard layout */
.dashboard-container {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    background: #f4f7fb;
}

/* Header */
.dashboard-header {
    grid-column: 2;
    grid-row: 1;
    background: #ffffff;
    color: var(--text);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

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

.logo {
    height: 32px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
}

.brand h1,
.dashboard-header h1 {
    font-size: 15px;
    font-weight: 750;
    color: var(--primary-blue);
    letter-spacing: -0.02em;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 600;
}

.role-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: var(--accent-yellow);
    color: var(--primary-blue);
}
.role-text {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: capitalize;
}
.role-text.role-admin { color: #dc2626; }
.role-text.role-velitel { color: #7c3aed; }
.role-text.role-zdravotnik { color: #059669; }

/* Navigation */
.dashboard-nav {
    grid-column: 1;
    grid-row: 1 / -1;
    background: var(--primary-blue);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.375rem;
    box-shadow: 10px 0 30px rgba(19, 44, 92, 0.12);
    z-index: 1;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}
.dashboard-nav::-webkit-scrollbar {
    width: 4px;
}
.dashboard-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
}
.dashboard-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 0.5rem 1.25rem;
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 750;
    line-height: 1.25;
    text-decoration: none;
    white-space: nowrap;
}
.sidebar-brand span,
.mobile-topbar-brand span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-brand small,
.mobile-topbar-brand small {
    font-size: 0.7em;
    font-weight: 600;
    opacity: 0.7;
}

.police-lightbar {
    height: 14px;
    background: linear-gradient(180deg, #2b2b2b 0%, #0a0a0a 100%);
    border-radius: 0 7px 7px 0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1px;
    padding: 2px 8px;
    margin: -0.75rem -1rem 0.75rem;
    overflow: hidden;
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.1), 0 2px 5px rgba(0,0,0,0.4);
    -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0.5) 65%, rgba(0,0,0,0) 90%);
    mask-image: linear-gradient(90deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0.5) 65%, rgba(0,0,0,0) 90%);
}

.lightbar-light {
    width: 5px;
    height: 9px;
    border-radius: 1px;
    background: #02020a;
    box-shadow: none;
    animation: police-strobe-v2 0.5s linear infinite;
}

@keyframes police-strobe-v2 {
    0%, 10% {
        background: #1a40ff;
        box-shadow: 0 0 8px #1a40ff, 0 0 16px #1a40ff;
    }
    18%, 100% {
        background: #02020a;
        box-shadow: none;
    }
}
.sidebar-version {
    margin-top: auto;
    padding: 0.5rem 1rem 0.75rem;
    font-size: 0.5rem;
    font-weight: 500;
    color: #888;
    text-align: left;
    display: block;
}

.sidebar-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    flex: 0 0 auto;
}
.sidebar-logo.logo-round,
.mobile-topbar-logo.logo-round {
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.15);
}

.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 0.75rem;
    margin: 0 0.25rem 1.5rem;
    color: #ffffff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    transition: background-color 0.2s, border-color 0.2s;
}

.sidebar-profile:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.28);
}

.sidebar-avatar {
    display: flex;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid var(--accent-yellow);
    border-radius: 50%;
    background: #ffffff;
    color: var(--primary-blue);
    font-size: 0.8125rem;
    font-weight: 800;
}

.sidebar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-profile-details {
    display: flex;
    min-width: 0;
    flex-direction: column;
    line-height: 1.35;
}

.sidebar-profile-details strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.875rem;
}

.sidebar-profile-details span {
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.75rem;
}

.sidebar-nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    flex: 1;
}

.sidebar-nav-label {
    padding: 0 0.75rem 0.75rem;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.dashboard-nav::before {
    display: none;
}

.nav-item {
    padding: 0.4rem 0.75rem;
    text-decoration: none;
    color: #94a3b8;
    border: 1px solid transparent;
    border-radius: 0.625rem;
    font-weight: 650;
    white-space: nowrap;
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.nav-item-logout {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 0.625rem;
    margin-top: 0.25rem;
}
.sidebar-nav-separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0.5rem 0;
}
.nav-item svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    flex-shrink: 0;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    transform: translateX(3px);
}

.nav-item.active {
    background-color: var(--accent-yellow);
    color: var(--primary-blue);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
}

/* Main content */
.dashboard-content {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    padding: 1rem;
    width: 100%;
}

/* Site footer */
.site-footer {
    grid-column: 2;
    grid-row: 3;
    text-align: center;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    border-top: 1px solid var(--border);
    background: var(--card-bg);
}

/* Avatar medal badges */
.avatar-with-medal {
    position: relative;
    display: inline-flex;
}
.avatar-medal {
    position: absolute;
    bottom: -4px;
    right: -4px;
    font-size: 0.7rem;
    line-height: 1;
    z-index: 2;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
    pointer-events: none;
}
.medal-1 { font-size: 0.85rem; }
.medal-2 { font-size: 0.8rem; }
.medal-3 { font-size: 0.75rem; }

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    gap: 0.25rem;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #0f2249;
    box-shadow: 0 0 0 2px var(--accent-yellow);
}

.btn-success {
    background-color: #16a34a;
    color: #ffffff;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.15s, transform 0.15s;
}
.btn-success:hover {
    background-color: #15803d;
    transform: translateY(-1px);
}

.profile-save-top {
    flex-shrink: 0;
    margin-left: auto;
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-blue);
    border: 1px solid var(--primary-blue);
}

.btn-secondary:hover {
    background-color: var(--primary-blue);
    color: #ffffff;
}

.btn-logout {
    background-color: var(--accent-yellow);
    color: var(--primary-blue);
}

.btn-logout:hover {
    background-color: #d9d900;
}

.btn-danger {
    background-color: #dc2626;
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

.btn-duplicate {
    background-color: #f59e0b;
    color: #1e293b;
}

.btn-duplicate:hover {
    background-color: #d97706;
    color: #ffffff;
}

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

.btn-sm {
    padding: 0.4rem 0.875rem;
    font-size: 0.8rem;
}

.btn-xs {
    padding: 0.3rem 0.625rem;
    font-size: 0.72rem;
}

/* Forms */
.form-group {
    margin-bottom: 0.625rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
    color: var(--text);
    font-size: 0.8125rem;
}

.form-group input,
.form-group select,
.form-group textarea,
.form-group input[type=file] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--text);
    background-color: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(19, 44, 92, 0.15);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.625rem;
}

.form-section {
    background: var(--card-bg);
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.form-section h3 {
    margin-bottom: 0.75rem;
    color: var(--primary-blue);
    font-size: 15px;
}

/* Login page */
.login-page {
    background-color: var(--bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-box {
    background: #ffffff;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    text-align: center;
}

.login-box .logo {
    height: 48px;
    margin-bottom: 0.75rem;
}

.login-box h1 {
    color: var(--primary-blue);
    margin-bottom: 0.25rem;
    font-size: 18px;
}

.login-box p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Alerts */
.alert {
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Profile */
.profile-container {
    max-width: 100%;
    grid-column: 1 / -1;
}

.profile-header {
    background: var(--card-bg);
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    flex-wrap: wrap;
}

.profile-photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--text-muted);
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-photo {
    color: var(--text-muted);
    font-size: 0.625rem;
    text-align: center;
}

.profile-info { flex: 1; min-width: 0; }
.profile-info h2 {
    color: var(--primary-blue);
    margin-bottom: 0.25rem;
}

.role-text {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-transform: capitalize;
}

.prukaz-preview {
    margin-top: 0.5rem;
}

.prukaz-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

.profile-photo-preview {
    margin-top: 0.5rem;
}

.profile-photo-preview img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--border);
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.stat-card h3 {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Admin overview – klikací dlaždice */
.admin-tiles {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}
.admin-tiles .stat-card {
    display: block;
    text-decoration: none;
    padding: 1rem;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.admin-tiles .stat-card:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 2px 8px rgba(45, 45, 45, 0.12);
    transform: translateY(-1px);
}
.admin-tiles .stat-card h3 {
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}
.admin-tiles .stat-card p {
    margin-bottom: 0;
    font-size: 0.8rem;
    line-height: 1.3;
}

/* Fun facts / Zajímavosti redesign */
.ff-dashboard {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 1.5rem;
}
.ff-hero-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
.ff-hero {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #f0f9ff, #ffffff);
    border: 1px solid #e0f2fe;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}
.ff-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}
.ff-hero--accent {
    background: linear-gradient(135deg, #fffbeb, #ffffff);
    border-color: #fef3c7;
}
.ff-hero-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #ffffff;
    color: #3D3D3D;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.ff-hero-icon svg {
    width: 22px;
    height: 22px;
}
.ff-hero--accent .ff-hero-icon {
    color: #f59e0b;
}
.ff-hero-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.ff-hero-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #2D2D2D;
    line-height: 1.1;
}
.ff-hero-value small {
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
}
.ff-hero-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-blue);
}
.ff-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: #2D2D2D;
    margin: 0 0 0.75rem 0;
}
.ff-section-title svg {
    width: 18px;
    height: 18px;
    color: var(--primary-blue);
}
.ff-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    align-items: start;
}
.ff-grid--records {
    grid-template-columns: repeat(2, 1fr);
}
.ff-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.85rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}
.ff-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}
.ff-card--wide {
    grid-column: 1 / -1;
}
.ff-card-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #2D2D2D;
    margin-bottom: 0.5rem;
}
.ff-card-label svg {
    width: 16px;
    height: 16px;
    color: #64748b;
}
.ff-card-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2D2D2D;
    line-height: 1.2;
    margin: 0 0 0.25rem;
}
.ff-card-sub {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
}
.ff-person {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid #f1f5f9;
}
.ff-person:last-child {
    border-bottom: none;
}
.ff-people-list {
    max-height: 180px;
    overflow-y: auto;
    padding-right: 0.5rem;
}
.ff-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    flex-shrink: 0;
}
.ff-avatar-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
    border: 2px solid #ffffff;
}
.ff-person-info strong {
    display: block;
    font-size: 0.85rem;
    color: #1e293b;
}
.ff-person-info span {
    font-size: 0.75rem;
    color: #64748b;
}
.ff-avatar-stack {
    display: flex;
    flex-wrap: wrap;
    padding-left: 0.4rem;
    gap: 0;
}
.ff-avatar-stack .ff-avatar,
.ff-avatar-stack .ff-avatar-initials {
    width: 38px;
    height: 38px;
    margin-left: -0.65rem;
    z-index: 1;
}
.ff-avatar-more {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    margin-left: -0.65rem;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    border: 2px solid #ffffff;
    z-index: 1;
}
.ff-avatar-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-height: 170px;
    overflow-y: auto;
    padding-right: 0.5rem;
}
.ff-avatar-grid--cols-5 {
    display: grid;
    grid-template-columns: repeat(5, 40px);
    gap: 0.5rem;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 0.5rem;
    justify-content: start;
    align-content: start;
}
.ff-avatar-grid--cols-5 .ff-avatar,
.ff-avatar-grid--cols-5 .ff-avatar-initials {
    width: 36px;
    height: 36px;
    margin: 0;
}
.ff-progress-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}
.ff-progress-label {
    flex: 0 0 110px;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #1e293b;
    font-weight: 500;
}
.ff-progress-bar {
    flex: 1;
    height: 7px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}
.ff-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3D3D3D, #5A5A5A);
    border-radius: 999px;
}
.ff-progress-value {
    flex: 0 0 60px;
    text-align: right;
    color: #64748b;
    font-size: 0.75rem;
}
.ff-weekend-bar {
    display: flex;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: #e2e8f0;
    margin: 0.35rem 0;
}
.ff-weekend-segment {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
}
.ff-weekend {
    background: #f59e0b;
}
.ff-weekday {
    background: #3D3D3D;
}
.ff-streak {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    color: #c2410c;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid #fed7aa;
}
.ff-streak svg {
    width: 18px;
    height: 18px;
    color: #f97316;
}
.ff-streak-list {
    margin-top: 0.5rem;
    max-height: 170px;
    overflow-y: auto;
    padding-right: 0.5rem;
    font-size: 0.8rem;
}
.ff-streak-list p {
    margin: 0;
    padding: 0.2rem 0;
    border-bottom: 1px solid #f1f5f9;
}
@media (max-width: 900px) {
    .ff-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .ff-grid--records {
        grid-template-columns: repeat(2, 1fr);
    }
    .ff-card--wide {
        grid-column: 1 / -1;
    }
}
@media (max-width: 640px) {
    .ff-hero-grid {
        grid-template-columns: 1fr;
    }
    .ff-grid,
    .ff-grid--records {
        grid-template-columns: 1fr;
    }
    .ff-progress-label {
        flex: 0 0 100px;
    }
}

/* FF icon theme colors (target rendered lucide SVGs) */
.ff-card-label svg,
.ff-hero-icon svg,
.ff-section-title svg {
    color: var(--primary-blue);
}
.ff-card-label .lucide-users,
.ff-section-title .lucide-users {
    color: #4f46e5;
}
.ff-card-label .lucide-user-check,
.ff-card-label .lucide-user-plus {
    color: #22c55e;
}
.ff-card-label .lucide-trophy,
.ff-section-title .lucide-trophy {
    color: #f59e0b;
}
.ff-card-label .lucide-map-pin {
    color: #16a34a;
}
.ff-card-label .lucide-calendar,
.ff-hero-icon .lucide-calendar,
.ff-card-label .lucide-timer,
.ff-card-label .lucide-clock,
.ff-card-label .lucide-hourglass {
    color: #3D3D3D;
}
.ff-card-label .lucide-sun {
    color: #eab308;
}
.ff-card-label .lucide-flame {
    color: #f97316;
}
.ff-card-label .lucide-banknote {
    color: #22c55e;
}
.ff-hero-icon .lucide-coins {
    color: #f59e0b;
}
.ff-card-label .lucide-briefcase {
    color: #8B4513;
}

/* Users table */
.users-container {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

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

.page-header h2 {
    color: var(--primary-blue);
}

.ef-tabs-nav {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 4px;
    max-width: 100%;
    overflow-x: auto;
    padding: 4px;
    margin-bottom: 1.5rem;
    background: rgba(241, 245, 249, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(51, 65, 85, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    scrollbar-width: none;
}
.ef-tabs-nav::-webkit-scrollbar {
    display: none;
}
.ef-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.4rem 0.875rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(255, 255, 255, 0.85);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}
.ef-tab-btn:hover {
    color: #0f172a;
    background: #ffffff;
    border-color: rgba(100, 116, 139, 0.6);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}
.ef-tab-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, #64748b 0%, #334155 100%);
    border-color: #334155;
    box-shadow: 0 4px 12px rgba(51, 65, 85, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.ef-tab-btn.active i {
    color: #ffffff !important;
}
.ef-tab-content {
    display: none;
}
.ef-tab-content.active {
    display: block;
}
@media (max-width: 768px) {
    .ef-tabs-nav {
        display: flex;
        width: 100%;
    }
    .ef-tab-btn {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }
}

.users-table {
    overflow-x: auto;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

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

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

.users-table th {
    background-color: #f9fafb;
    font-weight: 700;
    color: var(--text);
}

.users-table tr:hover {
    background-color: #f9fafb;
}

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

/* Welcome section */
.welcome-section {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.welcome-section h2 {
    color: var(--primary-blue);
    margin-bottom: 0.25rem;
}

.welcome-section p {
    color: var(--text-muted);
}

/* Error page */
.error-page {
    background-color: var(--bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.error-container {
    background: #ffffff;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    max-width: 480px;
    width: 100%;
}

.error-container .logo {
    height: 48px;
    margin-bottom: 0.75rem;
}

.error-container h1 {
    font-size: 4rem;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.error-container h2 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.error-container p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-active {
    background-color: #dcfce7;
    color: #166534;
}

.status-inactive {
    background-color: #fee2e2;
    color: #991b1b;
}

.inline-form {
    display: inline;
}

.actions .inline-form,
.actions .btn {
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.form-checkbox input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--primary-blue);
    cursor: pointer;
}

.form-checkbox label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
}

.search-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.search-form input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.5rem;
    vertical-align: middle;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-initials {
    line-height: 1;
}

.users-table td:first-child,
.users-table th:first-child {
    width: 32px;
    text-align: center;
}

/* Modern user cards */
.user-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.user-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.user-card:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.user-card .user-avatar {
    width: 40px;
    height: 40px;
    font-size: 0.75rem;
}

.user-card-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 220px;
}

.user-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.user-card-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-blue);
}

.user-card-number {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
}

.user-card-contact {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.user-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.user-card-actions {
    display: flex;
    align-items: center;
}

/* Two-column user cards */
.user-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.user-card-v2 {
    background-color: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 7px 18px rgba(15, 23, 42, 0.16), 0 1px 3px rgba(15, 23, 42, 0.12);
    display: flex;
    flex-direction: column;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.user-card-v2:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2), 0 2px 6px rgba(15, 23, 42, 0.14);
    border-color: var(--primary-blue);
}

.user-card-header {
    padding: 0.6rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    background-color: #ffffff;
}

.user-avatar-lg {
    width: 46px;
    height: 46px;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.user-card-title {
    flex: 1;
    min-width: 150px;
}

.user-card-title h3 {
    margin: 0;
    font-size: 13px;
    color: var(--primary-blue);
    font-weight: 700;
}
.user-name-link {
    color: inherit;
    text-decoration: none;
}
.user-name-link:hover {
    text-decoration: underline;
}

.user-card-service {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

.user-card-edit {
    margin-left: auto;
}

.user-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem;
}

.user-card-photo {
    flex-shrink: 0;
    width: 85px;
}
.user-card-photo img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: contain;
    object-position: center;
    border-radius: 0.4rem;
    display: block;
}
.user-card-photo .no-id-photo {
    border-radius: 0.4rem;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    display: flex;
    align-items: center;
    justify-content: center;
}
.user-card-photo-status {
    margin-top: 0.375rem;
    text-align: center;
}
.prukaz-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.prukaz-lightbox img {
    width: 400px;
    max-width: 90vw;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.no-id-photo {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-align: center;
    padding: 0.5rem;
}

.user-card-details p {
    margin: 0 0 0.25rem;
    font-size: 0.75rem;
    color: var(--text-dark);
    line-height: 1.3;
}

.user-card-details strong {
    color: var(--primary-blue);
}
.user-card-details p svg,
.profile-preview-body .user-card-details p svg {
    width: 13px !important;
    height: 13px !important;
    stroke-width: 2;
    flex-shrink: 0;
    opacity: 0.6;
    display: inline !important;
    vertical-align: middle !important;
    margin-right: 3px;
    top: 0;
    position: relative;
}
.rank-badge-rank svg,
.rank-badge-hours svg,
.leaderboard-hours svg,
.leaderboard-rank svg {
    width: 11px;
    height: 11px;
    stroke-width: 2;
    vertical-align: -1px;
}
.leaderboard-heading h3 svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
    vertical-align: -3px;
}
.document-emoji svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}
.btn svg, .btn-sm svg {
    width: 14px;
    height: 14px;
    stroke-width: 2;
    vertical-align: -2px;
    margin-right: 4px;
}

.user-card-details .user-bio {
    margin-top: 0.4rem;
    line-height: 1.3;
}

.user-card-footer {
    border-top: 1px solid var(--border);
    padding-top: 0.5rem;
}
.user-card-footer p { font-size: 0.75rem; line-height: 1.3; margin: 0 0 0.25rem; }
.user-card-footer .profile-preview-bio { margin-bottom: 0.4rem; }

.user-card-details .user-bio .bio-short,
.user-card-details .user-bio .bio-full {
    margin: 0;
}

.user-card-badges {
    margin-top: 0.4rem;
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.user-card-stats {
    margin-top: 0.35rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.leaderboard-section {
    margin: 0.65rem 0;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    background: #f8fafc;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}
.leaderboard-heading h3 {
    margin: 0;
    color: var(--primary-blue);
    font-size: 0.85rem;
}
.leaderboard-heading p {
    margin: 0.05rem 0 0;
    color: var(--text-muted);
    font-size: 0.68rem;
}
.leaderboard-carousel {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    margin-top: 0.35rem;
    padding: 0.1rem 0.1rem 0.25rem;
    scrollbar-width: thin;
}
.leaderboard-card {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.35rem;
    border: 1px solid #dbe2ea;
    border-radius: 0.5rem;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    color: var(--text);
    text-align: center;
    text-decoration: none;
}
.leaderboard-card.rank-1 { border-color: #d4a72c; background: linear-gradient(135deg, #fde047, #facc15, #eab308); border-width: 2px; }
.leaderboard-card.rank-2 { border-color: #64748b; background: linear-gradient(135deg, #e2e8f0, #cbd5e1, #94a3b8); border-width: 2px; }
.leaderboard-card.rank-3 { border-color: #b7794a; background: linear-gradient(135deg, #fdba74, #fb923c, #ea580c); border-width: 2px; }
.leaderboard-card:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(15, 23, 42, 0.18); }
.leaderboard-rank { font-size: 0.65rem; font-weight: 800; color: var(--primary-blue); }
.leaderboard-avatar {
    display: flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid #d4d4d4;
    border-radius: 50%;
    background: var(--primary-blue);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
}
.rank-1 .leaderboard-avatar { border-color: #facc15; }
.rank-2 .leaderboard-avatar { border-color: #cbd5e1; }
.rank-3 .leaderboard-avatar { border-color: #d97706; }
.leaderboard-avatar img { width: 100%; height: 100%; object-fit: cover; }
.leaderboard-card strong { font-size: 0.7rem; }
.leaderboard-caption { color: var(--text-muted); font-size: 0.6rem; }
.leaderboard-hours { color: var(--primary-blue); font-size: 0.65rem; font-weight: 800; }
.leaderboard-footer { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 0.15rem; padding-top: 0.1rem; }
.profile-leaderboard-rank {
    width: fit-content;
    margin: 0.35rem 0 0;
    padding: 0.3rem 0.5rem;
    border: 1px solid #d4d4d4;
    border-radius: 0.4rem;
    background: #f5f5f5;
    color: var(--primary-blue);
    font-size: 0.8rem;
}
.profile-preview-trigger { cursor: pointer; }
.profile-preview-modal {
    width: min(500px, calc(100% - 2rem));
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0.75rem;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
}
.profile-preview-modal::backdrop { background: rgba(15, 23, 42, 0.55); }
.profile-preview-content { padding: 0.9rem; }
.profile-preview-card { color: var(--text); }
.profile-preview-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}
.profile-preview-name { flex: 1; min-width: 0; }
.profile-preview-header h3 { margin: 0; color: var(--primary-blue); font-size: 1rem; }
.profile-preview-header p { margin: 0.15rem 0 0; color: var(--text-muted); font-size: 0.75rem; }
.profile-preview-rank-badge {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
    padding: 0.3rem 0.55rem;
    border: 1px solid #d4d4d4;
    border-radius: 0.4rem;
    background: #f5f5f5;
    color: var(--primary-blue);
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}
.rank-badge-rank { font-size: 0.85rem; }
.rank-badge-hours { font-size: 0.72rem; color: var(--text-muted); }
.profile-rank-badge {
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.55rem;
    border: 1px solid #d4d4d4;
    border-radius: 0.4rem;
    background: #f5f5f5;
    color: var(--primary-blue);
    font-weight: 700;
    white-space: nowrap;
}
/* Rank tiers - prestige styling */
.profile-rank-badge.rank-tier-gold {
    border: 1px solid #f59e0b;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}
.profile-rank-badge.rank-tier-gold .rank-badge-rank svg { color: #f59e0b; }
.profile-rank-badge.rank-tier-silver {
    border: 1px solid #94a3b8;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    color: #475569;
    box-shadow: 0 2px 8px rgba(148, 163, 184, 0.25);
}
.profile-rank-badge.rank-tier-silver .rank-badge-rank svg { color: #64748b; }
.profile-rank-badge.rank-tier-bronze {
    border: 1px solid #d97706;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
    color: #9a3412;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.25);
}
.profile-rank-badge.rank-tier-bronze .rank-badge-rank svg { color: #d97706; }
.profile-rank-badge.rank-tier-elite {
    border: 1px solid #7c3aed;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    color: #5b21b6;
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.2);
}
.profile-rank-badge.rank-tier-elite .rank-badge-rank svg { color: #7c3aed; }
.profile-rank-badge.rank-tier-member {
    border: 1px solid #d4d4d4;
    border-radius: 0.5rem;
    background: #f5f5f5;
    color: var(--primary-blue);
}
.profile-rank-badge.rank-tier-member .rank-badge-rank svg { color: var(--primary-blue); }
.profile-preview-avatar {
    display: flex;
    width: 76px;
    height: 76px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid #d4d4d4;
    border-radius: 50%;
    background: var(--primary-blue);
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 800;
}
.profile-preview-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-preview-body { display: flex; flex-direction: column; gap: 0.75rem; padding-top: 0.7rem; }
.profile-preview-body .user-card-main { display: flex; align-items: flex-start; gap: 0.75rem; }
.profile-preview-body .user-card-footer { border-top: 1px solid var(--border); padding-top: 0.5rem; }
.profile-preview-body .user-card-footer p { font-size: 0.75rem; line-height: 1.3; margin: 0 0 0.25rem; }
.profile-preview-body .user-card-details p { margin: 0 0 0.25rem; font-size: 0.75rem; color: var(--text-dark); line-height: 1.3; }
.profile-preview-body .user-card-details strong { color: var(--primary-blue); }
.profile-preview-body .user-card-photo { width: 85px; border-radius: 0.4rem; overflow: hidden; aspect-ratio: 3 / 4; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.profile-preview-body .user-card-photo img { width: 100%; height: 100%; object-fit: contain; }
.profile-preview-body .no-id-photo { color: var(--text-muted); font-size: 0.75rem; text-align: center; padding: 0.5rem; }
.profile-preview-bio .bio-truncate,
.profile-preview-bio .bio-full { cursor: pointer; }
.profile-preview-bio .bio-toggle-link { color: var(--primary-blue); font-size: 0.75rem; font-weight: 600; text-decoration: none; }
.profile-preview-bio .bio-toggle-link:hover { text-decoration: underline; }
.profile-preview-bio .bio-full img { max-width: 100%; height: auto; border-radius: 0.375rem; margin: 0.25rem 0; }
.profile-preview-docs { margin-top: 0.4rem; }
.profile-preview-docs p { font-size: 0.75rem; margin: 0 0 0.25rem; }
.profile-doc-list { list-style: none; padding: 0; margin: 0.25rem 0 0; }
.profile-doc-list li { padding: 0.2rem 0; font-size: 0.78rem; }
.profile-doc-list a { color: var(--primary-blue); text-decoration: none; font-weight: 600; }
.profile-doc-list a:hover { text-decoration: underline; }
.profile-preview-rank {
    margin-top: 0.6rem !important;
    padding: 0.35rem 0.5rem;
    border: 1px solid #d4d4d4;
    border-radius: 0.4rem;
    background: #f5f5f5;
    color: var(--primary-blue);
    font-weight: 700;
}

/* Documents section */
.documents-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.document-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--card-bg);
}
.document-link { color: var(--primary-blue); font-weight: 600; text-decoration: none; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.document-link:hover { text-decoration: underline; }
.document-meta { color: var(--text-muted); font-size: 0.75rem; white-space: nowrap; }
.document-delete-form { flex-shrink: 0; }
.document-upload-form { margin-top: 0.5rem; padding-top: 0.75rem; border-top: 1px dashed var(--border); }
.document-emoji { font-size: 1.5rem; text-decoration: none; line-height: 1; display: inline-block; transition: transform 0.15s; }
.document-emoji:hover { transform: scale(1.2); }
.profile-doc-emojis { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.25rem; }
.profile-docs-inline { display: flex; align-items: center; flex-wrap: wrap; gap: 0.375rem; }
.profile-docs-inline > svg { width: 13px; height: 13px; stroke-width: 2; color: var(--text-muted); flex-shrink: 0; }
.document-icon-link { display: inline-flex; align-items: center; text-decoration: none; color: var(--primary-blue); transition: transform 0.15s; }
.document-icon-link:hover { transform: scale(1.15); }
.document-icon-link svg { width: 18px; height: 18px; stroke-width: 2; }

/* Cropper modal */
.cropper-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 1rem;
    overflow: auto;
    touch-action: none;
    -webkit-overflow-scrolling: auto;
    overscroll-behavior: contain;
}

.cropper-modal[hidden] {
    display: none !important;
}

.cropper-modal-content {
    background: #ffffff !important;
    border-radius: 0.75rem;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 100000;
}

.cropper-modal-content h4 {
    margin: 0;
    color: var(--primary-blue);
}

.cropper-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: #fff;
}

.cropper-live-preview {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cropper-live-label {
    font-size: 0.75rem;
    color: #64748b;
}

.cropper-live-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border);
    background: #f1f5f9;
    flex-shrink: 0;
}

.cropper-live-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cropper-wrap {
    flex: 1;
    min-height: 300px;
    max-height: 60vh;
    overflow: hidden;
    padding: 1rem;
    background: #1a1a1a;
}

.cropper-wrap img {
    display: block;
    max-width: 100%;
}

.cropper-actions {
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    border-top: 1px solid var(--border);
    background: #fff;
}
.cropper-toolbar {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border);
    background: #fff;
}
.crop-tool-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #f8fafc;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s;
}
.crop-tool-btn svg {
    width: 18px;
    height: 18px;
}
.crop-tool-btn:hover {
    background: #e2e8f0;
    border-color: var(--primary-blue);
}

.events-container,
.event-form-container,
.event-settings-container {
    max-width: 100%;
}

.event-code-inline {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--text-muted);
    background: #f1f5f9;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    vertical-align: middle;
}

.page-actions,
.event-card-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: stretch;
}
.page-actions .btn,
.page-actions .template-dropdown summary.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 2.25rem;
}

.event-search-box {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.event-search-input {
    flex: 1;
    min-width: 0;
    max-width: 360px;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: #ffffff;
    font-size: 0.9375rem;
    line-height: 1.4;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.event-search-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.event-filters {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.event-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    border-radius: 0.375rem;
    background: transparent;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.event-filter-btn:hover {
    background: rgba(37, 99, 235, 0.08);
}
.event-filter-btn svg {
    width: 15px;
    height: 15px;
    stroke-width: 2;
}

.event-filter-btn.active {
    background: rgba(37, 99, 235, 0.12);
    transform: scale(1.05);
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.event-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-left: 6px solid #cbd5e1;
    border-radius: 0.875rem;
    box-shadow: var(--shadow);
}

.event-card-status-waiting {
    border-left: 4px solid #16a34a;
}

.event-card-status-filled {
    border-left: 4px solid #dc2626;
}

.event-card-status-hidden {
    border-left: 4px solid #64748b;
}

.event-card-status-cancelled {
    border-left: 4px solid #dc2626;
    opacity: 0.6;
}

.event-card-status-filled .event-card-header {
    background: #fee2e2;
}

.event-card-status-waiting .event-card-header {
    background: #dcfce7;
}

.event-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.event-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.25rem;
}

.event-card-content h3 {
    margin: 0.35rem 0;
    color: var(--primary-blue);
    font-size: 15px;
}

.event-card-content p {
    margin-top: 0.5rem;
    color: var(--text-muted);
}

.event-date {
    color: var(--primary-blue);
    font-size: 0.8125rem;
    font-weight: 750;
}
.event-date svg {
    width: 12px;
    height: 12px;
    stroke-width: 2;
    display: inline !important;
    vertical-align: middle !important;
    margin-right: 3px;
    position: relative;
    top: 0;
}

.event-code {
    display: inline-flex;
    width: fit-content;
    margin-top: 0.5rem;
    padding: 0.2rem 0.45rem;
    border-radius: 0.375rem;
    background: #f0f0f0;
    color: var(--primary-blue);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.75rem;
    font-weight: 750;
}

.event-location {
    color: var(--text) !important;
    font-size: 0.875rem;
    font-weight: 650;
}

.event-card-actions {
    margin-top: auto;
    padding-top: 0.75rem;
}

.event-card-actions form {
    display: inline-flex;
}

.event-response-form {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.event-response-form > span {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Uspaný pracovník — ikona spánku přes avatar */
.sleep-avatar { position: relative; display: inline-flex; flex-shrink: 0; }
.sleep-avatar > img, .sleep-avatar > .birthday-avatar, .sleep-avatar > .ph-avatar, .sleep-avatar > .ph-avatar-ph, .sleep-avatar .participant-avatar, .sleep-avatar .comment-avatar { filter: grayscale(60%); opacity: 0.72; }
.sleep-badge { position: absolute; right: -3px; bottom: -3px; width: 16px; height: 16px; background: #334155; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1.5px solid #fff; z-index: 2; }
.sleep-badge svg { width: 10px; height: 10px; }

.event-header-reactions {
    display: flex;
    margin-left: auto;
}

.event-header-reactions .event-response-buttons {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.event-response-buttons {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.response-button {
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.4rem;
    background: #ffffff;
    color: var(--text-muted);
    cursor: pointer;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.response-button:hover,
.response-button.selected {
    color: #ffffff;
}

.response-attending.selected,
.response-attending:hover,
.response-status.response-attending,
.response-summary.response-attending {
    border-color: #15803d;
    background: #15803d;
}

.response-interested.selected,
.response-interested:hover,
.response-status.response-interested,
.response-summary.response-interested {
    border-color: #16a34a;
    background: #16a34a;
}

.response-unavailable.selected,
.response-unavailable:hover,
.response-status.response-unavailable,
.response-summary.response-unavailable {
    border-color: #b91c1c;
    background: #b91c1c;
}

.event-responses-container {
    max-width: 100%;
}

.response-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.response-summary {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    border-radius: 0.75rem;
    color: #ffffff;
}

.response-summary strong {
    font-size: 1.75rem;
    line-height: 1;
}

.response-summary span {
    margin-top: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 700;
}

.responses-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: #ffffff;
}

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

.responses-table th,
.responses-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
}

.responses-table th {
    background: #f8fafc;
    color: var(--primary-blue);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

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

.response-status {
    display: inline-flex;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
}

.responses-empty {
    color: var(--text-muted);
    text-align: center !important;
}

.empty-state {
    padding: 2.5rem 1.5rem;
    border: 1px dashed #cbd5e1;
    border-radius: 0.875rem;
    color: var(--text-muted);
    text-align: center;
}

.event-form-image {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 150px;
    margin: 0 0 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    object-fit: cover;
}
.event-form-top {
    display: grid !important;
    grid-template-columns: 1fr 2fr;
    gap: 0.75rem;
    align-items: flex-start;
}
.event-form-photo {
    max-width: 100%;
}
.event-form-photo .form-group-file {
    margin-bottom: 0;
}
.event-form-photo .form-group-file input {
    font-size: 0.75rem;
}
.event-form-fields {
    flex: 1 1 0;
    min-width: 0;
}
.event-form-fields .form-row {
    grid-template-columns: 1fr 1fr;
}
.event-form-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: flex-start;
    margin-top: 0.5rem;
}
.event-form-staffing h4,
.event-form-equipment h4 {
    margin: 0 0 0.5rem;
    color: var(--primary-blue);
    font-size: 0.875rem;
}
.event-form-staffing .requirements-grid {
    grid-template-columns: 1fr 1fr;
    margin-bottom: 0;
}
.event-form-equipment .checkbox-list {
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem;
    margin-top: 0;
}
.event-form-equipment .checkbox-list label {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}
.equipment-collapse {
    margin-top: 0.75rem;
}
.equipment-collapse summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--primary-blue);
    padding: 0.375rem 0;
    list-style: none;
}
.equipment-collapse summary::before {
    content: '▸ ';
}
.equipment-collapse[open] summary::before {
    content: '▾ ';
}
.equipment-collapse .checkbox-list {
    margin-top: 0.5rem;
}

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

.event-template-save .form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
}

.event-template-save .form-group {
    margin-bottom: 0;
}

.event-template-save .form-group-template-name {
    flex: 1 1 220px;
}

.event-template-save .form-group-template-action {
    flex: 0 0 auto;
}

.event-template-save .form-group-template-action .btn {
    margin-bottom: 0;
}

.template-dropdown {
    position: relative;
    display: inline-block;
}

.template-dropdown summary.btn {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
    gap: 0.25rem;
}

.template-dropdown summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.template-dropdown summary::-webkit-details-marker {
    display: none;
}

.template-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.25rem);
    right: 0;
    min-width: 220px;
    max-height: 320px;
    overflow-y: auto;
    padding: 0.375rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: #ffffff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 50;
}

.template-dropdown-menu a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
}

.template-dropdown-menu a:hover {
    background: #f1f5f9;
}
.template-dropdown-menu button {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 0;
    border-radius: 0.375rem;
    background: transparent;
    color: var(--text);
    text-align: left;
    font: inherit;
    white-space: nowrap;
    cursor: pointer;
}
.template-dropdown-menu button:hover {
    background: #f1f5f9;
}

.new-location-fields {
    margin-top: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: #f8fafc;
}

.new-location-fields h4 {
    margin: 0 0 0.75rem;
    color: var(--primary-blue);
    font-size: 0.875rem;
}

.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
}

.checkbox-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.375rem;
}

.checkbox-list label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.4rem 0.625rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 0.8125rem;
}

.checkbox-list input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary-blue);
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.inline-add-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.inline-add-form input {
    min-width: 0;
    flex: 1;
    padding: 0.625rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font: inherit;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-heading h3 {
    margin-bottom: 0;
}

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

.settings-list {
    border-top: 1px solid var(--border);
    margin-top: 1rem;
}

.settings-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    background: #fff;
    border-radius: 6px;
    margin-bottom: 0.375rem;
}

.settings-list-item:hover {
    background: #f8fafc;
}

.location-list-item > div:first-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.15rem;
}

.location-list-item strong {
    font-size: 0.875rem;
}

.location-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.location-map-link {
    color: var(--primary-blue);
    font-size: 0.8125rem;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.location-contact {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.settings-item-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 0.375rem;
    align-items: center;
}

.settings-item-actions form {
    display: inline-flex;
}

.settings-item-actions .btn,
.settings-item-actions a.btn {
    padding: 0.3rem 0.625rem;
    font-size: 0.75rem;
    line-height: 1.4;
    white-space: nowrap;
}

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

.event-card {
    border-top: 2px solid var(--border);
    border-right: 2px solid var(--border);
    border-bottom: 2px solid var(--border);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.25), 0 2px 5px rgba(15, 23, 42, 0.15);
}

.event-card-header {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
    background: #e8e8e8;
    border-radius: 0.5rem 0.5rem 0 0;
}

.event-title-link {
    color: inherit;
    text-decoration: none;
}

.event-title-link:hover {
    text-decoration: underline;
}

.event-header-summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    row-gap: 0.25rem;
}

.event-card-header h3 {
    margin: 0;
    color: var(--primary-blue);
    font-size: 15px;
}

.event-card-header .event-date {
    font-size: 0.8rem;
}

.event-equipment-trigger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    color: #7c3aed;
}
.event-equipment-trigger:hover {
    color: #6d28d9;
}
.event-equipment-trigger svg {
    width: 16px;
    height: 16px;
}
.event-service-details > .event-service-equipment {
    cursor: pointer;
    display: none;
}
.event-service-details > .event-service-equipment:hover {
    background: #f5f3ff;
}

.event-header-separator {
    color: #94a3b8;
    font-weight: 700;
}

.event-status {
    display: inline-flex;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.6875rem;
    font-weight: 750;
}

.event-status-waiting {
    background: #16a34a;
}

.event-status-filled {
    background: #dc2626;
}

.event-status-hidden {
    background: #64748b;
}

.event-status-cancelled {
    background: #dc2626;
}

.event-status-text.event-status-waiting {
    color: #16a34a;
    background: transparent;
    padding: 0;
    border-radius: 0;
}
.event-status-text.event-status-filled {
    color: #dc2626;
    background: transparent;
    padding: 0;
    border-radius: 0;
}
.event-status-text.event-status-hidden {
    color: #64748b;
    background: transparent;
    padding: 0;
    border-radius: 0;
}
.event-status-text.event-status-cancelled {
    color: #dc2626;
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.event-location-trigger {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--primary-blue);
    cursor: pointer;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 700;
}
.event-location-trigger svg {
    width: 12px;
    height: 12px;
    stroke-width: 2;
    display: inline !important;
    vertical-align: middle !important;
    margin-right: 3px;
    position: relative;
    top: 0;
}

.location-detail-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(480px, calc(100% - 2rem));
    max-width: 750px;
    padding: 0;
    border: 0;
    border-radius: 0.875rem;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
}
.location-detail-modal[style*="max-width"] {
    width: auto;
}

.location-detail-modal::backdrop {
    background: rgba(15, 23, 42, 0.55);
}

.location-detail-modal p,
.location-detail-modal > a {
    display: block;
    margin: 0.875rem 1.25rem;
    font-size: 0.875rem;
}

.location-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.location-modal-header h4 {
    color: var(--primary-blue);
}

.invite-modal {
    padding: 1.5rem;
    background: #ffffff;
}

.invite-modal h3 {
    margin: 0 0 1rem 0;
    color: var(--primary-blue);
    font-size: 1.25rem;
}

.invite-modal .form-group {
    margin-bottom: 0.625rem;
}

.invite-modal .form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    cursor: pointer;
}

.invite-user-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: #f8fafc;
    margin-bottom: 1rem;
}

.invite-modal .form-group {
    margin-bottom: 0.5rem;
}
.invite-modal .form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
}
.invite-modal .form-group input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
}

.invite-user-list label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0;
    cursor: pointer;
    border-bottom: 1px solid #e2e8f0;
}

.invite-user-list label:last-child {
    border-bottom: none;
}

.invite-user-list input[type="checkbox"] {
    flex-shrink: 0;
    width: 1.1rem;
    height: 1.1rem;
}

.invite-user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.invite-user-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--primary-blue);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.invite-modal .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.location-modal-close {
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 50%;
    background: #eef2f7;
    color: var(--primary-blue);
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
}

.location-modal-note {
    color: var(--text-muted);
    line-height: 1.5;
}

.location-modal-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.location-modal-icon-btn {
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 50%;
    background: #eef2f7;
    color: var(--primary-blue);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.location-modal-icon-btn:hover {
    background: #dde4ee;
}
.location-modal-icon-btn svg,
.location-modal-icon-btn i {
    width: 16px;
    height: 16px;
}

.location-modal-enhanced {
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}
.location-modal-body {
    padding: 0 0 1rem 0;
}
.location-modal-map {
    margin: 0.75rem 1.25rem 0.5rem;
}
.location-modal-map iframe {
    display: block;
    width: 100%;
    border-radius: 0.5rem;
}
.location-edit-form {
    margin: 0.5rem 1.25rem 1rem;
    padding: 1rem;
    background: var(--bg-light, #f8fafc);
    border-radius: 0.5rem;
}
.location-edit-form .form-group {
    margin-bottom: 0.6rem;
}
.location-edit-form .form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}
.location-edit-form .form-group input,
.location-edit-form .form-group textarea {
    width: 100%;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 0.85rem;
}
.location-edit-form .form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.location-edit-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.event-card-layout {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(250px, 1fr) minmax(250px, 1fr);
    align-items: start;
}

.event-info-panel,
.event-participants-panel,
.event-comments-panel {
    min-width: 0;
    padding: 0.55rem 0.65rem;
}

.event-info-panel,
.event-participants-panel {
    border-right: 1px solid var(--border);
}

.event-info-panel .event-image {
    width: 100%;
    height: 150px;
    margin-bottom: 0.35rem;
    border-radius: 0.5rem;
    object-fit: cover;
}

@media (min-width: 992px) {
    .event-info-panel .event-image {
        height: 180px;
    }
}

.event-service-details,
.event-staffing-details {
    margin-top: 0.3rem;
    border-top: 1px solid var(--border);
}

.event-service-details > div,
.event-staffing-details > div {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.15rem 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.75rem;
    white-space: nowrap;
}

.event-service-timer-row {
    display: flex;
    gap: 0.5rem;
    padding: 0;
    border-bottom: none;
}
.event-service-timer-row > div {
    flex: 1;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.15rem 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.75rem;
}

.event-service-details span,
.event-staffing-details span {
    color: var(--text-muted);
}
.event-service-details span svg {
    width: 12px;
    height: 12px;
    stroke-width: 2;
    display: inline !important;
    vertical-align: middle !important;
    margin-right: 3px;
    position: relative;
    top: 0;
}

.event-service-details strong,
.event-staffing-details strong {
    text-align: right;
    color: var(--text);
}
.event-service-status .event-status-text {
    white-space: nowrap;
}

.event-staffing-details h4 {
    margin: 0.5rem 0 0.15rem;
    color: var(--primary-blue);
    font-size: 0.8125rem;
}

.event-staffing-details .event-staffing-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.35rem;
    padding: 0.25rem 0;
    border-bottom: none;
    font-size: 0.9375rem;
}

.staffing-emoji-btn {
    position: relative;
    padding: 0.15rem 0.25rem;
    border: none;
    border-radius: 0.35rem;
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: 0.9375rem;
    line-height: 1;
}

.staffing-emoji-btn:hover {
    background: #e2e8f0;
}
.staffing-position-icon {
    width: 14px;
    height: 14px;
    vertical-align: -2px;
    display: inline-block;
}
.staffing-modal-position h5 .staffing-position-icon {
    width: 15px;
    height: 15px;
    vertical-align: -3px;
}
.event-participant-position .staffing-position-icon {
    width: 12px;
    height: 12px;
    vertical-align: -1px;
}

.staffing-emoji-btn[data-active="1"]::after {
    content: attr(data-label);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    background: #1e293b;
    color: #ffffff;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 10;
}

.event-staffing-details p {
    margin: 0.35rem 0;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.event-description {
    margin: 0.3rem 0 0;
    font-size: 0.75rem;
    line-height: 1.25;
}

.event-participants-panel,
.event-comments-panel {
    background: #ffffff;
}

.event-participants-panel h4,
.event-comments-panel h4 {
    margin: 0 0 0.5rem;
    color: var(--primary-blue);
    font-size: 0.875rem;
}

.participant-group {
    margin-bottom: 0.5rem;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: #ffffff;
}

.participant-group h5 {
    display: flex;
    justify-content: space-between;
    margin: 0;
    padding: 0.3rem 0.5rem;
    color: #ffffff;
    font-size: 0.75rem;
}

.participant-group h5 span {
    min-width: 1.25rem;
    text-align: center;
}

.participant-attending h5 {
    background: #15803d;
}

.participant-interested h5 {
    background: #3D3D3D;
}

.participant-unavailable h5 {
    background: #b91c1c;
}

.participant-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.5rem;
    border-top: 1px solid #eef2f7;
    font-size: 0.8125rem;
    font-weight: 650;
}

.participant-avatar,
.comment-avatar {
    display: inline-flex;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
    background: #f0f0f0;
    color: var(--primary-blue);
    font-size: 0.625rem;
    font-weight: 800;
}

.participant-avatar img,
.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.participant-empty,
.comments-empty {
    margin: 0;
    padding: 0.35rem 0.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.event-participant-section {
    margin-bottom: 0.45rem;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    background: #ffffff;
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.13);
}

.event-participant-section.event-staffing-section {
    border: 2px solid #3D3D3D !important;
}

.event-participant-section.event-interest-section {
    border: 2px solid #16a34a !important;
}

.event-participant-section.event-unavailable-section {
    border: 2px solid #1e293b !important;
}

.event-participant-section:last-child {
    margin-bottom: 0;
}

.event-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.3rem 0.55rem;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.event-section-header svg {
    width: 12px;
    height: 12px;
    stroke-width: 2;
    vertical-align: -1px;
    margin-right: 4px;
}
.event-section-header .event-staffing-edit svg {
    width: 12px;
    height: 12px;
    stroke-width: 2;
    margin-right: 0;
}
.event-staffing-section .event-section-header {
    background: rgba(22, 101, 52, 0.5);
}

.event-interest-section .event-section-header {
    background: rgba(234, 88, 12, 0.5);
}

.event-unavailable-section .event-section-header {
    background: rgba(220, 38, 38, 0.5);
}

.event-section-header .event-staffing-edit {
    padding: 0;
    border: 0;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}
.event-staffing-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-section-body {
    padding: 0.3rem 0.5rem;
}

.event-section-empty {
    margin: 0;
    padding: 0.35rem 0;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.event-participant-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.2rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.event-participant-row:last-child {
    border-bottom: 0;
}

.event-participants-panel .participant-avatar,
.event-participants-panel .comment-avatar {
    width: 30px;
    height: 30px;
    font-size: 0.65rem;
}

.event-participant-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    gap: 0.05rem;
}

.event-participant-name {
    color: var(--primary-blue);
    font-size: 0.75rem;
    font-weight: 700;
}

.event-participant-position {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.event-participant-time {
    flex: 0 0 auto;
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-style: italic;
}

.event-participant-action {
    margin-left: auto;
}

.event-participant-action button {
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.event-participant-action button:hover {
    color: #dc2626;
}

.event-participant-remove {
    margin-left: auto;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
}
.event-participant-remove:hover {
    color: #dc2626;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.data-table th {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}
.data-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #e2e8f0;
    color: #1e293b;
}
.data-table tbody tr:hover {
    background: #f8fafc;
}

.staffing-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(560px, calc(100% - 2rem));
    max-height: calc(100% - 2rem);
    padding: 0;
    border: 0;
    border-radius: 0.875rem;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
}

.staffing-modal::backdrop {
    background: rgba(15, 23, 42, 0.55);
}

.staffing-modal-content {
    max-height: 70vh;
    padding: 0.75rem 1rem;
    overflow-y: auto;
}

.staffing-modal-position {
    margin-bottom: 1rem;
}

.staffing-modal-position:last-child {
    margin-bottom: 0;
}

.staffing-modal-position h5 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.5rem;
    padding: 0.35rem 0.5rem;
    border-radius: 0.375rem;
    background: #f0f0f0;
    color: var(--primary-blue);
    font-size: 0.8125rem;
}

.staffing-delete-position-form {
    margin: 0 0 0 auto;
}

.staffing-delete-position {
    padding: 0.1rem;
    border: none;
    border-radius: 0.25rem;
    background: transparent;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1;
}

.staffing-delete-position svg {
    width: 12px;
    height: 12px;
    stroke-width: 2;
}
.staffing-delete-position:hover {
    background: #fee2e2;
}

.staffing-modal-participants {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.staffing-user-search {
    margin-top: 0.5rem;
    position: relative;
}
.staffing-search-input {
    width: 100%;
    padding: 0.35rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-family: inherit;
}
.staffing-search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(19, 44, 92, 0.1);
}
.staffing-search-results {
    display: none;
    margin-top: 0.25rem;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    background: #fff;
}
.staffing-search-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.35rem 0.55rem;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font-size: 0.8125rem;
    font-family: inherit;
}
.staffing-search-item:last-child {
    border-bottom: 0;
}
.staffing-search-item:hover {
    background: #f5f5f5;
}
.staffing-search-empty {
    padding: 0.4rem 0.55rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.staffing-modal .participant-avatar,
.staffing-modal .comment-avatar {
    width: 26px;
    height: 26px;
    font-size: 0.625rem;
}

.staffing-toggle-form {
    display: inline-flex;
}

.staffing-toggle-button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.5rem 0.25rem 0.35rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #ffffff;
    cursor: pointer;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 650;
    transition: background-color 0.2s, border-color 0.2s;
}

.staffing-toggle-button:hover,
.staffing-toggle-button.assigned {
    border-color: var(--primary-blue);
    background: #f0f0f0;
}

.staffing-toggle-button.assigned {
    box-shadow: inset 0 0 0 1px var(--primary-blue);
}

.staffing-toggle-star svg {
    width: 11px;
    height: 11px;
    stroke-width: 2;
}

.staffing-modal-new-position {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px dashed #e2e8f0;
}

.staffing-modal-new-position h5 {
    margin: 0 0 0.5rem;
    color: var(--primary-blue);
    font-size: 0.875rem;
}

.new-position-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.new-position-fields {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.new-position-fields input[type="text"] {
    flex: 1;
    min-width: 160px;
    padding: 0.45rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.4rem;
    font: inherit;
    font-size: 0.8125rem;
}

.new-position-fields input[type="number"] {
    width: 80px;
    padding: 0.45rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.4rem;
    font: inherit;
    font-size: 0.8125rem;
}

.new-position-users {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    max-height: 180px;
    overflow-y: auto;
    padding: 0.35rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: #fbfcfe;
}

.new-position-user {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.5rem 0.25rem 0.35rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #ffffff;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 650;
}

.new-position-user input[type="checkbox"] {
    margin: 0;
}

.new-position-form .btn {
    align-self: flex-start;
}

.event-comments-list {
    max-height: 240px;
    overflow-y: auto;
    margin-bottom: 0.5rem;
}

.event-comment {
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--border);
}

.event-comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-comments-list .wall-comment-menu-popup {
    position: fixed;
    top: auto;
    bottom: auto;
    right: auto;
    min-width: auto;
    width: auto;
    white-space: nowrap;
}

.event-comment-toggle-btn {
    display: none;
}

.event-comments-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-harmonogram-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    background: transparent;
    color: #64748b;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.15s;
}

.event-harmonogram-btn:hover {
    background: #f5f5f5;
    color: #3D3D3D;
}

.event-harmonogram-btn svg {
    width: 14px;
    height: 14px;
    stroke-width: 2;
}

.harmonogram-comment {
    margin: 0.4rem 0;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    max-width: 360px;
}

.harmonogram-comment-title {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    background: #f5f5f5;
    color: #2D2D2D;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.harmonogram-comment-title svg {
    width: 12px;
    height: 12px;
    stroke-width: 2;
}

.harmonogram-comment-date {
    margin-left: auto;
    font-size: 0.65rem;
    font-weight: 400;
    color: #94a3b8;
    text-transform: none;
    letter-spacing: 0;
}

.harmonogram-comment-title .wall-comment-menu {
    margin-left: 0.25rem;
}

.harmonogram-comment-title .wall-comment-dots {
    font-size: 0.9rem;
    line-height: 1;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 0;
}

.harmonogram-comment-title .wall-comment-dots:hover {
    color: #475569;
}

.harmonogram-comment-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

.harmonogram-comment-table td {
    padding: 0.2rem 0.6rem;
    border-bottom: none;
}

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

.harmonogram-comment-table tr:hover td {
    background: #f8fafc;
}

.harmonogram-comment-time {
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
    width: 55px;
    font-variant-numeric: tabular-nums;
}

.harmonogram-comment-desc {
    color: #64748b;
    line-height: 1.3;
}

.event-service-details > .event-service-location {
    display: none;
}

.event-comment-edit-form {
    margin-top: 0.35rem;
}

.event-comment-edit-form textarea {
    width: 100%;
    padding: 0.45rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font: inherit;
    font-size: 0.8125rem;
    resize: vertical;
}

.event-comment-edit-actions {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.event-comment-meta {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    flex-wrap: wrap;
    min-width: 0;
}

.event-comment-meta strong {
    font-size: 0.75rem;
    color: var(--primary-blue);
}

.event-comment-meta time {
    color: var(--text-muted);
    font-size: 0.6875rem;
}

.event-comment p {
    margin: 0.2rem 0 0 2rem;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.event-comment-form {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.comment-input-wrap {
    position: relative;
}

.comment-input-wrap textarea {
    width: 100%;
    resize: vertical;
    min-height: 4.2rem;
    padding: 1.75rem 1.75rem 0.45rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font: inherit;
    font-size: 0.8125rem;
}

.comment-input-wrap textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(19, 44, 92, 0.15);
}

.comment-send-btn {
    position: absolute;
    right: 0.45rem;
    bottom: 0.45rem;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--primary-blue);
    font-size: 1.25rem;
    line-height: 1;
    opacity: 0.5;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
}

.comment-harmonogram-btn {
    bottom: auto;
    top: 0.45rem;
    color: #64748b;
}

.comment-send-btn svg {
    width: 14px;
    height: 14px;
    stroke-width: 2;
}
.comment-send-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.event-list-section {
    margin-bottom: 1.25rem;
}

.event-list-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.event-list-tab {
    padding: 0.5rem 0.75rem;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: color 0.15s, border-color 0.15s;
}

.event-list-tab:hover,
.event-list-tab.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

.event-list-short {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-height: 400px;
    overflow-y: auto;
}

.event-list-item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    margin-bottom: 0.375rem;
    transition: background 0.15s, border-color 0.15s;
}

.event-list-item:hover {
    background: #f5f5f5;
    border-color: var(--primary-blue);
}

.event-list-link {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) minmax(0, 160px);
    align-items: center;
    gap: 0.75rem;
    padding: 0.25rem 0.125rem;
    color: var(--text);
    text-decoration: none;
}

.event-list-action {
    display: inline-flex;
}

.event-list-action .btn {
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
}

.event-list-date {
    color: var(--text-muted);
    font-size: 0.8125rem;
    white-space: nowrap;
}

.event-list-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-list-place {
    color: var(--text-muted);
    font-size: 0.8125rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
}

.profile-bio {
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9375rem;
    line-height: 1.5;
    max-width: 600px;
}

.bio-toggle {
    padding: 0;
    border: none;
    background: transparent;
    color: var(--primary-blue);
    font-size: 0.875rem;
    text-decoration: underline;
    cursor: pointer;
    margin-top: 0.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        line-height: 1.4;
    }
    .dashboard-container {
        display: flex;
        flex-direction: column;
    }

    .dashboard-header {
        padding: 0.75rem 1rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-content {
        padding: 1rem;
    }

    .user-info {
        width: 100%;
        justify-content: space-between;
    }

    .user-cards-grid,
    .settings-grid,
    .response-summary-grid,
    .event-card-layout {
        grid-template-columns: 1fr;
    }

    .user-card-photo {
        width: 100px;
    }

    .user-card-header {
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem;
    }

    .user-card-edit {
        margin-left: 0;
        flex-basis: 100%;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .settings-list-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .event-card-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .event-info-panel,
    .event-participants-panel {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

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

    .user-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .user-card-main {
        width: 100%;
    }

    .user-card-meta,
    .user-card-actions {
        width: 100%;
        justify-content: space-between;
    }

    .login-box,
    .error-container {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .brand h1,
    .dashboard-header h1 {
        font-size: 1rem;
    }

    .logo {
        height: 24px;
        max-width: 100px;
    }

    .login-box .logo,
    .error-container .logo {
        height: 36px;
    }

    .user-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .dashboard-nav {
        gap: 0.25rem;
    }

    .nav-item {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* Email trigger for assigned workers */
.event-email-trigger {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.25rem;
    margin-left: 0.25rem;
    line-height: 1;
}
.event-email-trigger svg {
    width: 12px;
    height: 12px;
    stroke-width: 2;
}
.event-email-trigger.sent {
    color: #3D3D3D;
}
.event-email-sent-time {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-left: 0.25rem;
    white-space: nowrap;
}
.email-modal-list {
    max-height: 60vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
}
.email-modal-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    cursor: pointer;
}
.email-modal-user input[type="checkbox"] {
    flex-shrink: 0;
    width: 1.1rem;
    height: 1.1rem;
}
.email-modal-user small {
    color: var(--text-muted);
    font-size: 0.75rem;
}
.email-sent-at {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.75rem;
    white-space: nowrap;
}
.event-position-free .event-participant-name {
    color: var(--text-muted);
}
.event-position-free .avatar-initials {
    background: #e2e8f0;
    color: #64748b;
}
.position-free-icon {
    background: var(--primary-blue);
    color: #fff;
}
.position-free-icon iconify-icon {
    font-size: 18px;
    color: #fff;
}

.position-assign-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    padding: 0.3rem 0.6rem;
    border: 1px dashed var(--border);
    border-radius: 999px;
    background: #f8fafc;
    cursor: pointer;
    font: inherit;
    font-size: 0.75rem;
    color: var(--text);
    transition: all 0.15s;
}
.position-assign-btn:hover {
    border-color: var(--primary-blue);
    background: #f5f5f5;
}
.position-assign-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
}
.position-assign-icon iconify-icon {
    font-size: 16px;
    color: #fff;
}
.position-assign-label {
    white-space: nowrap;
}

.assign-modal-loading {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}
.assign-modal-users {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.5rem;
}
.assign-user-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: #fff;
    text-align: left;
    cursor: pointer;
    font: inherit;
    font-size: 0.8125rem;
    transition: all 0.15s;
}
.assign-user-row:hover:not(.assigned):not(.other-position) {
    border-color: var(--primary-blue);
    background: #f5f5f5;
}
.assign-user-row.assigned {
    opacity: 0.5;
    cursor: default;
    background: #f0fdf4;
    border-color: #bbf7d0;
}
.assign-user-row.other-position {
    opacity: 0.5;
    cursor: default;
    background: #f1f5f9;
    border-color: #cbd5e1;
}
.assign-user-other {
    font-size: 0.6875rem;
    color: #64748b;
    font-style: italic;
    white-space: nowrap;
}
.assign-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
}
.assign-user-avatar.avatar-initials {
    background: #e2e8f0;
    color: #64748b;
}
.assign-user-avatar.avatar-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.assign-user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}
.assign-user-name {
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.assign-user-meta {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.assign-user-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    white-space: nowrap;
}
.assign-user-badge svg {
    width: 11px;
    height: 11px;
}
.badge-attending {
    background: #dcfce7;
    color: #16a34a;
}
.badge-interested {
    background: #fed7aa;
    color: #ea580c;
}
.badge-unavailable {
    background: #fee2e2;
    color: #dc2626;
}
.assign-user-hours {
    font-size: 0.6875rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.assign-user-check {
    color: #16a34a;
}
.assign-user-check svg {
    width: 16px;
    height: 16px;
}
.responses-modal-users {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.25rem;
}
.response-user-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.6rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.response-user-card .user-avatar {
    width: 40px;
    height: 40px;
    font-size: 0.75rem;
    flex-shrink: 0;
}
.response-user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}
.response-user-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-blue);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.response-user-hours {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.response-user-buttons {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}
.response-user-buttons .btn {
    padding: 0.3rem 0.65rem;
    font-size: 0.75rem;
    white-space: nowrap;
}
.response-user-buttons .btn.active[data-response="attending"] {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2);
}
.response-user-buttons .btn.active[data-response="interested"] {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2);
}
.response-user-buttons .btn.active[data-response="unavailable"] {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2);
}
.response-user-buttons .btn.active[data-response="none"] {
    background: #64748b;
    color: #fff;
    border-color: #64748b;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2);
}
.responses-modal-loading,
.responses-modal .assign-modal-empty,
.responses-modal .assign-modal-error {
    text-align: center;
    padding: 1.5rem 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}
.positions-modal-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.25rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}
.positions-modal-row:last-child {
    border-bottom: 0;
}
.positions-modal-label {
    flex: 1;
    color: var(--text);
}
.positions-modal-count {
    font-weight: 700;
    color: var(--primary-blue);
    white-space: nowrap;
}
.positions-modal-count-input {
    width: 55px;
    padding: 0.2rem 0.35rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    text-align: center;
    transition: border-color 0.15s;
}
.positions-modal-count-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(19, 44, 92, 0.1);
}
.positions-modal-custom {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px dashed #e2e8f0;
}
.positions-modal-custom h5 {
    margin: 0 0 0.5rem;
    color: var(--primary-blue);
    font-size: 0.875rem;
}
.positions-modal-zero {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.positions-modal-zero h5 {
    margin: 0 0 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}
.positions-modal-zero .positions-modal-row {
    opacity: 0.6;
}
.positions-modal-new-custom {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px dashed #e2e8f0;
}
.positions-modal-new-custom h5 {
    margin: 0 0 0.5rem;
    color: var(--primary-blue);
    font-size: 0.875rem;
}
.new-position-fields {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.new-position-fields input {
    flex: 1;
}
.email-modal-form .event-form-actions {
    padding: 0 1rem 1rem;
    justify-content: flex-end;
    gap: 0.75rem;
}
.admin-filter-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}
.admin-filter-tag {
    display: inline-flex;
    gap: 0.5rem;
    padding: 0.4rem 0.65rem;
    background: #e8e8e8;
    border-radius: 999px;
    color: #2D2D2D;
    font-size: 0.875rem;
}
.admin-filter-tag a {
    color: inherit;
    text-decoration: none;
    font-weight: 700;
}
.admin-emails-table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
}
.admin-emails-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}
.admin-emails-table th,
.admin-emails-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.admin-emails-table th {
    background: #f8fafc;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.admin-emails-table td a {
    color: var(--primary-blue);
    text-decoration: none;
}
.email-status {
    white-space: nowrap;
    font-size: 0.8rem;
}
.email-status.read { color: #15803d; }
.email-status.unread { color: #a16207; }
.admin-email-actions,
.inline-form {
    display: inline-flex;
    gap: 0.5rem;
}
.email-preview-modal {
    width: min(760px, calc(100vw - 4rem)) !important;
    max-width: min(760px, calc(100vw - 4rem)) !important;
    max-height: calc(100vh - 4rem) !important;
    top: 2rem !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}
.email-preview-modal .location-modal-header {
    flex-shrink: 0;
}
.email-preview-modal iframe {
    display: block;
    width: 100%;
    flex: 1;
    min-height: 0;
    border: 0;
    background: #f1f5f9;
}
.wages-container { max-width: 100%; margin: 0 auto; }
.wage-settings {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.wage-rate-form { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.wage-rate-form label { font-weight: 600; font-size: 0.85rem; }
.wage-rate-form input { width: 100px; padding: 0.3rem 0.5rem; border: 1px solid var(--border); border-radius: 0.4rem; font-size: 0.85rem; }

.wages-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}
.wages-tab {
    padding: 0.6rem 1.2rem;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}
.wages-tab:hover { color: var(--primary-blue); }
.wages-tab.active { color: var(--primary-blue); border-bottom-color: var(--primary-blue); }

.wage-event-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    overflow: hidden;
}
.wage-event-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}
.wage-event-header h3 { margin: 0 0 0.25rem; font-size: 1rem; color: var(--primary-blue); }
.wage-event-date { display: block; font-size: 0.8rem; color: var(--text-muted); }
.wage-event-location { display: block; font-size: 0.8rem; color: var(--text-muted); }

.wage-table-wrap { overflow-x: auto; }
.wage-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}
.wage-table th {
    text-align: left;
    padding: 0.5rem 0.6rem;
    background: #f1f5f9;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
}
.wage-table td {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.wage-table tfoot td {
    border-top: 2px solid var(--border);
    border-bottom: none;
    padding: 0.6rem;
    font-weight: 700;
}
.wage-total-label { text-align: right; }
.wage-event-total { color: var(--primary-blue); font-size: 0.9rem; }

.wage-worker-name { font-weight: 600; white-space: nowrap; }
.wage-hours { text-align: center; color: var(--text-muted); }
.wage-total { font-weight: 700; color: var(--primary-blue); white-space: nowrap; }

.wage-input {
    width: 150px;
    padding: 0.25rem 0.4rem;
    border: 1px solid var(--border);
    border-radius: 0.3rem;
    font-size: 0.8rem;
}
.wage-input[type="datetime-local"] {
    width: auto;
    border: none !important;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    padding: 0.25rem 0;
    font-size: 0.8rem;
    color: var(--text);
}
.wage-input[type="datetime-local"]:focus {
    outline: none;
    color: var(--primary-blue);
}
.wage-input-rate, .wage-input-bonus { width: 70px; }
.wage-input:focus { border-color: var(--primary-blue); outline: none; }

.wage-paid-cell { text-align: center; white-space: nowrap; }
.wage-bonus-cell { white-space: nowrap; vertical-align: middle; }
.wage-bonus-cell input { vertical-align: middle; }
.wage-bonus-note-btn {
    background: none;
    border: none;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding: 0;
    margin-left: 0.2rem;
    color: var(--text-muted);
    display: inline-block;
    vertical-align: middle;
    line-height: 0;
    box-shadow: none;
}
.wage-bonus-note-btn:hover { color: var(--primary-blue); }
.wage-bonus-note-btn.has-note { color: var(--primary-blue); }
.wage-bonus-link { cursor: pointer; }
.wage-bonus-link:hover { text-decoration: underline; }
.wage-paid-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
    padding: 0.2rem;
    transition: transform 0.15s;
}
.wage-paid-toggle:hover { transform: scale(1.2); }
.wage-paid-time { display: block; font-size: 0.65rem; color: var(--text-muted); margin-top: 0.15rem; }

.wage-paid-form { display: inline; }
.wage-invoice-toggle-wrap { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.wage-invoice-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0.2rem;
    transition: transform 0.15s;
}
.wage-invoice-toggle:hover { transform: scale(1.2); }
.wage-invoice-time { font-size: 0.65rem; color: var(--text-muted); margin-top: 0.15rem; }

.wage-row-form { display: contents; }

/* Wage user modal */
.wage-user-modal {
    border: none;
    border-radius: 0.75rem;
    padding: 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    width: min(360px, 94vw);
    max-width: 94vw;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}
.wage-user-modal:has(.wage-user-modal-content[style*="max-width"]) {
    width: min(750px, 94vw);
}
.wage-user-modal::backdrop { background: rgba(0,0,0,0.4); }
.wage-user-modal-content { padding: 1.1rem 1.25rem; position: relative; }
.wage-user-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
}
.wage-user-modal-close:hover { color: var(--text-dark); }
.wage-user-modal-top {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.wage-user-modal-top h3 { margin: 0 0 0.3rem; font-size: 1rem; color: var(--primary-blue); }
.wage-user-modal-info { flex: 1; min-width: 0; }
.wage-user-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    flex-shrink: 0;
}
.wage-user-photo-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 2px solid var(--border);
    flex-shrink: 0;
}
.wage-user-account-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}
.wage-user-account {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: 0.5px;
    word-break: break-all;
}
.wage-user-account-empty {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
}
.wage-user-info { cursor: pointer; }
.wage-user-info:hover { text-decoration: underline; color: var(--primary-blue); }

/* Profile wages sidebar */
.profile-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: flex-start;
}
.profile-wages-sidebar {
    position: sticky;
    top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.profile-wages-panel {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: var(--shadow);
}
.profile-wages-panel h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.profile-wages-panel h3 svg { width: 18px; height: 18px; flex-shrink: 0; }
.profile-edit-emoji svg { width: 18px; height: 18px; }
.profile-wages-years {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.profile-wages-year-btn {
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 0.3rem;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    background: #fff;
    transition: all 0.15s;
}
.profile-wages-year-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}
.profile-wages-year-btn.active {
    background: var(--primary-blue);
    color: #fff;
    border-color: var(--primary-blue);
}
.profile-wages-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}
.profile-wages-table th {
    text-align: left;
    padding: 0.4rem 0.3rem;
    background: #f1f5f9;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    white-space: nowrap;
}
.profile-wages-table td {
    padding: 0.35rem 0.3rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.profile-wages-table td:nth-child(2) {
    white-space: nowrap;
}
.profile-wages-table tfoot td {
    border-top: 2px solid var(--border);
    border-bottom: none;
    padding: 0.5rem 0.3rem;
    font-weight: 700;
}
.profile-wages-total { font-weight: 700; color: var(--primary-blue); white-space: nowrap; }
.profile-wages-sum-label { text-align: right; }
.profile-wages-sum { color: var(--primary-blue); }
.profile-wages-table a { text-decoration: none; color: var(--primary-blue); }
.profile-wages-table a:hover { text-decoration: underline; }
@media (max-width: 900px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
    .profile-wages-sidebar {
        position: static;
    }
}
.profile-edit-emoji {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
    padding: 0.2rem;
    text-decoration: none;
    transition: transform 0.15s;
    flex-shrink: 0;
}
.profile-edit-emoji:hover {
    transform: scale(1.2);
}

/* Standardy */
.standardy-container {
    width: 100%;
}
.standardy-hero {
    padding: 2rem 0 1.5rem;
}
.standardy-hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 1rem;
    background: linear-gradient(135deg, #3D3D3D, #2D2D2D);
    color: #fff;
    margin-bottom: 1rem;
}
.standardy-hero-icon i {
    width: 32px;
    height: 32px;
}
.standardy-hero h2 {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-blue);
    margin: 0 0 0.4rem;
}
.standardy-hero p {
    color: var(--text-muted);
    font-size: 12px;
    margin: 0;
}
.standardy-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0 0 2rem;
}
.standardy-nav-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s;
}
.standardy-nav-tab:hover {
    background: #e2e8f0;
    color: var(--primary-blue);
}
.standardy-nav-tab i {
    width: 16px;
    height: 16px;
}
.standardy-section {
    margin-bottom: 2rem;
    scroll-margin-top: 1rem;
}
.standardy-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem 0.75rem 0 0;
    color: #fff;
}
.standardy-section-blue {
    background: var(--primary-blue);
}
.standardy-section-green {
    background: #059669;
}
.standardy-section-amber {
    background: #d97706;
}
.standardy-section-red {
    background: #dc2626;
}
.standardy-section-num {
    font-size: 1.3rem;
    font-weight: 800;
    opacity: 0.5;
}
.standardy-section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 0.5rem;
    background: rgba(255,255,255,0.2);
}
.standardy-section-icon i {
    width: 20px;
    height: 20px;
    color: #fff;
}
.standardy-section-header h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    flex: 1;
}
.standardy-section-subtitle {
    font-size: 0.8rem;
    opacity: 0.8;
    font-weight: 500;
}
.standardy-rules {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 0.75rem 0.75rem;
    padding: 0.5rem 1.25rem 1rem;
}
.standardy-rule {
    display: flex;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid #f1f5f9;
}
.standardy-rule:last-child {
    border-bottom: none;
}
.standardy-rule-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 0.5rem;
    background: #f5f5f5;
    color: var(--primary-blue);
}
.standardy-rule-icon i {
    width: 20px;
    height: 20px;
}
.standardy-rule > div {
    flex: 1;
}
.standardy-rule > div > strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.15rem;
}
.standardy-rule p {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.55;
}
.standardy-rule p strong {
    color: var(--primary-blue);
}
.standardy-rule em {
    color: #475569;
    font-style: italic;
}
.standardy-uniform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 0.75rem 0.75rem;
    padding: 1.25rem;
}
.standardy-uniform-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.625rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.standardy-uniform-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.standardy-uniform-card-header h4 {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}
.standardy-uniform-card-header h4 i {
    width: 18px;
    height: 18px;
    color: var(--primary-blue);
}
.standardy-uniform-links {
    display: flex;
    gap: 0.35rem;
}
.standardy-link-btn {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 0.35rem;
    background: var(--primary-blue);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}
.standardy-link-btn:hover {
    background: #2D2D2D;
    text-decoration: none;
}
.standardy-link-photo {
    background: #64748b;
}
.standardy-link-photo:hover {
    background: #475569;
}
.standardy-uniform-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}
.standardy-discount {
    font-size: 12px;
    color: #475569;
}
.standardy-discount code {
    background: #f5f5f5;
    color: var(--primary-blue);
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 11px;
    font-weight: 600;
}
@media (max-width: 640px) {
    .standardy-rule {
        gap: 0.6rem;
    }
    .standardy-rule-icon {
        width: 32px;
        height: 32px;
    }
    .standardy-rule-icon i {
        width: 16px;
        height: 16px;
    }
    .standardy-uniform-grid {
        grid-template-columns: 1fr;
    }
    .standardy-nav-tab {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }
}

/* Záznamy */
.zaznamy-container {
    max-width: 100%;
}
.zaznamy-mobile-back {
    display: none;
}
.zaznamy-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.zaznamy-tab {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--card-bg);
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.zaznamy-tab svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
    flex-shrink: 0;
}
.zaznamy-tab:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}
.zaznamy-tab.active {
    background: var(--primary-blue);
    color: #fff;
    border-color: var(--primary-blue);
}
.zaznamy-panel {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}
.zaznamy-panel h3 {
    margin: 0 0 1rem 0;
}
.zaznamy-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}
.zaznamy-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.25rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.zaznamy-card-icon {
    font-size: 2rem;
}
.zaznamy-card h4 {
    margin: 0;
    font-size: 1rem;
}
.zaznamy-card p {
    margin: 0;
    font-size: 0.85rem;
}
.btn-sm {
    padding: 0.4rem 0.875rem;
    font-size: 0.8rem;
}

/* Report wizard */
.report-step {
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    background: #fff;
}
.report-step.hidden {
    display: none;
}
.report-step.collapsed .report-step-body,
.report-step.collapsed .report-step-actions {
    display: none;
}
.report-step.collapsed {
    background: #f8fafc;
    opacity: 0.85;
}
.report-step.collapsed .report-step-header {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
    cursor: pointer;
}
.report-step.collapsed .report-step-header::after {
    content: ' ✏️';
    font-size: 0.8rem;
    opacity: 0.5;
}
.report-step-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}
.report-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--primary-blue);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.report-step-header h4 {
    margin: 0;
    font-size: 1.1rem;
}
.report-step-body {
    margin-bottom: 1rem;
}
.report-step-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}
.report-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 0.95rem;
    background: #fff;
}
.report-select-sm {
    width: auto;
    min-width: 200px;
}
.report-input {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 0.9rem;
}
.report-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
}
.report-workers-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.report-worker-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
}
.report-worker-name {
    font-weight: 600;
    font-size: 0.9rem;
}
.report-add-worker {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.report-time-bulk {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    padding: 0.75rem;
    background: #f0f4f8;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}
.report-time-bulk label {
    font-weight: 600;
    font-size: 0.85rem;
}
.report-event-date-info {
    font-size: 0.85rem;
    color: var(--text-muted, #64748b);
    margin-bottom: 0.75rem;
    font-weight: 600;
}
.report-time-bulk-fields {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.report-time-fields {
    display: flex;
    gap: 0.5rem;
    flex: 1;
}
.report-time-label {
    display: flex;
    flex-direction: column;
    font-size: 0.7rem;
    color: var(--text-muted, #64748b);
    font-weight: 500;
    gap: 0.15rem;
    flex: 1;
}
.report-time-label input {
    font-size: 0.85rem;
}
.report-time-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.report-time-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
}
.report-time-name {
    font-weight: 600;
    font-size: 0.85rem;
    min-width: 150px;
}
.report-quick-notes {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.report-quick-note-btn {
    text-align: left;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    background: #f8fafc;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.15s;
}
.report-quick-note-btn:hover {
    border-color: var(--primary-blue);
    background: #f5f5f5;
}
.report-recap {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.recap-section {
    font-size: 0.95rem;
}
.recap-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.recap-table th,
.recap-table td {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    text-align: left;
}
.recap-table th {
    background: #f1f5f9;
    font-weight: 600;
}
.recap-worker-card {
    display: none;
}

/* Reports table */
.zaznamy-reports-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.zaznamy-reports-table th,
.zaznamy-reports-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.zaznamy-reports-table th {
    background: #f1f5f9;
    font-weight: 600;
}
.zaznamy-reports-table tr:hover td {
    background: #f8fafc;
}
.report-note-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Report detail modal */
.report-detail-modal {
    border: none;
    border-radius: 0.75rem;
    padding: 0;
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
    max-width: 600px;
    width: 90%;
    inset: 0;
    margin: auto;
}
.report-detail-content {
    padding: 1.5rem;
}
.report-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}
.report-detail-header h4 {
    margin: 0;
}
.report-detail-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
}
.report-detail-row {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}
.report-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin: 0.75rem 0;
}
.report-detail-table th,
.report-detail-table td {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    text-align: left;
}
.report-detail-table th {
    background: #f1f5f9;
}

/* Inline report detail */
.report-detail-row.hidden {
    display: none;
}
.report-inline-detail {
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-radius: 0.5rem;
}

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}
.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Buttons */
.btn-success {
    background: #16a34a;
    color: #fff;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
}
.btn-success:hover {
    background: #15803d;
}
.btn-secondary {
    background: #e2e8f0;
    color: #334155;
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
}
.btn-secondary:hover {
    background: #cbd5e1;
}
.btn-danger {
    background: #dc2626;
    color: #fff;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 0.3rem;
    cursor: pointer;
    font-size: 0.8rem;
}
.btn-danger:hover {
    background: #b91c1c;
}

/* ===== Treatment form ===== */
.treatment-section {
    border: 1px solid #e2e8f0;
    border-radius: 0.625rem;
    margin-bottom: 1.25rem;
    overflow: hidden;
}
.treatment-section-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    background: #f1f5f9;
    cursor: pointer;
    user-select: none;
}
.treatment-section-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: #3D3D3D;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}
.treatment-section-header h4 {
    margin: 0;
    font-size: 1rem;
    color: #1e293b;
}
.treatment-section-body {
    padding: 1rem;
}
.treatment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}
.treatment-grid .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.treatment-grid .form-group.form-checkbox {
    align-self: end;
    padding-bottom: 0.3rem;
}
.treatment-grid input,
.treatment-grid select,
.treatment-grid textarea {
    width: 100%;
    padding: 0.5rem 0.625rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}
.treatment-section-body .form-group {
    margin-bottom: 0.875rem;
}
.treatment-section-body .form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.2rem;
}
.treatment-section-body input[type="text"],
.treatment-section-body input[type="date"],
.treatment-section-body input[type="datetime-local"],
.treatment-section-body select,
.treatment-section-body textarea {
    width: 100%;
    padding: 0.5rem 0.625rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}
.treatment-section-body textarea {
    resize: vertical;
    font-family: inherit;
}
.treatment-coworkers-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.treatment-coworker-row {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: #e0e7ff;
    color: #2D2D2D;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.8rem;
}
.treatment-coworker-row button {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
}
.treatment-add-coworker {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.treatment-add-coworker select {
    flex: 1;
    max-width: 300px;
}
.treatment-materials {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.treatment-material-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 1rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.8rem;
    cursor: pointer;
    user-select: none;
}
.treatment-material-chip input {
    display: none;
}
.treatment-material-chip:has(input:checked) {
    background: #e8e8e8;
    border-color: #3D3D3D;
    color: #2D2D2D;
    font-weight: 600;
}
.treatment-coop-item .checkbox-pill input {
    display: none;
}
.treatment-coop-item .checkbox-pill:has(input:checked) {
    font-weight: 600;
}
.treatment-coop-item {
    display: inline-flex;
    flex-direction: column;
    gap: 0.3rem;
}
.treatment-coop-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    cursor: pointer;
}
.coop-time {
    font-size: 0.8rem;
    padding: 0.3rem 0.4rem;
}
.treatment-signatures {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}
.treatment-signature-box {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.treatment-signature-box label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}
.signature-canvas {
    width: 100%;
    height: 150px;
    border: 2px dashed #cbd5e1;
    border-radius: 0.5rem;
    background: #fff;
    cursor: crosshair;
    touch-action: none;
}
.treatment-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
}
.treatment-status-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}
.treatment-status-draft {
    background: #fef3c7;
    color: #92400e;
}
.treatment-status-submitted {
    background: #d1fae5;
    color: #065f46;
}

/* ===== UX Improvements: Záznamy ===== */

/* Scrollable tabs with fade */
.zaznamy-tabs {
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 0.25rem;
}
.zaznamy-tabs::-webkit-scrollbar {
    height: 4px;
}
.zaznamy-tabs::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}
.zaznamy-tabs-scroll-fade {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0.25rem;
    width: 2rem;
    background: linear-gradient(to right, transparent, #fff);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}
.zaznamy-tabs:hover .zaznamy-tabs-scroll-fade {
    opacity: 1;
}
.zaznamy-tab {
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
}
.zaznamy-tab:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}
.zaznamy-tab.active {
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

/* Clickable cards */
.zaznamy-card-link {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    cursor: pointer;
}
.zaznamy-card-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-blue);
}
.zaznamy-card-link .btn {
    pointer-events: none;
}
.zaznamy-card-accent {
    border-left: 3px solid #5A5A5A;
}
.zaznamy-card-accent .zaznamy-card-icon {
    color: #3D3D3D;
}

/* Empty states */
.zaznamy-empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
.zaznamy-empty-icon {
    font-size: 3rem;
    opacity: 0.5;
}
.zaznamy-empty-state p {
    color: #64748b;
    margin: 0;
}

/* Table wrapper for horizontal scroll on mobile */
.zaznamy-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Treatment list cards (replaces table) */
.zaznamy-treatment-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.treatment-list-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.625rem;
    padding: 0.875rem 1rem;
    transition: all 0.2s ease;
}
.treatment-list-card:hover {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}
.treatment-list-card--draft {
    border-left: 3px solid #f59e0b;
}
.treatment-list-card--submitted {
    border-left: 3px solid #10b981;
}
.treatment-list-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.treatment-list-card-name {
    font-weight: 700;
    font-size: 1rem;
    color: #1e293b;
}
.treatment-list-card-date {
    font-size: 0.8rem;
    color: #64748b;
}
.treatment-list-card-event {
    display: block;
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 0.125rem;
}
.treatment-list-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}
.treatment-list-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.treatment-list-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.treatment-list-card-actions {
    display: flex;
    gap: 0.5rem;
}

/* Collapsible treatment sections */
.treatment-section-collapsed .treatment-section-body {
    display: none;
}
.treatment-section-collapsed .treatment-section-header {
    border-bottom: none;
}
.treatment-section-collapsed .treatment-section-header::after {
    content: '▾';
    margin-left: auto;
    color: #94a3b8;
    font-size: 0.85rem;
}
.treatment-section-header::after {
    content: '▴';
    margin-left: auto;
    color: #94a3b8;
    font-size: 0.85rem;
    transition: transform 0.2s;
}
.treatment-section-header {
    transition: background 0.15s;
}
.treatment-section-header:hover {
    background: #e2e8f0;
}

/* Sticky treatment actions on mobile */
.treatment-actions {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 0.75rem 0;
    z-index: 10;
}

/* ===== Mobile responsive ===== */
@media (max-width: 768px) {
    .zaznamy-panel {
        padding: 1rem;
        border-radius: 0.5rem;
    }
    .zaznamy-panel h3 {
        font-size: 1.1rem;
    }

    /* Tabs: hidden in mobile, navigation via hero cards */
    .zaznamy-tabs {
        display: none;
    }

    /* Mobile back button */
    .zaznamy-mobile-back {
        display: flex;
        align-items: center;
        gap: 0.375rem;
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.75rem;
        font-size: 0.85rem;
        color: var(--color-primary, #3D3D3D);
        text-decoration: none;
        background: transparent;
        border: none;
        cursor: pointer;
    }
    .zaznamy-mobile-back:hover {
        text-decoration: underline;
    }

    /* Cards: single column */
    .zaznamy-cards {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .zaznamy-card {
        padding: 1rem;
    }
    .zaznamy-card-icon {
        font-size: 1.75rem;
    }

    /* Treatment form: compact sections */
    .treatment-section {
        margin-bottom: 0.75rem;
        border-radius: 0.5rem;
    }
    .treatment-section-header {
        padding: 0.625rem 0.75rem;
    }
    .treatment-section-num {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.75rem;
    }
    .treatment-section-header h4 {
        font-size: 0.9rem;
    }
    .treatment-section-body {
        padding: 0.75rem;
    }

    /* Treatment grid: single column on mobile */
    .treatment-grid {
        grid-template-columns: 1fr;
        gap: 0.625rem;
    }

    /* Form inputs: larger touch targets */
    .treatment-section-body input[type="text"],
    .treatment-section-body input[type="date"],
    .treatment-section-body input[type="datetime-local"],
    .treatment-section-body select,
    .treatment-section-body textarea {
        padding: 0.625rem 0.625rem;
        font-size: 0.9rem;
        min-height: 2.5rem;
    }

    /* Material chips: smaller on mobile */
    .treatment-materials {
        gap: 0.25rem;
    }
    .treatment-material-chip {
        padding: 0.2rem 0.4rem;
        font-size: 0.72rem;
    }

    /* Cooperation: 2 columns on mobile */
    .treatment-cooperation {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    /* Signatures: full width, taller */
    .treatment-signatures {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .signature-canvas {
        height: 180px;
    }

    /* Sticky action buttons */
    .treatment-actions {
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        flex-direction: column-reverse;
        gap: 0.5rem;
        background: #fff;
        border-top: 2px solid #e2e8f0;
        padding: 0.75rem 0.25rem;
        margin: 0 -0.75rem -0.75rem;
        z-index: 20;
    }
    .treatment-actions .btn {
        width: 100%;
        padding: 0.75rem;
        font-size: 1rem;
    }

    /* Coworker add row: stack */
    .treatment-add-coworker {
        flex-direction: column;
        align-items: stretch;
        gap: 0.375rem;
    }
    .treatment-add-coworker select {
        max-width: none;
        width: 100%;
    }

    /* Treatment list cards: compact */
    .treatment-list-card {
        padding: 0.75rem;
    }
    .treatment-list-card-header {
        flex-wrap: wrap;
        gap: 0.375rem;
    }
    .treatment-list-card-meta {
        gap: 0.5rem;
        font-size: 0.78rem;
    }
    .treatment-list-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .treatment-list-card-actions {
        width: 100%;
        justify-content: flex-end;
    }

    /* Report wizard: compact */
    .report-step {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    .report-step-header {
        gap: 0.5rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
    }
    .report-step-num {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.8rem;
    }
    .report-step-header h4 {
        font-size: 1rem;
    }
    .report-step-actions {
        flex-direction: column-reverse;
        gap: 0.375rem;
    }
    .report-step-actions .btn {
        width: 100%;
        text-align: center;
    }
    .report-time-bulk {
        flex-direction: column;
        align-items: stretch;
        gap: 0.375rem;
    }
    .report-time-bulk label {
        margin-bottom: 0.125rem;
    }
    .report-time-bulk-fields {
        gap: 0.375rem;
    }
    .report-time-row {
        flex-wrap: wrap;
        gap: 0.25rem;
        padding: 0.375rem 0.5rem;
    }
    .report-time-name {
        min-width: 0;
        width: 100%;
        font-size: 0.8rem;
        margin-bottom: 0.125rem;
    }
    .report-time-fields {
        gap: 0.375rem;
    }
    .report-time-label input {
        font-size: 0.8rem;
        padding: 0.3rem 0.4rem;
    }
    .report-add-worker {
        flex-direction: column;
        align-items: stretch;
        gap: 0.375rem;
    }
    .report-add-worker .report-select-sm {
        width: 100%;
        min-width: 0;
    }
    .report-quick-note-btn {
        font-size: 0.85rem;
        padding: 0.625rem 0.75rem;
    }

    /* Recap: compact card layout in mobile */
    .report-recap {
        gap: 0.375rem;
    }
    .recap-section {
        font-size: 0.85rem;
        line-height: 1.3;
        margin-bottom: 0;
    }
    .recap-table {
        display: none;
    }
    .recap-worker-card {
        display: flex;
        flex-direction: column;
        gap: 0.125rem;
        padding: 0.5rem 0.625rem;
        background: #f8fafc;
        border: 1px solid var(--border);
        border-radius: 0.375rem;
        font-size: 0.8rem;
    }
    .recap-worker-card-name {
        font-weight: 600;
        margin-bottom: 0.125rem;
    }
    .recap-worker-card-times {
        display: flex;
        gap: 0.75rem;
        color: var(--text-muted, #64748b);
        font-size: 0.75rem;
    }
    .recap-worker-card-wage {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 0.8rem;
        font-weight: 600;
        margin-top: 0.125rem;
    }
    .recap-worker-card-total {
        background: #e2e8f0;
        border-color: #cbd5e1;
    }
    .recap-worker-card-total .recap-worker-card-name {
        font-size: 0.85rem;
    }

    /* Reports table: horizontal scroll with hint */
    .zaznamy-table-wrap {
        margin: 0 -1rem;
        padding: 0 1rem;
    }

    /* Alerts: full width on mobile */
    .alert {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .zaznamy-cards {
        gap: 0.5rem;
    }
    .treatment-material-chip {
        font-size: 0.75rem;
        padding: 0.25rem 0.4rem;
    }
    .signature-canvas {
        height: 200px;
    }
}

/* ===== Hero overview ===== */
.zaznamy-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.zaznamy-hero-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 0.75rem;
    text-decoration: none;
    color: #1e293b;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}
.zaznamy-hero-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}
.zaznamy-hero-card--blue {
    border-left: 3px solid #5A5A5A;
}
.zaznamy-hero-card--green {
    border-left: 3px solid #10b981;
}
.zaznamy-hero-icon {
    font-size: 2rem;
    flex-shrink: 0;
}
.zaznamy-hero-text h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #1e293b;
}
.zaznamy-hero-text p {
    margin: 0.25rem 0 0 0;
    font-size: 0.85rem;
    color: #64748b;
}
.zaznamy-hero-arrow {
    margin-left: auto;
    font-size: 1.25rem;
    color: #94a3b8;
    transition: transform 0.2s;
}
.zaznamy-hero-card:hover .zaznamy-hero-arrow {
    transform: translateX(4px);
    color: #475569;
}

.zaznamy-secondary-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.zaznamy-secondary-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.15s;
}
.zaznamy-secondary-link:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #1e293b;
}

/* ===== Compact form layout ===== */
.zaznamy-panel--form {
    padding: 1.25rem;
}
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.form-checkbox-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}
.checkbox-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 1.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s;
    white-space: nowrap;
}
.checkbox-pill input {
    margin: 0;
    width: 1rem;
    height: 1rem;
    accent-color: #3D3D3D;
    flex-shrink: 0;
}
.checkbox-pill:has(input:checked) {
    background: #e8e8e8;
    border-color: #3D3D3D;
    color: #2D2D2D;
    font-weight: 600;
}

/* Tighter form groups in form panels */
.zaznamy-panel--form .form-group {
    margin-bottom: 0.625rem;
}
.zaznamy-panel--form .form-group label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.2rem;
    display: block;
}
.zaznamy-panel--form input[type="text"],
.zaznamy-panel--form input[type="date"],
.zaznamy-panel--form input[type="datetime-local"],
.zaznamy-panel--form select,
.zaznamy-panel--form textarea {
    width: 100%;
    padding: 0.5rem 0.625rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background: #fff;
}
.zaznamy-panel--form textarea {
    resize: vertical;
    font-family: inherit;
    min-height: 2.5rem;
}

/* Cooperation: horizontal pills, time input appears inline */
.treatment-cooperation {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.treatment-coop-item {
    flex-direction: row;
    align-items: center;
    gap: 0.375rem;
}
.coop-time {
    font-size: 0.78rem;
    padding: 0.3rem 0.4rem;
    width: auto;
    max-width: 180px;
}

/* Consistent section styling for both report and treatment */
.zaznamy-panel--form .report-step,
.zaznamy-panel--form .treatment-section {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    overflow: hidden;
}
.zaznamy-panel--form .report-step-header,
.zaznamy-panel--form .treatment-section-header {
    padding: 0.625rem 0.875rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.zaznamy-panel--form .report-step-num,
.zaznamy-panel--form .treatment-section-num {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.75rem;
}
.zaznamy-panel--form .report-step-header h4,
.zaznamy-panel--form .treatment-section-header h4 {
    font-size: 0.9rem;
    margin: 0;
}
.zaznamy-panel--form .report-step-body,
.zaznamy-panel--form .treatment-section-body {
    padding: 0.75rem 0.875rem;
}

/* ===== Mobile responsive v2 ===== */
@media (max-width: 768px) {
    /* Hero: stack vertically */
    .zaznamy-hero {
        grid-template-columns: 1fr;
        gap: 0.625rem;
    }
    .zaznamy-hero-card {
        padding: 1rem;
        gap: 0.75rem;
    }
    .zaznamy-hero-icon {
        font-size: 2rem;
    }
    .zaznamy-hero-text h3 {
        font-size: 1.05rem;
    }
    .zaznamy-hero-text p {
        font-size: 0.8rem;
    }

    /* Secondary links: full width row */
    .zaznamy-secondary-links {
        gap: 0.5rem;
    }
    .zaznamy-secondary-link {
        flex: 1;
        justify-content: center;
        padding: 0.625rem 0.5rem;
        font-size: 0.82rem;
    }

    /* Form rows: single column on mobile */
    .form-row-2 {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    /* Checkbox pills: horizontal row, wrap */
    .form-checkbox-inline {
        gap: 0.375rem;
    }
    .checkbox-pill {
        padding: 0.3rem 0.625rem;
        font-size: 0.82rem;
    }

    /* Cooperation: horizontal pills on one row */
    .treatment-cooperation {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.375rem;
    }
    .treatment-coop-item {
        flex-direction: column;
        gap: 0.25rem;
    }
    .coop-time {
        max-width: 100%;
        width: 100%;
    }

    /* Form panel: minimal padding */
    .zaznamy-panel--form {
        padding: 0.875rem;
    }

    /* Inputs: 16px font to prevent iOS zoom, compact height */
    .zaznamy-panel--form input[type="text"],
    .zaznamy-panel--form input[type="date"],
    .zaznamy-panel--form input[type="datetime-local"],
    .zaznamy-panel--form select,
    .zaznamy-panel--form textarea {
        font-size: 0.875rem;
        padding: 0.5rem 0.5rem;
    }

    /* Material chips: tighter */
    .treatment-materials {
        gap: 0.375rem;
    }
    .treatment-material-chip {
        padding: 0.25rem 0.5rem;
        font-size: 0.78rem;
    }

    /* Signatures: full width */
    .treatment-signatures {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .signature-canvas {
        height: 160px;
    }

    /* Sticky actions */
    .treatment-actions {
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        flex-direction: row;
        gap: 0.5rem;
        background: #fff;
        border-top: 2px solid #e2e8f0;
        padding: 0.625rem 0.25rem;
        margin: 0.5rem -0.875rem -0.875rem;
        z-index: 20;
    }
    .treatment-actions .btn {
        flex: 1;
        padding: 0.625rem;
        font-size: 0.9rem;
    }

    /* Coworker add: inline on mobile */
    .treatment-add-coworker {
        flex-direction: row;
        gap: 0.375rem;
    }
    .treatment-add-coworker select {
        flex: 1;
        min-width: 0;
    }

    /* Report wizard steps: same compact style */
    .report-step-actions {
        flex-direction: row;
        gap: 0.375rem;
    }
    .report-step-actions .btn {
        flex: 1;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .zaznamy-hero-card {
        padding: 0.875rem;
    }
    .checkbox-pill {
        font-size: 0.78rem;
        padding: 0.25rem 0.5rem;
    }
    .treatment-material-chip {
        font-size: 0.75rem;
    }
    .signature-canvas {
        height: 180px;
    }
}

/* Online status indicator */
.user-online-status {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 11px;
}
.user-online-status.status-online {
    color: #22c55e;
}
.user-online-status.status-offline {
    color: #ef4444;
}
.online-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    cursor: help;
    vertical-align: middle;
    margin-right: 0.35rem;
}
.online-dot.online {
    background: #22c55e;
    box-shadow: 0 0 4px rgba(34, 197, 94, 0.5);
}
.online-dot.offline {
    background: #ef4444;
}

/* ===== PAGE-SPECIFIC MOBILE STYLES ===== */
@media (max-width: 768px) {
    /* Users page */
    .users-container {
        padding: 0.75rem;
        border-radius: 0.75rem;
    }
    .user-cards-grid {
        grid-template-columns: 1fr;
        gap: 0.625rem;
    }
    .user-card {
        padding: 0.625rem;
        border-radius: 0.625rem;
    }
    .user-card-main {
        gap: 0.5rem;
    }
    .user-card-details {
        font-size: 0.8rem;
    }
    .user-card-meta {
        flex-wrap: wrap;
        gap: 0.375rem;
    }
    .user-card-actions {
        flex-wrap: wrap;
        gap: 0.375rem;
    }
    .user-card-actions .btn {
        font-size: 0.8rem;
        padding: 0.35rem 0.625rem;
    }
    .leaderboard-section {
        padding: 0.5rem;
    }
    .leaderboard-card {
        flex: 0 0 auto;
    }
    .leaderboard-footer { gap: 0.1rem; }
    .leaderboard-rank, .leaderboard-hours { font-size: 0.55rem; }

    /* Wall page */
    .wall-container {
        max-width: 100%;
    }

    /* Events page - staffing modal */
    .staffing-modal {
        width: 94vw;
        max-width: 94vw;
        max-height: 85vh;
        border-radius: 1rem;
        padding: 0;
    }
    .email-preview-modal {
        width: calc(100vw - 2rem) !important;
        max-height: calc(100vh - 2rem) !important;
        top: 1rem !important;
    }
    .staffing-modal-content {
        max-height: 80vh;
        padding: 0.75rem;
    }
    .staffing-modal-position h5 {
        font-size: 0.85rem;
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    .staffing-modal-participants {
        gap: 0.25rem;
    }
    .staffing-modal .participant-avatar,
    .staffing-modal .comment-avatar {
        width: 32px;
        height: 32px;
    }
    .staffing-toggle-button {
        width: 36px;
        height: 36px;
    }
    .staffing-toggle-button svg,
    .staffing-toggle-button .staffing-position-icon {
        width: 18px;
        height: 18px;
    }
    .new-position-user {
        width: 36px;
        height: 36px;
    }
    .new-position-user img {
        width: 100%;
        height: 100%;
    }
    .staffing-modal-new-position {
        padding-top: 0.75rem;
    }
    .new-position-form-ajax input[type="text"],
    .new-position-form-ajax input[type="number"] {
        font-size: 0.85rem;
    }

    /* Events page - calendar */
    .calendar-wrapper {
        padding: 0.4rem;
        border-radius: 0.5rem;
    }
    .calendar-header {
        gap: 0.5rem;
        margin-bottom: 0.375rem;
    }
    .cal-month-label {
        font-size: 0.85rem;
        min-width: 120px;
    }
    .cal-nav-btn {
        width: 32px;
        height: 32px;
    }
    .calendar-grid {
        gap: 1px;
    }
    .cal-day-header {
        font-size: 0.55rem;
        padding: 0.15rem 0;
    }
    .cal-day, .cal-day-empty {
        min-height: 48px;
        font-size: 0.6rem;
        padding: 0.1rem;
    }
    .cal-day .cal-event-dot {
        width: 6px;
        height: 6px;
    }
    .cal-day .cal-event-count {
        font-size: 0.55rem;
    }
    .calendar-day-events {
        margin-top: 0.5rem;
        padding-top: 0.5rem;
    }
    .calendar-day-events-header {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    /* Events page - event card header */
    .event-card-header {
        padding: 0.75rem;
    }
    .event-header-summary {
        gap: 0.25rem;
    }
    .event-header-summary h3 {
        font-size: 1rem;
    }
    .event-header-summary .event-header-meta {
        font-size: 0.75rem;
    }
    .event-info-panel .event-image {
        height: 140px !important;
        border-radius: 0.5rem;
    }
    .event-info-panel,
    .event-participants-panel,
    .event-comments-panel {
        padding: 0.625rem;
    }
    .event-participants-panel h4,
    .event-comments-panel h4 {
        font-size: 0.9rem;
    }

    /* Event list */
    .event-list-tabs {
        margin-bottom: 0.5rem;
    }
    .event-list-item {
        padding: 0.5rem;
        border-radius: 0.5rem;
    }
    .event-list-link {
        gap: 0.125rem;
    }
    .event-list-date {
        font-size: 0.75rem;
    }
    .event-list-name {
        font-size: 0.85rem;
    }
    .event-list-place {
        font-size: 0.75rem;
    }
    .event-email-dropdown {
        margin-top: 0.25rem;
    }

    /* Event form */
    .event-form-container {
        padding: 0;
    }
    .page-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    .page-header h2 {
        font-size: 1.1rem;
    }
    .event-code-inline {
        font-size: 0.75rem;
    }
    .page-actions {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 0.2rem;
        width: 100%;
    }
    .page-actions .btn,
    .page-actions .template-dropdown {
        flex: 1 1 0 !important;
        min-width: 0;
    }
    .page-actions .btn {
        padding: 0.2rem 0.25rem;
        font-size: 0.6rem;
        text-align: center;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.4;
        min-height: 1.6rem;
    }
    .page-actions .template-dropdown summary {
        padding: 0.2rem 0.25rem;
        font-size: 0.6rem;
        text-align: center;
        overflow: hidden;
        text-overflow: ellipsis;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        line-height: 1.4;
        box-sizing: border-box;
        border: none;
        border-radius: 0.375rem;
        font-weight: 600;
        width: 100%;
        min-height: 1.6rem;
    }
    .event-form-top {
        grid-template-columns: 1fr;
    }
    .event-form-photo {
        flex: 0 0 auto;
        max-width: 100%;
    }
    .event-form-fields .form-row {
        grid-template-columns: 1fr;
    }
    .event-form-bottom {
        grid-template-columns: 1fr;
    }
    .event-form-staffing .requirements-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.25rem;
    }
    .event-form-staffing .form-group label {
        font-size: 0.7rem;
    }
    .event-form-staffing .form-group input {
        padding: 0.25rem 0.375rem;
        font-size: 0.8rem;
    }
    .form-section {
        padding: 0.75rem;
        border-radius: 0.625rem;
    }
    .form-section h3 {
        font-size: 0.95rem;
    }
    .form-row {
        gap: 0.5rem;
    }
    .form-group label {
        font-size: 0.85rem;
    }
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 0.9rem;
    }

    /* Zaznamy page */
    .zaznamy-container {
        padding: 0;
    }
    .zaznamy-tabs {
        display: none;
    }
    .zaznamy-tab {
        font-size: 0.8rem;
        padding: 0.4rem 0.625rem;
    }

    /* Profile page */
    .profile-layout {
        flex-direction: column;
        gap: 0.75rem;
    }
    .profile-container {
        padding: 0.75rem;
        border-radius: 0.75rem;
    }
    .profile-view-header {
        padding: 0.75rem 2rem 0.75rem 0.75rem;
    }
    .profile-view-avatar {
        width: 56px;
        height: 56px;
        border-width: 2px;
    }
    .profile-view-name h2 {
        font-size: 1rem;
    }
    .profile-view-header .profile-rank-badge {
        width: fit-content;
        max-width: fit-content;
    }
    .profile-edit-emoji {
        top: 0.5rem;
        right: 0.5rem;
    }
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    .profile-header .profile-avatar {
        margin: 0 auto;
    }
    .profile-stats {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    .profile-stat-card {
        padding: 0.625rem;
        border-radius: 0.5rem;
    }

    /* Admin page */
    .admin-container {
        padding: 0.75rem;
    }
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 0.625rem;
    }
    .settings-list-item {
        padding: 0.625rem;
        border-radius: 0.5rem;
    }

    /* Wages page */
    .wages-container {
        padding: 0;
    }
    .wages-table {
        font-size: 0.8rem;
    }
    .wages-table th,
    .wages-table td {
        padding: 0.4rem 0.5rem;
    }

    /* Event settings */
    .event-settings-container {
        padding: 0;
    }

    /* Event responses */
    .event-responses-container {
        padding: 0;
    }
    .response-summary-grid {
        grid-template-columns: 1fr;
    }

    /* Page header on all pages */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }
    .page-header h2 {
        font-size: 1.1rem;
    }
    .page-header .btn {
        width: 100%;
        text-align: center;
    }
    .page-actions {
        flex-wrap: wrap;
        gap: 0.375rem;
    }
    .page-actions .btn {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    /* Extra compact for small phones */
    .staffing-modal {
        width: 96vw;
        max-width: 96vw;
    }
    .calendar-grid {
        gap: 1px;
    }
    .cal-day, .cal-day-empty {
        min-height: 40px;
    }
    .cal-day-header {
        font-size: 0.5rem;
    }
    .profile-stats {
        grid-template-columns: 1fr;
    }
    .user-card-photo {
        width: 70px;
    }
    .leaderboard-card {
        flex: 0 0 auto;
    }
    .leaderboard-footer { gap: 0.05rem; }
    .leaderboard-rank, .leaderboard-hours { font-size: 0.5rem; }
    .event-info-panel .event-image {
        height: 80px;
    }
}

/* ===== MOBILE QUICK TABS (dashboard) ===== */
.mobile-quick-tabs {
    display: none;
}
.mobile-quick-content {
    display: none;
}
.mobile-only {
    display: none;
}

/* ===== MOBILE RESPONSIVE LAYOUT ===== */

/* Mobile top bar - hidden on desktop, shown on mobile */
.mobile-topbar {
    display: none;
}
.mobile-nav-overlay {
    display: none;
}
.floating-nav {
    position: fixed;
    right: 1rem;
    bottom: calc(5rem + 38px);
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.floating-nav-btn {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #1e293b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s, color 0.2s;
}
.floating-nav-btn:first-child {
    border-radius: 0.5rem 0.5rem 0 0;
}
.floating-nav-btn:last-child {
    border-radius: 0 0 0.5rem 0.5rem;
    border-top: none;
}
.floating-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #3D3D3D;
}
.floating-nav-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}
@media (min-width: 769px) {
    .floating-nav {
        bottom: calc(1.5rem + 38px);
        right: 1.5rem;
    }
    .floating-nav-btn {
        width: 44px;
        height: 44px;
    }
    .floating-nav-btn svg {
        width: 22px;
        height: 22px;
    }
}
.mobile-bottom-nav {
    display: none;
}


@media (max-width: 768px) {
    /* ===== Top bar with glass effect ===== */
    .mobile-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 56px;
        padding: 0 1rem;
        background: var(--primary-blue);
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        z-index: 1000;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    }
    .mobile-topbar-brand {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        color: #ffffff;
        text-decoration: none;
        font-size: 0.95rem;
        font-weight: 700;
        letter-spacing: -0.01em;
    }
    .mobile-topbar-logo {
        width: 30px;
        height: 30px;
        object-fit: contain;
        border-radius: 6px;
    }
    .mobile-topbar-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 10px;
        cursor: pointer;
        padding: 0;
        transition: background 0.2s;
    }
    .mobile-topbar-toggle:hover {
        background: rgba(255, 255, 255, 0.18);
    }
    .mobile-topbar-toggle span {
        display: block;
        width: 20px;
        height: 2px;
        background: #ffffff;
        border-radius: 2px;
        margin: 0 auto;
        transition: transform 0.3s, opacity 0.3s;
    }
    .mobile-topbar-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .mobile-topbar-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .mobile-topbar-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* ===== Overlay ===== */
    .mobile-nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
        z-index: 998;
    }
    .mobile-nav-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

    /* ===== Sidebar as slide-out drawer ===== */
    .dashboard-nav {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        max-width: 85vw;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: var(--primary-blue);
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: none;
        padding: 1rem 0.75rem;
    }
    .dashboard-nav.mobile-nav-open {
        transform: translateX(0);
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.25);
    }
    .sidebar-brand {
        padding: 0 0.5rem 1rem;
        margin-bottom: 0.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .sidebar-profile {
        margin: 0 0 1rem;
    }
    .sidebar-nav-links {
        flex-direction: column;
        gap: 0.25rem;
        overflow: visible;
    }
    .sidebar-nav-label {
        display: inline;
    }
    .nav-item {
        padding: 0.4rem 0.875rem;
        font-size: 0.95rem;
        border-radius: 0.625rem;
        transform: none !important;
    }
    .nav-item span {
        display: inline;
    }
    .nav-item:hover {
        transform: none;
    }

    /* ===== Dashboard container ===== */
    .dashboard-container {
        display: flex;
        flex-direction: column;
        padding-top: 56px;
        min-height: 100vh;
    }
    .dashboard-content {
        grid-column: auto;
        grid-row: auto;
        padding: 0.5rem;
        padding-bottom: 1rem;
        flex: 1 0 auto;
        order: 2;
    }
    .site-footer {
        grid-column: auto;
        grid-row: auto;
        flex-shrink: 0;
        margin-bottom: 68px;
        order: 3;
    }

    /* ===== Mobile quick tabs ===== */
    .mobile-hide {
        display: none !important;
    }
    .mobile-only {
        display: block;
    }
    .btn-icon-only {
        padding: 0.5rem;
        width: 2.25rem;
        height: 2.25rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .btn-icon-only i {
        width: 1.125rem;
        height: 1.125rem;
    }
    .page-header-icon {
        display: flex;
        align-items: center;
        color: var(--primary-blue);
        text-decoration: none;
    }
    .page-header-icon i {
        width: 1.25rem;
        height: 1.25rem;
    }

    .mobile-quick-tabs {
        display: flex;
        gap: 0.375rem;
        margin-bottom: 0.75rem;
        justify-content: center;
    }
    .mobile-quick-tabs::-webkit-scrollbar {
        display: none;
    }
    .mobile-quick-tab {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
        padding: 0.5rem 0.5rem;
        border: 1px solid var(--border);
        border-bottom: 3px solid var(--primary-blue);
        border-radius: 0.625rem;
        background: #fff;
        color: var(--text-muted);
        font-size: 0.7rem;
        font-weight: 600;
        white-space: nowrap;
        text-decoration: none;
        cursor: pointer;
        transition: all 0.2s;
        flex: 1 1 0;
        min-width: 0;
        text-align: center;
    }
    .mobile-quick-tab svg {
        width: 20px;
        height: 20px;
        stroke-width: 2;
    }
    .mobile-quick-tab.active {
        background: var(--primary-blue);
        color: #fff;
        border-color: var(--primary-blue);
    }
    .mobile-quick-tab:active {
        transform: scale(0.96);
    }
    .mobile-quick-content {
        display: block;
    }
    .mobile-quick-content[hidden] {
        display: none;
    }
    .mobile-quick-content .upcoming-events-panel {
        margin-bottom: 0.75rem;
    }

    /* ===== Two column layout -> single column ===== */
    .dashboard-two-col {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    .dashboard-col-right {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        position: static;
        max-height: none;
        overflow-y: visible;
        padding-right: 0;
    }

    /* ===== Bottom navigation bar ===== */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 68px;
        background: rgba(255, 255, 255, 0.82);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        z-index: 997;
        justify-content: space-around;
        align-items: center;
        padding-top: 0.5rem;
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
    .mobile-bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        flex: 1;
        height: 100%;
        text-decoration: none;
        color: #94a3b8;
        font-size: 0.58rem;
        font-weight: 600;
        transition: color 0.2s;
        min-width: 0;
        overflow: hidden;
    }
    .mobile-bottom-nav-item svg {
        width: 20px;
        height: 20px;
        stroke-width: 2;
    }
    .mobile-bottom-nav-item.active {
        color: var(--primary-blue);
    }
    .mobile-bottom-nav-item.active svg {
        stroke-width: 2.5;
    }

    /* ===== Wall / dashboard cards on mobile ===== */
    .wall-card {
        padding: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    .wall-composer {
        padding: 0.5rem;
        border-radius: 0.5rem;
    }
    .wall-composer-header {
        flex-direction: row;
        gap: 0.625rem;
        align-items: flex-start;
    }
    .wall-composer-header .wall-avatar {
        width: 36px !important;
        height: 36px !important;
        border-radius: 50% !important;
        object-fit: cover;
        flex-shrink: 0;
    }
    .wall-composer-form {
        flex: 1;
        min-width: 0;
    }
    .wall-composer-textarea {
        font-size: 0.95rem;
        min-height: 40px;
        width: 100%;
    }
    .wall-composer-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }
    .wall-submit-btn {
        font-size: 0.85rem;
        padding: 0.4rem 0.875rem;
        display: inline-flex;
        align-items: center;
        gap: 0.375rem;
        border-radius: 0.5rem;
        height: auto;
        width: auto;
    }
    .wall-submit-btn svg {
        width: 16px;
        height: 16px;
    }
    .wall-attach-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 0.5rem;
    }
    .wall-attach-btn svg {
        width: 20px;
        height: 20px;
    }

    /* Wall posts */
    .wall-post {
        padding: 0.625rem !important;
        margin-bottom: 0.5rem !important;
        border: 1px solid var(--border) !important;
        background: #f8fafc !important;
        border-bottom: 1px solid var(--border) !important;
        border-radius: 0.5rem !important;
    }
    .wall-post-header {
        gap: 0.5rem;
    }
    .wall-post-header .wall-avatar {
        width: 36px !important;
        height: 36px !important;
    }
    .wall-post-author {
        font-size: 0.875rem;
    }
    .wall-post-text-clamped {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    /* Wall images grid */
    .wall-post-images.grid-2,
    .wall-post-images.grid-3 {
        gap: 3px;
    }
    .wall-post-images img {
        border-radius: 0.5rem;
    }
    .wall-post-images.single .wall-post-image-link img {
        width: 100% !important;
        height: 200px !important;
        max-height: 200px !important;
        object-fit: cover !important;
    }

    /* Wall comments */
    .wall-comment .wall-avatar {
        width: 28px !important;
        height: 28px !important;
    }
    .wall-comment-bubble {
        padding: 0.5rem 0.625rem;
        font-size: 0.85rem;
    }
    .wall-comment-input {
        font-size: 0.85rem;
    }

    /* Right column panels */
    .upcoming-events-panel {
        padding: 0.75rem;
        border-radius: 0.75rem;
    }
    .upcoming-events-panel h3 {
        font-size: 0.9rem;
    }
    .upcoming-event-card {
        padding: 0.5rem;
        border-radius: 0.5rem;
    }
    .upcoming-event-thumb {
        width: 44px;
        height: 44px;
    }
    .upcoming-event-meta {
        font-size: 0.75rem;
    }

    /* Modals on mobile */
    dialog.wall-edit-modal,
    dialog.wall-publish-modal {
        width: 92vw;
        max-width: 92vw;
        margin: auto;
        padding: 1rem;
        border-radius: 1rem;
    }
    .wall-notify-users {
        max-height: 40vh;
    }
    .wall-edit-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .wall-edit-actions .btn {
        flex: 1;
        font-size: 0.85rem;
        min-width: 120px;
    }

    /* Emoji picker on mobile: inline near button, single row */
    .wall-emoji-picker {
        flex-wrap: nowrap !important;
        transform: none !important;
        max-width: 90vw !important;
    }

    /* Lightbox on mobile */
    .wall-lightbox {
        padding: 0;
    }
    .wall-lightbox img {
        max-width: 95vw;
        max-height: 75vh;
        object-fit: contain;
    }
    .wall-lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    /* Paginate on mobile */
    .paginate-nav {
        justify-content: center;
    }

    /* Event cards on mobile */
    .event-card {
        border-radius: 0.75rem;
    }
    .event-header-summary h3 {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        flex: 1 1 0;
        min-width: 0;
    }
    .event-header-summary .event-header-separator:last-of-type,
    .event-header-summary .event-location-trigger,
    .event-header-summary .event-equipment-trigger {
        display: none;
    }
    .event-service-details > .event-service-equipment {
        display: flex;
    }
    .event-service-status .event-status-text {
        font-size: 0;
    }
    .event-service-status .event-status-text::after {
        content: attr(data-mobile-label);
        font-size: 0.75rem;
        color: inherit;
        white-space: nowrap;
    }
    .event-location-text {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: inline-block;
    }
    .comments-empty {
        display: none;
    }
    .event-comments-panel h4 {
        margin-top: 0;
    }
    .event-comments-title.no-comments {
        display: none;
    }
    .event-comment-form-wrap.no-comments {
        display: none;
    }
    .event-comments-panel {
        padding-top: 0;
    }
    .event-service-details > .event-service-location {
        display: flex;
    }
    .event-comment-toggle-btn {
        margin-top: -0.25rem;
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        padding: 0.35rem 0.625rem;
        border: 1px solid var(--border);
        border-radius: 0.5rem;
        background: #f8fafc;
        color: var(--primary-blue);
        font-size: 0.8rem;
        font-weight: 600;
        cursor: pointer;
    }
    .event-comment-toggle-btn svg {
        width: 16px;
        height: 16px;
        stroke-width: 2;
    }
    .event-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.375rem;
        padding: 0.75rem;
    }
    .event-header-summary {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    .event-header-reactions {
        width: 100%;
        margin-top: 0.25rem;
    }
    .event-response-buttons {
        display: flex;
        gap: 0.375rem;
        width: 100%;
    }
    .response-button {
        flex: 1;
        font-size: 0.8rem;
        padding: 0.4rem 0.5rem;
        text-align: center;
    }
    .event-card-layout {
        flex-direction: column;
    }
    .event-info-panel,
    .event-participants-panel {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 0.75rem;
    }
    .event-participants-panel {
        border-bottom: none;
    }
    .event-image {
        height: 140px !important;
        border-radius: 0.5rem;
    }
    .event-service-details {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    .event-service-details > .event-service-timer-row {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    /* Forms on mobile */
    .form-row {
        grid-template-columns: 1fr;
    }
    .form-section {
        padding: 0.875rem;
        border-radius: 0.75rem;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .users-container .page-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .users-container .page-actions {
        width: auto !important;
        flex-wrap: nowrap !important;
    }
    .user-card {
        flex-direction: column;
        gap: 0.75rem;
    }
    .user-card-photo {
        width: 80px;
    }
    .user-card-header {
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem;
    }
    .user-card-title {
        flex: 1 1 auto;
        min-width: 0;
    }
    .user-card-title h3 {
        font-size: 0.9rem;
    }
    .user-card-service {
        font-size: 0.75rem;
    }
    .profile-rank-badge {
        flex-direction: row;
        gap: 0.25rem;
    }
    .rank-badge-rank, .rank-badge-hours {
        font-size: 0.7rem;
    }
    .user-card-edit {
        margin-left: 0;
        flex-basis: 100%;
    }
    .user-card-edit .btn {
        width: 100%;
    }
    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    /* Settings on mobile */
    .settings-grid {
        grid-template-columns: 1fr;
    }
    .settings-list-item {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Event list tabs on mobile */
    .event-list-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0.25rem;
    }
    .event-list-tab {
        white-space: nowrap;
        font-size: 0.85rem;
        padding: 0.4rem 0.75rem;
    }
    .event-list-item {
        flex-direction: column;
        gap: 0.375rem;
    }
    .event-list-link {
        flex-direction: column;
        gap: 0.125rem;
    }

    /* Login on mobile */
    .login-box,
    .error-container {
        padding: 1.25rem;
        border-radius: 1rem;
    }
}

@media (max-width: 480px) {
    .mobile-topbar-brand span {
        font-size: 0.85rem;
    }
    .mobile-topbar-logo {
        width: 26px;
        height: 26px;
    }
    .wall-card {
        padding: 0.75rem;
    }
    .upcoming-event-thumb {
        width: 40px;
        height: 40px;
    }
    .event-service-details {
        grid-template-columns: 1fr;
    }
    .mobile-bottom-nav-item {
        font-size: 0.52rem;
    }
    .mobile-bottom-nav-item svg {
        width: 18px;
        height: 18px;
    }
}

/* Smooth scrolling and touch optimizations for mobile */
@media (max-width: 768px) {
    html {
        scroll-behavior: smooth;
    }
    body {
        -webkit-tap-highlight-color: transparent;
    }
}
/* Profile view mode */
.profile-top-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.profile-view {
    background: #fff;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    overflow: hidden;
}
.profile-view-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 2.5rem 1rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.profile-view-header-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.profile-view-name { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.profile-view-header .profile-rank-badge { margin-left: 0; margin-top: 0.75rem; padding: 0.2rem 0.4rem; gap: 0.25rem; width: fit-content; max-width: fit-content; }
.profile-edit-emoji { position: absolute; top: 0.75rem; right: 0.75rem; z-index: 2; }
.profile-view-header { position: relative; }
.profile-view-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}
.profile-view-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-view-name h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--primary-blue);
}
.profile-view-name p {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.profile-view-body {
    padding: 1.25rem;
}
.profile-view-main {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1rem;
}
.profile-view-id-photo {
    flex-shrink: 0;
    width: 120px;
}
.profile-view-id-photo img {
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}
.profile-view-id-photo .no-id-photo {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.profile-view-details {
    flex: 1;
}
.profile-view-details p {
    margin: 0.3rem 0;
    font-size: 0.9rem;
}
.profile-view-details p svg {
    width: 13px !important;
    height: 13px !important;
    stroke-width: 2;
    flex-shrink: 0;
    opacity: 0.6;
    display: inline !important;
    vertical-align: middle !important;
    margin-right: 3px;
    top: 0;
    position: relative;
}
.profile-view-docs {
    margin-bottom: 1rem;
}
.profile-view-bio {
    font-size: 0.8rem;
    line-height: 1.4;
}
.profile-view-bio .bio-toggle-link {
    color: var(--primary-blue);
    cursor: pointer;
    text-decoration: none;
}
.profile-view-bio .bio-toggle-link:hover {
    text-decoration: underline;
}
.bio-photo-display {
    max-width: 250px;
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 0.5rem 0;
}
.bio-photo-preview {
    margin-top: 0.5rem;
}
.treatment-row-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.treatment-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 0.5rem;
    font-size: 0.85rem;
    flex-wrap: wrap;
}
.treatment-row:hover {
    border-color: var(--primary, #3D3D3D);
}
.treatment-row-date {
    font-weight: 600;
    white-space: nowrap;
    color: var(--text-muted, #64748b);
    min-width: 90px;
}
.treatment-row-event {
    font-weight: 600;
    min-width: 120px;
    flex: 1;
}
.treatment-row-patient {
    min-width: 120px;
    flex: 1;
}
.treatment-row-location {
    color: var(--text-muted, #64748b);
    min-width: 100px;
    flex: 1;
}
.treatment-row-creator {
    color: var(--text-muted, #64748b);
    font-size: 0.8rem;
    min-width: 100px;
    flex: 1;
}
.treatment-row-status {
    min-width: 90px;
}
.treatment-row-actions {
    display: flex;
    gap: 0.375rem;
    margin-left: auto;
}
@media (max-width: 768px) {
    .treatment-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    .treatment-row-actions {
        margin-left: 0;
    }
}
@media (max-width: 600px) {
    .profile-view-main { flex-direction: row; gap: 0.75rem; }
    .profile-view-id-photo { width: 100px; }
    .profile-view-details p { font-size: 0.8rem; margin: 0.2rem 0; }
}
.notification-card {
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    background: #fff;
}
.notification-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.notification-card-header strong {
    font-size: 1rem;
    color: var(--primary-blue);
}
.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.72rem;
    font-weight: 700;
    margin-left: 0.5rem;
}
.badge-success {
    background: #dcfce7;
    color: #166534;
}
.badge-muted {
    background: #f1f5f9;
    color: #64748b;
}
.notification-form .form-row {
    align-items: flex-end;
}
.email-filter-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.email-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #f5f5f5;
    border: 1px solid #d4d4d4;
    border-radius: 1rem;
    padding: 0.2rem 0.6rem;
    font-size: 0.82rem;
    color: var(--primary-blue);
}
.email-filter-tag a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 700;
}
.email-filter-link {
    color: var(--primary-blue);
    text-decoration: none;
    border-bottom: 1px dotted var(--primary-blue);
}
.email-filter-link:hover {
    text-decoration: underline;
}
.email-log-item {
    align-items: flex-start;
}
.email-preview-modal {
    max-width: min(760px, calc(100vw - 4rem)) !important;
    width: min(760px, calc(100vw - 4rem)) !important;
    max-height: calc(100vh - 4rem) !important;
    top: 2rem !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}
.email-preview-meta {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.email-preview-meta p {
    margin: 0.25rem 0;
    font-size: 0.88rem;
}
.email-preview-body {
    padding: 1rem 1.25rem;
}
.btn-calendar {
    background: #dc2626;
    color: #fff;
    border: none;
    padding: 0.3rem 0.625rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.72rem;
    transition: background 0.15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-calendar:hover {
    background: #b91c1c;
}
.calendar-wrapper {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.6rem;
    margin-bottom: 0.75rem;
}
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}
.cal-nav-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #f8fafc;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.cal-nav-btn:hover {
    background: #e2e8f0;
}
.cal-month-label {
    font-size: 0.95rem;
    font-weight: 700;
    min-width: 150px;
    text-align: center;
}
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.cal-day-header {
    text-align: center;
    font-weight: 700;
    font-size: 0.65rem;
    color: #64748b;
    padding: 0.2rem 0;
    text-transform: uppercase;
}
.cal-day, .cal-day-empty {
    min-height: 72px;
    border-radius: 0.3rem;
    padding: 0.15rem;
    font-size: 0.7rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: background 0.15s;
    overflow: hidden;
}
.cal-day {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.cal-day:hover {
    background: #e0f2fe;
    border-color: var(--primary-blue);
}
.cal-day-empty {
    background: transparent;
    border: 1px solid transparent;
    cursor: default;
}
.cal-day-today {
    background: #e8e8e8;
    border-color: var(--primary-blue);
    font-weight: 700;
}
.cal-day-selected {
    background: var(--primary-blue);
    color: #fff;
}
.cal-day-selected .cal-day-num {
    color: #fff;
}
.cal-day-has-events {
    background: #fef9c3;
    border-color: #facc15;
}
.cal-day-selected.cal-day-has-events {
    background: var(--primary-blue);
}
.cal-day-num {
    font-size: 0.72rem;
    line-height: 1;
    margin-bottom: 1px;
}
.cal-day-labels {
    display: flex;
    flex-direction: column;
    gap: 1px;
    width: 100%;
    overflow: hidden;
}
.cal-day-event-label {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 0.58rem;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}
.cal-day-event-dot-inline {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}
.cal-event-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #dc2626;
    margin-top: 2px;
}
.cal-day-selected .cal-event-dot {
    background: #fff;
}
.cal-event-count {
    font-size: 0.55rem;
    font-weight: 700;
    color: #dc2626;
    line-height: 1;
}
.cal-day-selected .cal-event-count {
    color: #fff;
}
.calendar-day-events {
    margin-top: 0.75rem;
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
}
.calendar-day-events-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.cal-day-close {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    font-size: 1.2rem;
    cursor: pointer;
    color: #64748b;
    border-radius: 0.25rem;
}
.cal-day-close:hover {
    background: #f1f5f9;
}
.cal-day-event-item {
    padding: 0.4rem 0.6rem;
    border-radius: 0.3rem;
    margin-bottom: 0.25rem;
    background: #f8fafc;
    border-left: 3px solid var(--primary-blue);
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.cal-day-event-item a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
}
.cal-day-event-item a:hover {
    text-decoration: underline;
}

/* ===== ZEĎ ===== */
.dashboard-lists {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 0;
}
.dashboard-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: flex-start;
}
.dashboard-col-left {
    min-width: 0;
}
.dashboard-col-right {
    position: sticky;
    top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 0.25rem;
}
.dashboard-col-right::-webkit-scrollbar {
    width: 5px;
}
.dashboard-col-right::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
.dashboard-col-right::-webkit-scrollbar-track {
    background: transparent;
}
@media (max-width: 900px) {
    .dashboard-two-col {
        grid-template-columns: 1fr;
    }
    .dashboard-col-right {
        display: none;
    }
}
.upcoming-events-panel {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: var(--shadow);
}
.upcoming-events-panel h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.upcoming-events-panel h3 svg,
.upcoming-event-meta svg,
.upcoming-event-thumb-placeholder svg,
.interaction-action svg {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
}
.upcoming-events-panel h3 svg { width: 18px; height: 18px; }
.upcoming-event-meta svg { width: 13px; height: 13px; color: #64748b; }
.upcoming-event-positions svg { color: var(--primary-blue); }
.upcoming-event-coworkers svg { color: #475569; }
.upcoming-event-thumb-placeholder svg { width: 24px; height: 24px; color: #94a3b8; }
.interaction-action svg { width: 14px; height: 14px; vertical-align: -2px; }
.interaction-user {
    font-weight: 700;
    font-size: 0.85rem;
    color: #0f172a;
}
.interaction-action {
    font-size: 0.8rem;
    color: #475569;
    line-height: 1.4;
}
.interaction-time {
    font-size: 0.72rem;
    color: #94a3b8;
}
.paginate-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.paginate-arrow {
    background: none;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--primary-blue);
    padding: 0.15rem 0.5rem;
    line-height: 1;
}
.paginate-arrow:hover {
    background: #f1f5f9;
}
.paginate-counter {
    font-size: 0.75rem;
    color: #94a3b8;
    min-width: 2.5rem;
    text-align: center;
}
.upcoming-events-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.upcoming-event-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.6rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}
.upcoming-event-card:hover {
    background: #f1f5f9;
}
.upcoming-event-hidden {
    display: none;
}
.upcoming-event-top {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    flex-wrap: nowrap;
    overflow: hidden;
    white-space: nowrap;
}
.upcoming-event-date {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary-blue);
    white-space: nowrap;
    flex-shrink: 0;
}
.upcoming-event-name {
    font-size: 0.85rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.upcoming-event-days {
    font-size: 0.72rem;
    color: #64748b;
    white-space: nowrap;
    flex-shrink: 0;
}
.upcoming-event-detail {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}
.upcoming-event-thumb {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.upcoming-event-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.upcoming-event-thumb .wall-avatar {
    width: 100% !important;
    height: 100% !important;
    border-radius: 0.5rem;
}
.upcoming-event-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}
.upcoming-event-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.76rem;
    min-width: 0;
}
.upcoming-event-location, .upcoming-event-time {
    font-size: 0.76rem;
    color: #64748b;
}
.upcoming-event-positions {
    font-size: 0.74rem;
    color: var(--primary-blue);
    font-weight: 600;
}
.upcoming-event-coworkers {
    font-size: 0.72rem;
    color: #475569;
}
.upcoming-show-more {
    width: 100%;
    margin-top: 0.6rem;
    font-size: 0.8rem;
}

.wall-container {
    max-width: 100%;
    margin: 0;
}
.wall-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    padding: 1.5rem;
}
.wall-card-header {
    margin-bottom: 1rem;
}
.wall-card-header h2 {
    margin: 0 0 0.25rem 0;
}
.wall-card-header p {
    margin: 0;
}
.wall-composer {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}
.wall-composer-header {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.wall-composer-form {
    flex: 1;
}
.wall-composer-textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.6rem 0.75rem;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 44px;
    font-family: inherit;
}
.wall-composer-textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}
.wall-composer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}
.wall-composer-attachments {
    display: flex;
    gap: 0.5rem;
}
.wall-attach-btn {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem;
    border-radius: 0.375rem;
    transition: background 0.15s;
    color: var(--text-muted);
}
.wall-attach-btn svg {
    width: 20px;
    height: 20px;
}
.wall-attach-btn:hover {
    background: #f1f5f9;
}
.wall-file-preview {
    margin-top: 0.5rem;
    font-size: 0.82rem;
    color: #64748b;
}
.wall-preview-status { color: #64748b; font-style: italic; }
.wall-preview-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.wall-preview-thumb {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 0.4rem;
    overflow: hidden;
    border: 1px solid var(--border);
}
.wall-preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.wall-preview-remove {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 0 0.4rem 0 0.4rem;
    width: 18px;
    height: 18px;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wall-preview-remove:hover { background: rgba(220,38,38,0.85); }
.wall-preview-docs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}
.wall-preview-doc {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #f1f5f9;
    border-radius: 0.3rem;
    padding: 0.2rem 0.5rem;
    font-size: 0.78rem;
    color: #475569;
}
.wall-preview-doc svg { width: 14px; height: 14px; }
.wall-preview-remove-sm {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0 0 0 0.2rem;
}
.wall-preview-remove-sm:hover { color: #dc2626; }
.wall-submit-btn {
    padding: 0.4rem 1.2rem;
}
.wall-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wall-avatar {
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.wall-avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-blue);
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
}

.wall-post {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
}
.wall-post-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.wall-post-meta {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.wall-post-author {
    font-weight: 700;
    font-size: 12px;
}
.wall-post-author .wall-post-time {
    font-weight: 400;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-left: 0.4rem;
}
.wall-post-time {
    font-size: 11px;
    color: #94a3b8;
}
.wall-post-menu {
    display: flex;
    gap: 0.25rem;
}
.wall-post-edit-btn, .wall-post-delete-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: background 0.15s;
}
.wall-post-edit-btn:hover, .wall-post-delete-btn:hover {
    background: #f1f5f9;
}
.wall-post-text {
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    word-break: break-word;
}
.wall-post-text-clamped {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.wall-post-text-full {
    display: block;
}
.wall-post-heading {
    display: block;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}
.wall-expand-btn {
    background: none;
    border: none;
    color: var(--primary-blue);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.2rem 0;
    display: inline-block;
}
.wall-expand-btn:hover {
    text-decoration: underline;
}
.wall-post-images {
    display: grid;
    gap: 6px;
    margin-bottom: 0.75rem;
}
.wall-post-images.single {
    grid-template-columns: 1fr;
}
.wall-post-images.grid-2 {
    grid-template-columns: 1fr 1fr;
}
.wall-post-images.grid-3 {
    grid-template-columns: 1fr 1fr 1fr;
}
.wall-post-images.grid-4 {
    grid-template-columns: 1fr 1fr 1fr;
}
.wall-post-image-link {
    display: block;
    border-radius: 1rem;
    overflow: hidden;
    line-height: 0;
}
.wall-post-image-link picture {
    display: block;
}
.wall-post-image-link img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 400px;
    border-radius: 1rem;
}
.wall-post-images.single .wall-post-image-link img {
    width: 100%;
    height: 400px;
    max-height: 400px;
    object-fit: cover;
    object-position: left center;
    border-radius: 1rem;
}
.wall-post-documents {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}
.wall-post-document {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 0.85rem;
    color: var(--primary-blue);
    text-decoration: none;
}
.wall-post-document:hover {
    background: #f1f5f9;
}

.wall-post-reactions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
    padding: 0.25rem 0;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
}
.wall-reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    background: #f1f5f9;
    border: 1px solid transparent;
    border-radius: 1rem;
    padding: 0.15rem 0.5rem;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.15s;
}
.wall-reaction-btn:hover {
    background: #e2e8f0;
}
.wall-reaction-btn.active {
    background: #e8e8e8;
    border-color: var(--primary-blue);
}
.wall-reaction-btn-sm {
    font-size: 0.72rem;
    padding: 0.1rem 0.35rem;
}
.wall-reaction-emoji {
    font-size: 0.95rem;
}
.wall-reaction-count {
    font-weight: 600;
    color: #475569;
}
.wall-reaction-add {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.15rem 0.3rem;
    border-radius: 1rem;
    transition: background 0.15s;
}
.wall-reaction-add:hover {
    background: #f1f5f9;
}
.wall-reaction-add-sm {
    font-size: 0.9rem;
}

.wall-post-comments {
    margin-top: 0.5rem;
}
.wall-comment {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.wall-comment-body {
    flex: 1;
}
.wall-comment-bubble {
    background: #f1f5f9;
    border-radius: 0.625rem;
    padding: 0.5rem 0.75rem;
    display: inline-block;
    max-width: 100%;
}
.wall-comment-author {
    font-weight: 700;
    font-size: 12px;
    margin-right: 0.4rem;
}
.wall-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.wall-comment-menu {
    position: relative;
}
.wall-comment-dots {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: #94a3b8;
    padding: 0 0.25rem;
    line-height: 1;
}
.wall-comment-dots:hover {
    color: #475569;
}
.wall-comment-menu-popup[hidden] {
    display: none !important;
}
.wall-comment-menu-popup {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0.25rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 140px;
}
.wall-comment-menu-popup button,
.wall-comment-menu-popup form {
    width: 100%;
}
.wall-comment-menu-popup .wall-comment-edit-btn,
.wall-comment-menu-popup .wall-comment-delete-btn,
.wall-comment-menu-popup .wall-post-edit-btn,
.wall-comment-menu-popup .wall-post-delete-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
    text-align: left;
    border-radius: 0.375rem;
    width: 100%;
}
.wall-comment-menu-popup .wall-comment-edit-btn:hover,
.wall-comment-menu-popup .wall-post-edit-btn:hover {
    background: #f1f5f9;
}
.wall-comment-menu-popup .wall-comment-delete-btn,
.wall-comment-menu-popup .wall-post-delete-btn {
    color: #dc2626;
}
.wall-comment-menu-popup .wall-comment-delete-btn:hover,
.wall-comment-menu-popup .wall-post-delete-btn:hover {
    background: #fef2f2;
}
.wall-comment-text {
    font-size: 12px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}
.wall-comment-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.2rem;
    flex-wrap: wrap;
}
.wall-comment-time {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 400;
}
.wall-comment-edit-btn, .wall-comment-delete-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.72rem;
    color: var(--primary-blue);
    padding: 0;
}
.wall-comment-edit-btn:hover, .wall-comment-delete-btn:hover {
    text-decoration: underline;
}
.wall-comment-delete-btn {
    color: #ef4444;
}
.wall-comment-reaction-form {
    display: inline-flex;
}

.wall-comment-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.wall-comment-input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    font-family: inherit;
}
.wall-comment-input:focus {
    outline: none;
    border-color: var(--primary-blue);
}
.wall-comment-submit {
    background: var(--primary-blue);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wall-comment-submit:hover {
    background: #3D3D3D;
}

.wall-emoji-picker {
    position: fixed;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 0.5rem;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
    z-index: 1000;
}
.wall-emoji-picker[hidden] {
    display: none !important;
}
.wall-emoji-picker-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    padding: 0.25rem 0.4rem;
    border-radius: 0.25rem;
    transition: background 0.15s;
}
.wall-emoji-picker-btn:hover {
    background: #f1f5f9;
}

.wall-edit-modal {
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    max-width: 500px;
    width: calc(100% - 2rem);
    margin: auto;
}
.wall-edit-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.6rem;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    margin: 0.5rem 0;
}
.wall-edit-form textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}
.wall-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}
.wall-edit-images {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0;
}
.wall-edit-add-photos {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    font-size: 0.82rem;
    color: var(--primary-blue);
    padding: 0.3rem 0.6rem;
    border: 1px dashed var(--border);
    border-radius: 0.4rem;
    margin: 0.5rem 0;
}
.wall-edit-add-photos:hover { background: #f1f5f9; }
.wall-edit-add-photos svg { width: 16px; height: 16px; }
.wall-publish-modal {
    max-width: 480px;
}

/* Lightbox pro fotky */
.wall-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: zoom-out;
    padding: 2rem;
}
.wall-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}
.wall-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    background: transparent;
    border: none;
    line-height: 1;
    z-index: 10000;
}
.wall-lightbox-close:hover {
    opacity: 0.7;
}
.wall-lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}
.wall-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    z-index: 10000;
    line-height: 1;
}
.wall-lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.7);
}
.wall-lightbox-prev {
    left: 1rem;
}
.wall-lightbox-next {
    right: 1rem;
}
.wall-lightbox-counter {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    z-index: 10000;
}
.wall-notify-controls {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}
.wall-notify-controls label {
    font-weight: 600;
    cursor: pointer;
}
.wall-notify-users {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1rem;
}
.wall-notify-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background 0.15s;
}
.wall-notify-user:hover {
    background: #f1f5f9;
}
.wall-notify-user input[type="checkbox"] {
    flex-shrink: 0;
}
.wall-notify-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.wall-notify-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #64748b;
    font-size: 0.65rem;
    font-weight: 700;
}

/* Wages */
.wages-container { max-width: 100%; margin: 0 auto; }
.wage-settings {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.wage-rate-form { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.wage-rate-form label { font-weight: 600; font-size: 0.85rem; }
.wage-rate-form input { width: 100px; padding: 0.3rem 0.5rem; border: 1px solid var(--border); border-radius: 0.4rem; font-size: 0.85rem; }

.wages-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}
.wages-tab {
    padding: 0.6rem 1.2rem;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}
.wages-tab:hover { color: var(--primary-blue); }
.wages-tab.active { color: var(--primary-blue); border-bottom-color: var(--primary-blue); }

.wage-event-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    overflow: hidden;
}
.wage-event-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}
.wage-event-header h3 { margin: 0 0 0.25rem; font-size: 1rem; color: var(--primary-blue); }
.wage-event-date { display: block; font-size: 0.8rem; color: var(--text-muted); }
.wage-event-location { display: block; font-size: 0.8rem; color: var(--text-muted); }

.wage-table-wrap { overflow-x: auto; }
.wage-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}
.wage-table th {
    text-align: left;
    padding: 0.5rem 0.6rem;
    background: #f1f5f9;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    white-space: nowrap;
}
.wage-table td {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.wage-table tfoot td {
    border-top: 2px solid var(--border);
    border-bottom: none;
    padding: 0.6rem;
    font-weight: 700;
}
.wage-total-label { text-align: right; }
.wage-event-total { color: var(--primary-blue); font-size: 0.9rem; }

.wage-worker-name { font-weight: 600; white-space: nowrap; }
.wage-hours { text-align: center; color: var(--text-muted); }
.wage-total { font-weight: 700; color: var(--primary-blue); white-space: nowrap; }

.wage-input {
    width: 150px;
    padding: 0.25rem 0.4rem;
    border: 1px solid var(--border);
    border-radius: 0.3rem;
    font-size: 0.8rem;
}
.wage-input[type="datetime-local"] {
    width: auto;
    border: none !important;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    padding: 0.25rem 0;
    font-size: 0.8rem;
    color: var(--text);
}
.wage-input[type="datetime-local"]:focus {
    outline: none;
    color: var(--primary-blue);
}
.wage-input-rate, .wage-input-bonus { width: 70px; }
.wage-input:focus { border-color: var(--primary-blue); outline: none; }

.wage-paid-cell { text-align: center; white-space: nowrap; }
.wage-bonus-cell { white-space: nowrap; vertical-align: middle; }
.wage-bonus-cell input { vertical-align: middle; }
.wage-bonus-note-btn {
    background: none;
    border: none;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding: 0;
    margin-left: 0.2rem;
    color: var(--text-muted);
    display: inline-block;
    vertical-align: middle;
    line-height: 0;
    box-shadow: none;
}
.wage-bonus-note-btn:hover { color: var(--primary-blue); }
.wage-bonus-note-btn.has-note { color: var(--primary-blue); }
.wage-bonus-link { cursor: pointer; }
.wage-bonus-link:hover { text-decoration: underline; }
.wage-paid-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
    padding: 0.2rem;
    transition: transform 0.15s;
}
.wage-paid-toggle:hover { transform: scale(1.2); }
.wage-paid-time { display: block; font-size: 0.65rem; color: var(--text-muted); margin-top: 0.15rem; }

.wage-invoice-toggle-wrap { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.wage-invoice-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0.2rem;
    transition: transform 0.15s;
}
.wage-invoice-toggle:hover { transform: scale(1.2); }
.wage-invoice-time { font-size: 0.65rem; color: var(--text-muted); margin-top: 0.15rem; }

/* Wage user modal */
.wage-user-modal {
    border: none;
    border-radius: 0.75rem;
    padding: 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    width: min(360px, 94vw);
    max-width: 94vw;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}
.wage-user-modal:has(.wage-user-modal-content[style*="max-width"]) {
    width: min(750px, 94vw);
}
.wage-user-modal::backdrop { background: rgba(0,0,0,0.4); }
.wage-user-modal-content { padding: 1.1rem 1.25rem; position: relative; }
.wage-user-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
}
.wage-user-modal-close:hover { color: var(--text); }
.wage-user-modal-top {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.wage-user-modal-top h3 { margin: 0 0 0.3rem; font-size: 1rem; color: var(--primary-blue); }
.wage-user-modal-info { flex: 1; min-width: 0; }
.wage-user-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    flex-shrink: 0;
}
.wage-user-photo-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 2px solid var(--border);
    flex-shrink: 0;
}
.wage-user-account-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}
.wage-user-account {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    word-break: break-all;
}
.wage-user-account-empty {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
}
.wage-user-info { cursor: pointer; }
.wage-user-info:hover { text-decoration: underline; color: var(--primary-blue); }

/* Profile wages sidebar */
.profile-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: flex-start;
}
.profile-wages-sidebar {
    position: sticky;
    top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.profile-wages-panel {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: var(--shadow);
}
.profile-wages-panel h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.profile-wages-panel h3 svg { width: 18px; height: 18px; flex-shrink: 0; }
.profile-edit-emoji svg { width: 18px; height: 18px; }
.profile-wages-years {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.profile-wages-year-btn {
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 0.3rem;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    background: #fff;
    transition: all 0.15s;
}
.profile-wages-year-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}
.profile-wages-year-btn.active {
    background: var(--primary-blue);
    color: #fff;
    border-color: var(--primary-blue);
}
.profile-wages-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}
.profile-wages-table th {
    text-align: left;
    padding: 0.4rem 0.3rem;
    background: #f1f5f9;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    white-space: nowrap;
}
.profile-wages-table td {
    padding: 0.35rem 0.3rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.profile-wages-table td:nth-child(2) {
    white-space: nowrap;
}
.profile-wages-table tfoot td {
    border-top: 2px solid var(--border);
    border-bottom: none;
    padding: 0.5rem 0.3rem;
    font-weight: 700;
}
.profile-wages-total { font-weight: 700; color: var(--primary-blue); white-space: nowrap; }
.profile-wages-sum-label { text-align: right; }
.profile-wages-sum { color: var(--primary-blue); }
.profile-wages-table a { text-decoration: none; color: var(--primary-blue); }
.profile-wages-table a:hover { text-decoration: underline; }
@media (max-width: 900px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
    .profile-wages-sidebar {
        position: static;
    }
}
.profile-edit-emoji {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
    padding: 0.2rem;
    text-decoration: none;
    transition: transform 0.15s;
    flex-shrink: 0;
}
.profile-edit-emoji:hover {
    transform: scale(1.2);
}

/* Záznamy */
.zaznamy-container {
    max-width: 100%;
}
.zaznamy-mobile-back {
    display: none;
}
.zaznamy-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.zaznamy-tab {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--card-bg);
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.zaznamy-tab svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
    flex-shrink: 0;
}
.zaznamy-tab:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}
.zaznamy-tab.active {
    background: var(--primary-blue);
    color: #fff;
    border-color: var(--primary-blue);
}
.zaznamy-panel {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}
.zaznamy-panel h3 {
    margin: 0 0 1rem 0;
}
.zaznamy-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}
.zaznamy-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.25rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.zaznamy-card-icon {
    font-size: 2rem;
}
.zaznamy-card h4 {
    margin: 0;
    font-size: 1rem;
}
.zaznamy-card p {
    margin: 0;
    font-size: 0.85rem;
}
.btn-sm {
    padding: 0.4rem 0.875rem;
    font-size: 0.8rem;
}

/* Report wizard */
.report-step {
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    background: #fff;
}
.report-step.hidden {
    display: none;
}
.report-step.collapsed .report-step-body,
.report-step.collapsed .report-step-actions {
    display: none;
}
.report-step.collapsed {
    background: #f8fafc;
    opacity: 0.85;
}
.report-step.collapsed .report-step-header {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
    cursor: pointer;
}
.report-step.collapsed .report-step-header::after {
    content: ' ✏️';
    font-size: 0.8rem;
    opacity: 0.5;
}
.report-step-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}
.report-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--primary-blue);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.report-step-header h4 {
    margin: 0;
    font-size: 1.1rem;
}
.report-step-body {
    margin-bottom: 1rem;
}
.report-step-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}
.report-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 0.95rem;
    background: #fff;
}
.report-select-sm {
    width: auto;
    min-width: 200px;
}
.report-input {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 0.9rem;
}
.report-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
}
.report-workers-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.report-worker-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
}
.report-worker-name {
    font-weight: 600;
    font-size: 0.9rem;
}
.report-add-worker {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.report-time-bulk {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    padding: 0.75rem;
    background: #f0f4f8;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}
.report-time-bulk label {
    font-weight: 600;
    font-size: 0.85rem;
}
.report-event-date-info {
    font-size: 0.85rem;
    color: var(--text-muted, #64748b);
    margin-bottom: 0.75rem;
    font-weight: 600;
}
.report-time-bulk-fields {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.report-time-fields {
    display: flex;
    gap: 0.5rem;
    flex: 1;
}
.report-time-label {
    display: flex;
    flex-direction: column;
    font-size: 0.7rem;
    color: var(--text-muted, #64748b);
    font-weight: 500;
    gap: 0.15rem;
    flex: 1;
}
.report-time-label input {
    font-size: 0.85rem;
}
.report-time-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.report-time-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
}
.report-time-name {
    font-weight: 600;
    font-size: 0.85rem;
    min-width: 150px;
}
.report-quick-notes {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.report-quick-note-btn {
    text-align: left;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    background: #f8fafc;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.15s;
}
.report-quick-note-btn:hover {
    border-color: var(--primary-blue);
    background: #f5f5f5;
}
.report-recap {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.recap-section {
    font-size: 0.95rem;
}
.recap-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.recap-table th,
.recap-table td {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    text-align: left;
}
.recap-table th {
    background: #f1f5f9;
    font-weight: 600;
}
.recap-worker-card {
    display: none;
}

/* Reports table */
.zaznamy-reports-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.zaznamy-reports-table th,
.zaznamy-reports-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.zaznamy-reports-table th {
    background: #f1f5f9;
    font-weight: 600;
}
.zaznamy-reports-table tr:hover td {
    background: #f8fafc;
}
.report-note-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Report detail modal */
.report-detail-modal {
    border: none;
    border-radius: 0.75rem;
    padding: 0;
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
    max-width: 600px;
    width: 90%;
    inset: 0;
    margin: auto;
}
.report-detail-content {
    padding: 1.5rem;
}
.report-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}
.report-detail-header h4 {
    margin: 0;
}
.report-detail-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
}
.report-detail-row {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}
.report-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin: 0.75rem 0;
}
.report-detail-table th,
.report-detail-table td {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    text-align: left;
}
.report-detail-table th {
    background: #f1f5f9;
}

/* Inline report detail */
.report-detail-row.hidden {
    display: none;
}
.report-inline-detail {
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-radius: 0.5rem;
}

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}
.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Buttons */
.btn-success {
    background: #16a34a;
    color: #fff;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
}
.btn-success:hover {
    background: #15803d;
}
.btn-secondary {
    background: #e2e8f0;
    color: #334155;
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
}
.btn-secondary:hover {
    background: #cbd5e1;
}
.btn-danger {
    background: #dc2626;
    color: #fff;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 0.3rem;
    cursor: pointer;
    font-size: 0.8rem;
}
.btn-danger:hover {
    background: #b91c1c;
}

/* ===== Treatment form ===== */
.treatment-section {
    border: 1px solid #e2e8f0;
    border-radius: 0.625rem;
    margin-bottom: 1.25rem;
    overflow: hidden;
}
.treatment-section-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    background: #f1f5f9;
    cursor: pointer;
    user-select: none;
}
.treatment-section-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: #3D3D3D;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}
.treatment-section-header h4 {
    margin: 0;
    font-size: 1rem;
    color: #1e293b;
}
.treatment-section-body {
    padding: 1rem;
}
.treatment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}
.treatment-grid .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.treatment-grid .form-group.form-checkbox {
    align-self: end;
    padding-bottom: 0.3rem;
}
.treatment-grid input,
.treatment-grid select,
.treatment-grid textarea {
    width: 100%;
    padding: 0.5rem 0.625rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}
.treatment-section-body .form-group {
    margin-bottom: 0.875rem;
}
.treatment-section-body .form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.2rem;
}
.treatment-section-body input[type="text"],
.treatment-section-body input[type="date"],
.treatment-section-body input[type="datetime-local"],
.treatment-section-body select,
.treatment-section-body textarea {
    width: 100%;
    padding: 0.5rem 0.625rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}
.treatment-section-body textarea {
    resize: vertical;
    font-family: inherit;
}
.treatment-coworkers-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.treatment-coworker-row {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: #e0e7ff;
    color: #2D2D2D;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.8rem;
}
.treatment-coworker-row button {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
}
.treatment-add-coworker {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.treatment-add-coworker select {
    flex: 1;
    max-width: 300px;
}
.treatment-materials {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.treatment-material-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 1rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.8rem;
    cursor: pointer;
    user-select: none;
}
.treatment-material-chip input {
    display: none;
}
.treatment-material-chip:has(input:checked) {
    background: #e8e8e8;
    border-color: #3D3D3D;
    color: #2D2D2D;
    font-weight: 600;
}
.treatment-coop-item .checkbox-pill input {
    display: none;
}
.treatment-coop-item .checkbox-pill:has(input:checked) {
    font-weight: 600;
}
.treatment-coop-item {
    display: inline-flex;
    flex-direction: column;
    gap: 0.3rem;
}
.treatment-coop-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    cursor: pointer;
}
.coop-time {
    font-size: 0.8rem;
    padding: 0.3rem 0.4rem;
}
.treatment-signatures {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}
.treatment-signature-box {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.treatment-signature-box label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}
.signature-canvas {
    width: 100%;
    height: 150px;
    border: 2px dashed #cbd5e1;
    border-radius: 0.5rem;
    background: #fff;
    cursor: crosshair;
    touch-action: none;
}
.treatment-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
}
.treatment-status-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}
.treatment-status-draft {
    background: #fef3c7;
    color: #92400e;
}
.treatment-status-submitted {
    background: #d1fae5;
    color: #065f46;
}

/* ===== UX Improvements: Záznamy ===== */

/* Scrollable tabs with fade */
.zaznamy-tabs {
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 0.25rem;
}
.zaznamy-tabs::-webkit-scrollbar {
    height: 4px;
}
.zaznamy-tabs::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}
.zaznamy-tabs-scroll-fade {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0.25rem;
    width: 2rem;
    background: linear-gradient(to right, transparent, #fff);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}
.zaznamy-tabs:hover .zaznamy-tabs-scroll-fade {
    opacity: 1;
}
.zaznamy-tab {
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
}
.zaznamy-tab:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}
.zaznamy-tab.active {
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

/* Clickable cards */
.zaznamy-card-link {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    cursor: pointer;
}
.zaznamy-card-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-blue);
}
.zaznamy-card-link .btn {
    pointer-events: none;
}
.zaznamy-card-accent {
    border-left: 3px solid #5A5A5A;
}
.zaznamy-card-accent .zaznamy-card-icon {
    color: #3D3D3D;
}

/* Empty states */
.zaznamy-empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
.zaznamy-empty-icon {
    font-size: 3rem;
    opacity: 0.5;
}
.zaznamy-empty-state p {
    color: #64748b;
    margin: 0;
}

/* Table wrapper for horizontal scroll on mobile */
.zaznamy-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Treatment list cards (replaces table) */
.zaznamy-treatment-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.treatment-list-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.625rem;
    padding: 0.875rem 1rem;
    transition: all 0.2s ease;
}
.treatment-list-card:hover {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}
.treatment-list-card--draft {
    border-left: 3px solid #f59e0b;
}
.treatment-list-card--submitted {
    border-left: 3px solid #10b981;
}
.treatment-list-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.treatment-list-card-name {
    font-weight: 700;
    font-size: 1rem;
    color: #1e293b;
}
.treatment-list-card-date {
    font-size: 0.8rem;
    color: #64748b;
}
.treatment-list-card-event {
    display: block;
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 0.125rem;
}
.treatment-list-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}
.treatment-list-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.treatment-list-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.treatment-list-card-actions {
    display: flex;
    gap: 0.5rem;
}

/* Collapsible treatment sections */
.treatment-section-collapsed .treatment-section-body {
    display: none;
}
.treatment-section-collapsed .treatment-section-header {
    border-bottom: none;
}
.treatment-section-collapsed .treatment-section-header::after {
    content: '▾';
    margin-left: auto;
    color: #94a3b8;
    font-size: 0.85rem;
}
.treatment-section-header::after {
    content: '▴';
    margin-left: auto;
    color: #94a3b8;
    font-size: 0.85rem;
    transition: transform 0.2s;
}
.treatment-section-header {
    transition: background 0.15s;
}
.treatment-section-header:hover {
    background: #e2e8f0;
}

/* Sticky treatment actions on mobile */
.treatment-actions {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 0.75rem 0;
    z-index: 10;
}

/* ===== Mobile responsive ===== */
@media (max-width: 768px) {
    .zaznamy-panel {
        padding: 1rem;
        border-radius: 0.5rem;
    }
    .zaznamy-panel h3 {
        font-size: 1.1rem;
    }

    /* Tabs: hidden in mobile, navigation via hero cards */
    .zaznamy-tabs {
        display: none;
    }

    /* Mobile back button */
    .zaznamy-mobile-back {
        display: flex;
        align-items: center;
        gap: 0.375rem;
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.75rem;
        font-size: 0.85rem;
        color: var(--color-primary, #3D3D3D);
        text-decoration: none;
        background: transparent;
        border: none;
        cursor: pointer;
    }
    .zaznamy-mobile-back:hover {
        text-decoration: underline;
    }

    /* Cards: single column */
    .zaznamy-cards {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .zaznamy-card {
        padding: 1rem;
    }
    .zaznamy-card-icon {
        font-size: 1.75rem;
    }

    /* Treatment form: compact sections */
    .treatment-section {
        margin-bottom: 0.75rem;
        border-radius: 0.5rem;
    }
    .treatment-section-header {
        padding: 0.625rem 0.75rem;
    }
    .treatment-section-num {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.75rem;
    }
    .treatment-section-header h4 {
        font-size: 0.9rem;
    }
    .treatment-section-body {
        padding: 0.75rem;
    }

    /* Treatment grid: single column on mobile */
    .treatment-grid {
        grid-template-columns: 1fr;
        gap: 0.625rem;
    }

    /* Form inputs: larger touch targets */
    .treatment-section-body input[type="text"],
    .treatment-section-body input[type="date"],
    .treatment-section-body input[type="datetime-local"],
    .treatment-section-body select,
    .treatment-section-body textarea {
        padding: 0.625rem 0.625rem;
        font-size: 0.9rem;
        min-height: 2.5rem;
    }

    /* Material chips: smaller on mobile */
    .treatment-materials {
        gap: 0.25rem;
    }
    .treatment-material-chip {
        padding: 0.2rem 0.4rem;
        font-size: 0.72rem;
    }

    /* Cooperation: 2 columns on mobile */
    .treatment-cooperation {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    /* Signatures: full width, taller */
    .treatment-signatures {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .signature-canvas {
        height: 180px;
    }

    /* Sticky action buttons */
    .treatment-actions {
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        flex-direction: column-reverse;
        gap: 0.5rem;
        background: #fff;
        border-top: 2px solid #e2e8f0;
        padding: 0.75rem 0.25rem;
        margin: 0 -0.75rem -0.75rem;
        z-index: 20;
    }
    .treatment-actions .btn {
        width: 100%;
        padding: 0.75rem;
        font-size: 1rem;
    }

    /* Coworker add row: stack */
    .treatment-add-coworker {
        flex-direction: column;
        align-items: stretch;
        gap: 0.375rem;
    }
    .treatment-add-coworker select {
        max-width: none;
        width: 100%;
    }

    /* Treatment list cards: compact */
    .treatment-list-card {
        padding: 0.75rem;
    }
    .treatment-list-card-header {
        flex-wrap: wrap;
        gap: 0.375rem;
    }
    .treatment-list-card-meta {
        gap: 0.5rem;
        font-size: 0.78rem;
    }
    .treatment-list-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .treatment-list-card-actions {
        width: 100%;
        justify-content: flex-end;
    }

    /* Report wizard: compact */
    .report-step {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    .report-step-header {
        gap: 0.5rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
    }
    .report-step-num {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.8rem;
    }
    .report-step-header h4 {
        font-size: 1rem;
    }
    .report-step-actions {
        flex-direction: column-reverse;
        gap: 0.375rem;
    }
    .report-step-actions .btn {
        width: 100%;
        text-align: center;
    }
    .report-time-bulk {
        flex-direction: column;
        align-items: stretch;
        gap: 0.375rem;
    }
    .report-time-bulk label {
        margin-bottom: 0.125rem;
    }
    .report-time-bulk-fields {
        gap: 0.375rem;
    }
    .report-time-row {
        flex-wrap: wrap;
        gap: 0.25rem;
        padding: 0.375rem 0.5rem;
    }
    .report-time-name {
        min-width: 0;
        width: 100%;
        font-size: 0.8rem;
        margin-bottom: 0.125rem;
    }
    .report-time-fields {
        gap: 0.375rem;
    }
    .report-time-label input {
        font-size: 0.8rem;
        padding: 0.3rem 0.4rem;
    }
    .report-add-worker {
        flex-direction: column;
        align-items: stretch;
        gap: 0.375rem;
    }
    .report-add-worker .report-select-sm {
        width: 100%;
        min-width: 0;
    }
    .report-quick-note-btn {
        font-size: 0.85rem;
        padding: 0.625rem 0.75rem;
    }

    /* Recap: compact card layout in mobile */
    .report-recap {
        gap: 0.375rem;
    }
    .recap-section {
        font-size: 0.85rem;
        line-height: 1.3;
        margin-bottom: 0;
    }
    .recap-table {
        display: none;
    }
    .recap-worker-card {
        display: flex;
        flex-direction: column;
        gap: 0.125rem;
        padding: 0.5rem 0.625rem;
        background: #f8fafc;
        border: 1px solid var(--border);
        border-radius: 0.375rem;
        font-size: 0.8rem;
    }
    .recap-worker-card-name {
        font-weight: 600;
        margin-bottom: 0.125rem;
    }
    .recap-worker-card-times {
        display: flex;
        gap: 0.75rem;
        color: var(--text-muted, #64748b);
        font-size: 0.75rem;
    }
    .recap-worker-card-wage {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 0.8rem;
        font-weight: 600;
        margin-top: 0.125rem;
    }
    .recap-worker-card-total {
        background: #e2e8f0;
        border-color: #cbd5e1;
    }
    .recap-worker-card-total .recap-worker-card-name {
        font-size: 0.85rem;
    }

    /* Reports table: horizontal scroll with hint */
    .zaznamy-table-wrap {
        margin: 0 -1rem;
        padding: 0 1rem;
    }

    /* Alerts: full width on mobile */
    .alert {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .zaznamy-cards {
        gap: 0.5rem;
    }
    .treatment-material-chip {
        font-size: 0.75rem;
        padding: 0.25rem 0.4rem;
    }
    .signature-canvas {
        height: 200px;
    }
}

/* ===== Hero overview ===== */
.zaznamy-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.zaznamy-hero-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 0.75rem;
    text-decoration: none;
    color: #1e293b;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}
.zaznamy-hero-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}
.zaznamy-hero-card--blue {
    border-left: 3px solid #5A5A5A;
}
.zaznamy-hero-card--green {
    border-left: 3px solid #10b981;
}
.zaznamy-hero-icon {
    font-size: 2rem;
    flex-shrink: 0;
}
.zaznamy-hero-text h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #1e293b;
}
.zaznamy-hero-text p {
    margin: 0.25rem 0 0 0;
    font-size: 0.85rem;
    color: #64748b;
}
.zaznamy-hero-arrow {
    margin-left: auto;
    font-size: 1.25rem;
    color: #94a3b8;
    transition: transform 0.2s;
}
.zaznamy-hero-card:hover .zaznamy-hero-arrow {
    transform: translateX(4px);
    color: #475569;
}

.zaznamy-secondary-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.zaznamy-secondary-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.15s;
}
.zaznamy-secondary-link:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #1e293b;
}

/* ===== Compact form layout ===== */
.zaznamy-panel--form {
    padding: 1.25rem;
}
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.form-checkbox-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}
.checkbox-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 1.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s;
    white-space: nowrap;
}
.checkbox-pill input {
    margin: 0;
    width: 1rem;
    height: 1rem;
    accent-color: #3D3D3D;
    flex-shrink: 0;
}
.checkbox-pill:has(input:checked) {
    background: #e8e8e8;
    border-color: #3D3D3D;
    color: #2D2D2D;
    font-weight: 600;
}

/* Tighter form groups in form panels */
.zaznamy-panel--form .form-group {
    margin-bottom: 0.625rem;
}
.zaznamy-panel--form .form-group label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.2rem;
    display: block;
}
.zaznamy-panel--form input[type="text"],
.zaznamy-panel--form input[type="date"],
.zaznamy-panel--form input[type="datetime-local"],
.zaznamy-panel--form select,
.zaznamy-panel--form textarea {
    width: 100%;
    padding: 0.5rem 0.625rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background: #fff;
}
.zaznamy-panel--form textarea {
    resize: vertical;
    font-family: inherit;
    min-height: 2.5rem;
}

/* Cooperation: horizontal pills, time input appears inline */
.treatment-cooperation {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.treatment-coop-item {
    flex-direction: row;
    align-items: center;
    gap: 0.375rem;
}
.coop-time {
    font-size: 0.78rem;
    padding: 0.3rem 0.4rem;
    width: auto;
    max-width: 180px;
}

/* Consistent section styling for both report and treatment */
.zaznamy-panel--form .report-step,
.zaznamy-panel--form .treatment-section {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    overflow: hidden;
}
.zaznamy-panel--form .report-step-header,
.zaznamy-panel--form .treatment-section-header {
    padding: 0.625rem 0.875rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.zaznamy-panel--form .report-step-num,
.zaznamy-panel--form .treatment-section-num {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.75rem;
}
.zaznamy-panel--form .report-step-header h4,
.zaznamy-panel--form .treatment-section-header h4 {
    font-size: 0.9rem;
    margin: 0;
}
.zaznamy-panel--form .report-step-body,
.zaznamy-panel--form .treatment-section-body {
    padding: 0.75rem 0.875rem;
}

/* ===== Mobile responsive v2 ===== */
@media (max-width: 768px) {
    /* Hero: stack vertically */
    .zaznamy-hero {
        grid-template-columns: 1fr;
        gap: 0.625rem;
    }
    .zaznamy-hero-card {
        padding: 1rem;
        gap: 0.75rem;
    }
    .zaznamy-hero-icon {
        font-size: 2rem;
    }
    .zaznamy-hero-text h3 {
        font-size: 1.05rem;
    }
    .zaznamy-hero-text p {
        font-size: 0.8rem;
    }

    /* Secondary links: full width row */
    .zaznamy-secondary-links {
        gap: 0.5rem;
    }
    .zaznamy-secondary-link {
        flex: 1;
        justify-content: center;
        padding: 0.625rem 0.5rem;
        font-size: 0.82rem;
    }

    /* Form rows: single column on mobile */
    .form-row-2 {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    /* Checkbox pills: horizontal row, wrap */
    .form-checkbox-inline {
        gap: 0.375rem;
    }
    .checkbox-pill {
        padding: 0.3rem 0.625rem;
        font-size: 0.82rem;
    }

    /* Cooperation: horizontal pills on one row */
    .treatment-cooperation {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.375rem;
    }
    .treatment-coop-item {
        flex-direction: column;
        gap: 0.25rem;
    }
    .coop-time {
        max-width: 100%;
        width: 100%;
    }

    /* Form panel: minimal padding */
    .zaznamy-panel--form {
        padding: 0.875rem;
    }

    /* Inputs: 16px font to prevent iOS zoom, compact height */
    .zaznamy-panel--form input[type="text"],
    .zaznamy-panel--form input[type="date"],
    .zaznamy-panel--form input[type="datetime-local"],
    .zaznamy-panel--form select,
    .zaznamy-panel--form textarea {
        font-size: 0.875rem;
        padding: 0.5rem 0.5rem;
    }

    /* Material chips: tighter */
    .treatment-materials {
        gap: 0.375rem;
    }
    .treatment-material-chip {
        padding: 0.25rem 0.5rem;
        font-size: 0.78rem;
    }

    /* Signatures: full width */
    .treatment-signatures {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .signature-canvas {
        height: 160px;
    }

    /* Sticky actions */
    .treatment-actions {
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        flex-direction: row;
        gap: 0.5rem;
        background: #fff;
        border-top: 2px solid #e2e8f0;
        padding: 0.625rem 0.25rem;
        margin: 0.5rem -0.875rem -0.875rem;
        z-index: 20;
    }
    .treatment-actions .btn {
        flex: 1;
        padding: 0.625rem;
        font-size: 0.9rem;
    }

    /* Coworker add: inline on mobile */
    .treatment-add-coworker {
        flex-direction: row;
        gap: 0.375rem;
    }
    .treatment-add-coworker select {
        flex: 1;
        min-width: 0;
    }

    /* Report wizard steps: same compact style */
    .report-step-actions {
        flex-direction: row;
        gap: 0.375rem;
    }
    .report-step-actions .btn {
        flex: 1;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .zaznamy-hero-card {
        padding: 0.875rem;
    }
    .checkbox-pill {
        font-size: 0.78rem;
        padding: 0.25rem 0.5rem;
    }
    .treatment-material-chip {
        font-size: 0.75rem;
    }
    .signature-canvas {
        height: 180px;
    }
}

/* Online status indicator */
.user-online-status {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 11px;
}
.user-online-status.status-online {
    color: #22c55e;
}
.user-online-status.status-offline {
    color: #ef4444;
}
.online-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    cursor: help;
    vertical-align: middle;
    margin-right: 0.35rem;
}
.online-dot.online {
    background: #22c55e;
    box-shadow: 0 0 4px rgba(34, 197, 94, 0.5);
}
.online-dot.offline {
    background: #ef4444;
}
/* Active feedback for all clickable elements */
button:active, a:active, [role="button"]:active, input[type="submit"]:active, input[type="button"]:active, .btn:active, summary:active, .event-email-trigger:active, .event-participant-remove:active, .position-assign-btn:active, .event-location-trigger:active, .event-equipment-trigger:active, .event-service-location:active, .event-service-equipment:active, .wall-comment-dots:active, .sh-bottom strong:active {
    transform: scale(0.96);
    transition: transform 0.08s ease;
}

/* Subtle brightness feedback for icons inside buttons/links */
button:active i, a:active i, summary:active i, .btn:active i {
    opacity: 0.8;
}

/* ===== MOBILE: kompaktní tlačítka vedle sebe ===== */
@media (max-width: 768px) {
    .btn { padding: 0.4rem 0.7rem; font-size: 0.8rem; }
    .btn-sm { padding: 0.3rem 0.55rem; font-size: 0.72rem; }
    .btn-xs { padding: 0.25rem 0.45rem; font-size: 0.68rem; }
    .btn-icon-only { padding: 0.5rem; }

    /* Hlavičky stránek — tlačítka nesmí být na celou šířku */
    .page-header .btn { width: auto; }

    /* Akční řádky — tlačítka vedle sebe, stejně široká */
    .page-actions { flex-wrap: nowrap !important; }
    .page-actions .btn,
    .page-actions .template-dropdown { flex: 1 1 0 !important; min-width: 0; }
    .page-actions .btn { padding: 0.25rem 0.3rem; font-size: 0.62rem; }
    .page-actions .template-dropdown summary { font-size: 0.62rem; padding: 0.25rem 0.3rem; }

    /* Karty uživatelů — edit tlačítko není full-width */
    .user-card-edit { flex-basis: auto; }
    .user-card-edit .btn { width: auto; }

    /* Zeď / ostatní akční řádky */
    .wall-edit-actions .btn { min-width: 0; flex: 1; }

    /* Obecné akční kontejnery v kartách — raději wrap vedle sebe než sloupec */
    .user-card-actions,
    .settings-item-actions,
    .treatment-list-card-actions { display: flex; flex-direction: row; flex-wrap: wrap; gap: 0.375rem; }
    .user-card-actions .btn,
    .settings-item-actions .btn { width: auto; flex: 0 1 auto; }
}
@media (max-width: 480px) {
    .btn { padding: 0.35rem 0.55rem; font-size: 0.75rem; }
    .btn-sm { padding: 0.28rem 0.45rem; font-size: 0.68rem; }
    .btn-icon-only { padding: 0.45rem; }
}
