/* EuTrack Portal - Minimalistický design */

:root {
    --primary: #000;
    --secondary: #666;
    --border: #e0e0e0;
    --surface: #fff;
    --bg: #fafafa;
    --radius: 16px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg);
    color: var(--primary);
    line-height: 1.6;
    font-size: 16px;
}

body.prelogin-page {
    min-height: 100vh;
    color: #0f172a;
    background:
        radial-gradient(1100px 520px at 50% 16%, rgba(186, 230, 253, 0.56), rgba(186, 230, 253, 0) 62%),
        radial-gradient(900px 500px at 84% 74%, rgba(191, 219, 254, 0.36), rgba(191, 219, 254, 0) 62%),
        linear-gradient(165deg, #f8fbff 0%, #eff6ff 48%, #eef2ff 100%);
    overflow-x: hidden;
    position: relative;
}

body.prelogin-page::before,
body.prelogin-page::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

body.prelogin-page::before {
    background:
        repeating-linear-gradient(112deg, rgba(148, 163, 184, 0.16) 0px, rgba(148, 163, 184, 0.16) 1px, transparent 1px, transparent 74px),
        repeating-linear-gradient(24deg, rgba(203, 213, 225, 0.14) 0px, rgba(203, 213, 225, 0.14) 1px, transparent 1px, transparent 98px);
    opacity: 0.28;
}

body.prelogin-page::after {
    background: radial-gradient(circle at 16% 28%, rgba(224, 242, 254, 0.82), transparent 22%),
        radial-gradient(circle at 88% 41%, rgba(219, 234, 254, 0.64), transparent 26%),
        radial-gradient(circle at 26% 82%, rgba(226, 232, 240, 0.54), transparent 18%);
    mix-blend-mode: normal;
    opacity: 0.34;
}

body.prelogin-page .mobile-news-scroll-btn,
body.prelogin-page main.main-content {
    display: none !important;
}

body.prelogin-page header {
    min-height: calc(100vh - 112px);
    margin: 0;
    padding: 0;
    border-bottom: none;
    background: transparent;
    position: relative;
    z-index: 2;
}

body.prelogin-page header .container {
    max-width: 1040px;
    min-height: calc(100vh - 112px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 20px 28px;
}

.prelogin-hero-shell {
    width: 100%;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 22px;
}

.prelogin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    font-size: 24px;
    line-height: 1.3;
    font-weight: 500;
    color: #334155;
    text-shadow: none;
}

.prelogin-nameday {
    text-align: right;
    font-size: 24px;
    color: #1e293b !important;
    font-weight: 500 !important;
}

.prelogin-brand-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 14px;
    padding: 24px 16px;
}

.prelogin-logo-plate {
    border-radius: 18px;
    padding: 10px 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.92) 100%);
    border: 1px solid rgba(203, 213, 225, 0.9);
    box-shadow: 0 12px 28px rgba(148, 163, 184, 0.32);
    opacity: 0;
    transform: translateY(96px) scale(0.12);
    transform-origin: center center;
    will-change: transform, opacity;
    animation: prelogin-logo-reveal 2600ms cubic-bezier(0.22, 0.61, 0.36, 1) 120ms forwards;
}

.prelogin-main-logo {
    width: min(290px, 62vw);
    height: auto;
    object-fit: contain;
    filter: none;
    cursor: pointer;
}

@keyframes prelogin-logo-reveal {
    0% {
        opacity: 0;
        transform: translateY(96px) scale(0.12);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.prelogin-title {
    margin: 6px 0 2px;
    font-size: clamp(34px, 4.9vw, 62px);
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
    text-shadow: none;
}

.prelogin-subtitle {
    margin: 0;
    max-width: 780px;
    font-size: clamp(20px, 2vw, 30px);
    line-height: 1.35;
    color: #334155;
    font-weight: 500;
}

.prelogin-nowrap {
    white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
    .prelogin-logo-plate {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

.prelogin-lead {
    margin: 2px 0 2px;
    max-width: 740px;
    font-size: clamp(17px, 1.28vw, 20px);
    line-height: 1.5;
    color: #475569;
    font-weight: 400;
}

.prelogin-auth-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.prelogin-auth-buttons .prelogin-btn {
    min-width: 210px;
    min-height: 58px;
    border-radius: 999px;
    padding: 14px 34px;
    font-size: clamp(19px, 1.55vw, 25px);
    font-weight: 650;
    letter-spacing: 0.01em;
    color: #ffffff;
    border: 1px solid rgba(37, 99, 235, 0.46);
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 45%, #38bdf8 100%);
    box-shadow: 0 10px 22px rgba(59, 130, 246, 0.28);
}

.prelogin-auth-buttons .prelogin-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(59, 130, 246, 0.34);
}

.prelogin-auth-buttons .prelogin-btn-alt {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 52%, #0ea5e9 100%);
}

.prelogin-online-status {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(255, 255, 255, 0.68);
    font-size: clamp(14px, 1.1vw, 16px);
    font-weight: 600;
    color: #475569;
}

.prelogin-online-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.2);
}

.prelogin-online-status.is-offline {
    color: #991b1b;
    border-color: rgba(248, 113, 113, 0.5);
    background: rgba(254, 242, 242, 0.85);
}

.prelogin-online-status.is-offline .prelogin-online-dot {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.22);
}

.prelogin-online-status.is-online {
    color: #166534;
    border-color: rgba(74, 222, 128, 0.5);
    background: rgba(240, 253, 244, 0.88);
}

.prelogin-online-status.is-online .prelogin-online-dot {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22);
}

body.prelogin-page footer {
    position: relative;
    z-index: 2;
    margin-top: 0;
    border-top: none;
    background: transparent;
    color: #475569;
    padding: 8px 20px 20px;
}

body.prelogin-page footer .container {
    max-width: 980px;
}

body.prelogin-page footer p {
    margin-bottom: 3px;
    text-shadow: none;
}

body.prelogin-page footer a {
    color: #1d4ed8;
    font-weight: 700;
}

body.prelogin-page .time-separator {
    opacity: 0.65;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 30px 0;
    margin-bottom: 40px;
}

/* Desktop + obecne: hlavička zůstává zafixovaná při scrollu na uživatelských stránkách */
body.user-home-page header,
body.has-user-global-header header.user-global-header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(6px);
    padding: 14px 0;
    margin-bottom: 24px;
}

body.user-home-page,
body.has-user-global-header {
    --user-footer-height: 78px;
    padding-bottom: calc(var(--user-footer-height, 78px) + 18px + env(safe-area-inset-bottom, 0px));
}

body.user-home-page>footer,
body.has-user-global-header>footer,
body.has-user-global-header>footer.page-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 880;
    margin-top: 0;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid #dbe5f2;
    box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.08);
}

body.user-home-page>footer .container,
body.has-user-global-header>footer .container,
body.has-user-global-header>footer.page-footer .container {
    padding-top: 8px;
    padding-bottom: 8px;
}

body.user-home-page .support-fab,
body.has-user-global-header .support-fab {
    bottom: calc(var(--user-footer-height, 78px) + 16px + env(safe-area-inset-bottom, 0px)) !important;
}

@media (max-width: 768px) {

    body.user-home-page .support-fab,
    body.has-user-global-header .support-fab {
        right: 16px;
        bottom: calc(var(--user-footer-height, 78px) + 14px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

body.user-home-page .mobile-news-scroll-btn {
    bottom: calc(var(--user-footer-height, 78px) + 16px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 768px) {
    body.user-home-page .mobile-news-scroll-btn {
        bottom: calc(var(--user-footer-height, 78px) + 14px + env(safe-area-inset-bottom, 0px));
    }
}

.user-header-shell {
    position: relative;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    font-size: 48px;
    cursor: pointer;
    user-select: none;
}

.site-title {
    display: flex;
    flex-direction: column;
}

.site-title h1 {
    font-size: 32px;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.5px;
}

.tagline {
    font-size: 14px;
    color: var(--secondary);
    font-weight: 500;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.current-datetime {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    font-size: 14px;
    color: var(--secondary);
    font-weight: 500;
}

.current-datetime-primary {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.user-current-holiday {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #dc2626;
}

.time-separator {
    margin: 0 8px;
    opacity: 0.5;
}

.user-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.user-header-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.user-header-logo {
    height: 82px;
    width: auto;
    cursor: pointer;
    border-radius: 8px;
    display: block;
}

.user-header-toggle {
    display: none;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.user-header-toggle-core {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.1));
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.38);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.user-header-toggle-icon {
    width: 11px;
    height: 11px;
    border-right: 2.2px solid #ffffff;
    border-bottom: 2.2px solid #ffffff;
    transform: rotate(-135deg);
    transition: transform 0.24s ease, margin 0.24s ease;
    margin-top: 4px;
}

body.user-header-manually-collapsed .user-header-toggle-icon {
    transform: rotate(45deg);
    margin-top: -2px;
}

.user-message-link {
    position: relative;
}

.user-unread-badge {
    position: absolute;
    top: -7px;
    right: -7px;
    background: #dc2626;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.user-greeting {
    font-size: 14px;
    color: var(--secondary);
}

.profile-menu-wrap {
    position: relative;
    display: inline-block;
}

.profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.profile-btn-label {
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

.profile-btn-chevron {
    font-size: 10px;
    flex: 0 0 auto;
}

.profile-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border: 1px solid #dbe5f2;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
    min-width: 220px;
    z-index: 1000;
    overflow: hidden;
}

.profile-menu-item {
    display: block;
    padding: 12px 14px;
    color: #1e3a8a;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}

.profile-menu-item:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.profile-menu-item-danger {
    color: #dc2626;
    border-top: 1px solid #e2e8f0;
    font-weight: 600;
}

.profile-menu-item-danger:hover {
    background: #fef2f2;
    color: #b91c1c;
}

/* Layout Grid */
.content-layout {
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 30px;
    margin-bottom: 40px;
}

.main-content {
    min-width: 0;
}

.sidebar {
    position: sticky;
    top: 20px;
    align-self: start;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    text-decoration: none;
    border-radius: 14px;
    font-weight: 600;
    border: 1px solid #1d4ed8;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 15px;
    text-align: center;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.22);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.32);
}

.btn-secondary {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    border-color: #1e293b;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #b91c1c;
}

.btn-danger:hover {
    box-shadow: 0 10px 24px rgba(220, 38, 38, 0.3);
}

.vacation-actions .btn {
    background: #f4f6f9;
    color: #1f2937;
    border: 1px solid #d7dde5;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.vacation-actions .btn:hover {
    background: #eef2f6;
    transform: none;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
}

.vacation-actions .btn-primary {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #3730a3;
}

.vacation-actions .btn-primary:hover {
    background: #e0e7ff;
}

.vacation-actions .btn-success {
    background: #ecfdf3;
    border-color: #bbf7d0;
    color: #166534;
}

.vacation-actions .btn-success:hover {
    background: #dcfce7;
}

.vacation-actions .btn-secondary {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #334155;
}

.vacation-actions .btn-secondary:hover {
    background: #f1f5f9;
}

.vacation-actions .btn-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.vacation-actions .btn-danger:hover {
    background: #fee2e2;
}

.btn-sm {
    padding: 9px 16px;
    font-size: 14px;
    border-radius: 999px;
}

.user-auth .btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    border-color: #1d4ed8 !important;
}

.user-auth .btn-secondary {
    background: linear-gradient(135deg, #475569 0%, #334155 100%) !important;
    border-color: #1e293b !important;
}

.user-auth .btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    border-color: #b91c1c !important;
}

.btn-compact {
    width: auto;
    justify-self: start;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--primary);
}

.section-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.section-icon {
    font-size: 28px;
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.card:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--border);
}

/* News Cards */
.news-card {
    margin-bottom: 24px;
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.news-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.news-meta {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: var(--secondary);
    flex-wrap: wrap;
}

.news-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.news-content {
    color: var(--secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.news-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-standard {
    background: #f3f4f6;
    color: var(--secondary);
}

.badge-important {
    background: #fef2f2;
    color: #dc2626;
}

.badge-poll {
    background: #eff6ff;
    color: #2563eb;
}

/* App Cards */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Apps grid v sidebaru - jedna aplikace na řádek */
.apps-sidebar .apps-grid {
    grid-template-columns: 1fr;
}

.app-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    text-decoration: none;
    color: var(--primary);
}

.app-card:hover {
    transform: translateY(-4px);
}

.reported-data-cta-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 0 16px 0;
}

.reported-data-cta-btn {
    width: min(100%, 360px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 13px 18px;
    border: 1px solid #991b1b;
    border-radius: 18px;
    background: linear-gradient(135deg, #7f1d1d 0%, #b91c1c 52%, #ef4444 100%);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(185, 28, 28, 0.22);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.reported-data-cta-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(185, 28, 28, 0.28);
}

.reported-data-cta-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.reported-data-cta-label {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0.06em;
    line-height: 1.1;
}

.reported-data-cta-subtitle {
    max-width: 280px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    text-align: center;
    line-height: 1.3;
}

.reported-data-flash {
    width: min(100%, 380px);
    padding: 10px 12px;
    border-radius: 12px;
    font-weight: 700;
    text-align: center;
    font-size: 14px;
}

.reported-data-flash-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.reported-data-flash-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.reported-data-modal-content {
    max-width: 680px;
    padding: 24px 24px 22px;
    border-radius: 20px;
}

.reported-data-modal-intro {
    margin: 0 0 14px 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.55;
}

.reported-data-entry-list {
    display: grid;
    gap: 12px;
}

.reported-data-entry {
    border: 1px solid #dbe5f2;
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    padding: 12px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.reported-data-entry-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.reported-data-entry-title {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
}

.reported-data-entry-meta {
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
}

.reported-data-template-head {
    margin-bottom: 8px;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.reported-data-grid {
    display: grid;
    gap: 10px;
}

.reported-data-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
}

.reported-data-modal-content .modal-title {
    margin-bottom: 14px;
    padding-right: 32px;
    font-size: 20px;
}

.reported-data-modal-content .modal-close {
    top: 16px;
    right: 16px;
    font-size: 28px;
}

.reported-data-modal-content .form-group {
    margin-bottom: 16px;
}

.reported-data-modal-content .form-label,
.reported-data-modal-content label {
    margin-bottom: 6px;
    font-size: 14px;
}

.reported-data-modal-content input[type="text"],
.reported-data-modal-content input[type="date"],
.reported-data-modal-content select,
.reported-data-modal-content textarea {
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 15px;
}

.reported-data-modal-content textarea {
    min-height: 110px;
}

.reported-data-actions-row .btn,
.reported-data-modal-actions .btn,
.reported-data-remove-btn {
    border-radius: 12px;
    padding: 10px 16px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.reported-data-remove-btn {
    min-width: 98px;
}

.reported-data-actions-row {
    display: flex;
    justify-content: flex-start;
    margin-top: 12px;
}

.reported-data-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.app-icon {
    font-size: 48px;
    flex-shrink: 0;
}

.app-info h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px 0;
}

.app-description {
    font-size: 14px;
    color: var(--secondary);
    margin: 0;
}

.app-kpi-list {
    margin-top: 10px;
    display: grid;
    gap: 6px;
}

.app-kpi-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: #374151;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 5px 8px;
}

@keyframes aquanyOrangePulse {
    0% {
        background: #ffedd5;
        border-color: #fdba74;
    }

    50% {
        background: #fed7aa;
        border-color: #fb923c;
    }

    100% {
        background: #ffedd5;
        border-color: #fdba74;
    }
}

@keyframes aquanyRedPulse {
    0% {
        background: #fee2e2;
        border-color: #fca5a5;
    }

    50% {
        background: #fecaca;
        border-color: #f87171;
    }

    100% {
        background: #fee2e2;
        border-color: #fca5a5;
    }
}

.app-kpi-item-in-transit {
    animation: aquanyOrangePulse 1.8s ease-in-out infinite;
}

.app-kpi-item-delivered {
    background: #dcfce7;
    border-color: #86efac;
}

.app-kpi-item-returning {
    animation: aquanyRedPulse 1.8s ease-in-out infinite;
}

.app-kpi-item-assigned {
    background: #fef9c3;
    border-color: #fde047;
}

.app-kpi-item-new {
    background: #dbeafe;
    border-color: #93c5fd;
}

.app-kpi-item strong {
    color: #0f172a;
    font-weight: 700;
}

.app-kpi-unavailable {
    margin-top: 10px;
    font-size: 13px;
    color: #6b7280;
}

.aquany-info-board {
    position: relative;
    overflow: hidden;
    padding: 12px 14px;
    background: linear-gradient(180deg, #f8fbff 0%, #edf4fb 100%);
    color: #334155;
    border: 1px solid #c7d9ec;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
}

.aquany-info-board::before {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    pointer-events: none;
}

#aquany-info-board-section .section-header {
    align-items: center;
}

#aquany-info-board-section .section-header h2 {
    position: relative;
}

#aquany-info-board-section .section-header h2::after {
    content: 'LIVE';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 12px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    vertical-align: middle;
}

.aquany-info-subtitle {
    display: block;
    text-align: center;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1e3a8a;
    margin-bottom: 8px;
    font-weight: 700;
    padding: 2px 0 4px 0;
}

.aquany-feed-head {
    display: grid;
    grid-template-columns: 108px 96px 96px 1fr;
    gap: 8px;
    margin-bottom: 7px;
    padding: 7px 10px;
    border-radius: 8px;
    background: linear-gradient(180deg, #edf4fc 0%, #dde9f7 100%);
    border: 1px solid #c6d7e9;
    color: #2563eb;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.aquany-feed-list {
    display: grid;
    gap: 7px;
}

.aquany-feed-item {
    display: grid;
    grid-template-columns: 108px 96px 96px 1fr;
    align-items: start;
    gap: 8px;
    font-size: 12px;
    line-height: 1.35;
    padding: 8px 10px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #d7e3ef;
    box-shadow: 0 2px 8px rgba(148, 163, 184, 0.07);
}

.aquany-feed-time {
    color: #2563eb;
    font-weight: 700;
    font-size: 11px;
    white-space: nowrap;
}

.aquany-feed-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    width: 100%;
    border-radius: 6px;
    padding: 0 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid #cbd5e1;
    color: #334155;
    background: #f8fafc;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.aquany-feed-order {
    color: #b45309;
    font-weight: 700;
    white-space: nowrap;
    font-size: 11px;
}

.aquany-feed-text {
    color: #1e293b;
    font-weight: 500;
}

.aquany-feed-empty {
    margin: 4px 0 0 0;
    color: #64748b;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px dashed #c7d9ec;
    border-radius: 10px;
    padding: 12px 14px;
}

.aquany-feed-status-transit {
    border-left: 3px solid #f97316;
}

.aquany-feed-status-delivered {
    border-left: 3px solid #22c55e;
}

.aquany-feed-status-return {
    border-left: 3px solid #ef4444;
}

.aquany-feed-status-assigned {
    border-left: 3px solid #eab308;
}

.aquany-feed-status-new {
    border-left: 3px solid #38bdf8;
}

.aquany-feed-status-transit .aquany-feed-status {
    background: #fff7ed;
    border-color: #fdba74;
    color: #c2410c;
}

.aquany-feed-status-delivered .aquany-feed-status {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
}

.aquany-feed-status-return .aquany-feed-status {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #b91c1c;
}

.aquany-feed-status-assigned .aquany-feed-status {
    background: #fefce8;
    border-color: #facc15;
    color: #a16207;
}

.aquany-feed-status-new .aquany-feed-status {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

@media (max-width: 900px) {
    .aquany-feed-head {
        display: none;
    }

    .aquany-feed-item {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .aquany-feed-time {
        font-size: 11px;
    }

    .aquany-feed-status {
        width: fit-content;
    }
}

.my-docs-tile-required {
    position: relative;
    border-color: #fecaca;
    background: #fff7f7;
}

.my-docs-tile-warning {
    position: relative;
    border-color: #fed7aa;
    background: #fffbeb;
}

.my-docs-tile-ok {
    position: relative;
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.my-docs-status-badge {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 700;
}

.my-docs-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 12px;
    line-height: 1;
}

.my-docs-status-required {
    background: #fee2e2;
    color: #b91c1c;
}

.my-docs-status-required .my-docs-status-icon {
    background: #dc2626;
    color: #ffffff;
}

.my-docs-status-warning {
    background: #ffedd5;
    color: #9a3412;
}

.my-docs-status-warning .my-docs-status-icon {
    background: #f97316;
    color: #ffffff;
}

.my-docs-status-ok {
    background: #dcfce7;
    color: #166534;
}

.my-docs-status-ok .my-docs-status-icon {
    background: #16a34a;
    color: #ffffff;
}

.my-docs-required-count {
    position: absolute;
    top: -9px;
    right: -9px;
    min-width: 26px;
    height: 26px;
    padding: 0 7px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dc2626;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(220, 38, 38, 0.35);
    border: 2px solid #ffffff;
}

/* Poll Styling */
.poll-container {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.poll-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary);
}

.poll-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.poll-option {
    position: relative;
    cursor: pointer;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s;
    overflow: hidden;
}

.poll-option:hover {
    border-color: var(--primary);
    background: var(--bg);
}

.poll-option-disabled {
    cursor: default;
    opacity: 0.9;
}

.poll-option-disabled:hover {
    border-color: var(--border);
    background: var(--surface);
}

.poll-option-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.poll-option-text {
    font-size: 15px;
    font-weight: 500;
}

.poll-votes {
    font-size: 14px;
    color: var(--secondary);
    font-weight: 600;
}

.poll-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #f3f4f6 0%, #e5e7eb 100%);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--secondary);
    font-size: 14px;
    border-top: 1px solid var(--border);
    background: var(--surface);
    margin-top: 60px;
}

footer.user-global-footer,
footer.page-footer {
    padding: 0;
}

footer.user-global-footer .container,
footer.page-footer.user-global-footer .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    text-align: center;
    font-size: 13px;
    line-height: 1.35;
}

footer.user-global-footer p,
footer.page-footer.user-global-footer p {
    margin: 0;
}

footer.user-global-footer a,
footer.page-footer.user-global-footer a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

footer.user-global-footer a:hover,
footer.page-footer.user-global-footer a:hover {
    text-decoration: underline;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="date"],
input[type="datetime-local"],
input[type="tel"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s;
    background: var(--surface);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 15px;
    color: var(--primary);
}

.form-group {
    margin-bottom: 24px;
}

.password-field {
    position: relative;
    display: flex;
    align-items: center;
}

.password-field input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    color: var(--secondary);
    line-height: 1;
}

.password-toggle:hover {
    color: var(--primary);
}

.password-toggle:focus {
    outline: 2px solid #94a3b8;
    outline-offset: 2px;
    border-radius: 8px;
}

input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

.input-compact {
    width: 220px;
    max-width: 100%;
}

.input.input-compact,
select.input-compact {
    width: 220px;
}

.property-form {
    max-width: 980px;
}

.property-form .btn {
    justify-self: start;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.2s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--surface);
    margin: 2vh auto;
    padding: 30px;
    border-radius: var(--radius);
    max-width: 600px;
    max-height: 95vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    animation: slideDown 0.3s;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: block;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    font-weight: 300;
    color: var(--secondary);
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s;
}

.modal-close:hover {
    color: var(--primary);
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--primary);
}

.modal-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    font-size: 14px;
}

.modal-message.success {
    display: block;
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.modal-message.error {
    display: block;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.modal-links {
    margin-top: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-links a {
    color: var(--secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.modal-links a:hover {
    color: var(--primary);
}

/* Prelogin modal skin */
body.prelogin-page .modal {
    background: rgba(148, 163, 184, 0.32);
    backdrop-filter: blur(3px);
}

body.prelogin-page .modal-content {
    max-width: 640px;
    margin: 4vh auto;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.38);
    color: #0f172a;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 58%, rgba(241, 245, 249, 0.98) 100%);
    box-shadow:
        0 22px 42px rgba(15, 23, 42, 0.16),
        0 0 0 1px rgba(148, 163, 184, 0.12) inset;
}

body.prelogin-page .modal-content::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 18px;
    pointer-events: none;
    background:
        radial-gradient(520px 220px at 18% -6%, rgba(186, 230, 253, 0.3), transparent 60%),
        radial-gradient(460px 190px at 88% 108%, rgba(191, 219, 254, 0.28), transparent 62%);
}

body.prelogin-page .modal-form {
    position: relative;
    z-index: 1;
}

body.prelogin-page .modal-title {
    margin-bottom: 18px;
    color: #0f172a;
    letter-spacing: -0.02em;
}

body.prelogin-page .modal-close {
    color: #64748b;
}

body.prelogin-page .modal-close:hover {
    color: #0f172a;
}

body.prelogin-page .modal-message {
    border-radius: 10px;
    border: 1px solid transparent;
    font-weight: 600;
}

body.prelogin-page .modal-message.success {
    color: #166534;
    background: rgba(220, 252, 231, 0.84);
    border-color: rgba(134, 239, 172, 0.88);
}

body.prelogin-page .modal-message.error {
    color: #b91c1c;
    background: rgba(254, 242, 242, 0.92);
    border-color: rgba(254, 202, 202, 0.9);
}

body.prelogin-page .form-label,
body.prelogin-page label {
    color: #334155;
}

body.prelogin-page input[type="text"],
body.prelogin-page input[type="email"],
body.prelogin-page input[type="password"],
body.prelogin-page input[type="url"],
body.prelogin-page input[type="date"],
body.prelogin-page input[type="datetime-local"],
body.prelogin-page input[type="tel"],
body.prelogin-page input[type="number"],
body.prelogin-page textarea,
body.prelogin-page select {
    color: #0f172a;
    border-color: rgba(148, 163, 184, 0.45);
    background: rgba(255, 255, 255, 0.96);
}

body.prelogin-page input::placeholder,
body.prelogin-page textarea::placeholder {
    color: rgba(100, 116, 139, 0.78);
}

body.prelogin-page input:focus,
body.prelogin-page textarea:focus,
body.prelogin-page select:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

body.prelogin-page .password-toggle {
    color: #64748b;
}

body.prelogin-page .password-toggle:hover {
    color: #0f172a;
}

body.prelogin-page .modal-links a {
    color: #2563eb;
    font-weight: 600;
}

body.prelogin-page .modal-links a:hover {
    color: #1d4ed8;
}

body.prelogin-page .btn.btn-block {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 45%, #0ea5e9 100%);
    border-color: rgba(191, 219, 254, 0.64);
    font-weight: 600;
}

body.prelogin-page .btn.btn-block:hover {
    box-shadow: 0 14px 28px rgba(14, 165, 233, 0.34);
}

/* Admin styles */
.admin-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 16px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.admin-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.admin-nav-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-nav-link {
    color: white;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.2s;
    font-size: 14px;
    border: 1px solid transparent;
}

.admin-nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.14);
}

.admin-nav-link.active {
    background: rgba(59, 130, 246, 0.28);
    border-color: rgba(147, 197, 253, 0.45);
}

.admin-nav-link-accent {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: rgba(191, 219, 254, 0.55);
}

.admin-nav-link-accent:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

.admin-nav-link-violet {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border-color: rgba(221, 214, 254, 0.55);
}

.admin-nav-link-violet:hover {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
}

.admin-nav-link-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    position: relative;
}

.admin-badge {
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 6px;
    font-weight: 600;
}

.admin-badge-blue {
    background: #3b82f6;
}

.admin-badge-red {
    background: #ef4444;
}

.admin-badge-amber {
    background: #f59e0b;
}

.admin-badge-green {
    background: #10b981;
}

.admin-badge-dev {
    background: #f59e0b;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
}

.admin-theme th {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border-bottom: 1px solid #1d4ed8;
}

.admin-theme td {
    border-bottom: 1px solid #dbe5f2;
}

.admin-theme tr:hover td {
    background: #f8fbff;
}

.admin-theme input[type="text"],
.admin-theme input[type="email"],
.admin-theme input[type="password"],
.admin-theme input[type="url"],
.admin-theme input[type="date"],
.admin-theme input[type="datetime-local"],
.admin-theme input[type="tel"],
.admin-theme input[type="number"],
.admin-theme textarea,
.admin-theme select {
    border-color: #c9d8ee;
    background: #ffffff;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.admin-theme input:focus,
.admin-theme textarea:focus,
.admin-theme select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

.admin-theme label {
    color: #0f172a;
}

.admin-theme .input-compact,
.admin-theme .input.input-compact,
.admin-theme select.input-compact {
    width: 240px;
    max-width: 100%;
}

.admin-theme .modal {
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(2px);
}

.admin-theme .modal-content {
    border: 1px solid #dbe5f2;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.admin-theme .modal-title {
    color: #0f172a;
}

.admin-theme .modal-close {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    right: 14px;
    top: 14px;
    border-radius: 999px;
    color: #475569;
    background: #f1f5f9;
}

.admin-theme .modal-close:hover {
    color: #1d4ed8;
    background: #dbeafe;
}

.admin-theme .modal-message.success {
    background: #ecfdf3;
    border-color: #bbf7d0;
    color: #166534;
}

.admin-theme .modal-message.error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.admin-theme .modal-links a {
    color: #1d4ed8;
    font-weight: 500;
}

.admin-theme .modal-links a:hover {
    color: #1e3a8a;
}

.admin-theme .card,
.admin-theme .news-card {
    border: 1px solid #dbe5f2;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.admin-theme .card:hover,
.admin-theme .news-card:hover {
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.1);
}

.admin-theme div[style*="background: #dcfce7"][style*="color: #166534"],
.admin-theme div[style*="background: #d1fae5"][style*="color: #065f46"] {
    border: 1px solid #bbf7d0;
    box-shadow: 0 4px 12px rgba(22, 101, 52, 0.08);
}

.admin-theme div[style*="background: #fee2e2"][style*="color: #991b1b"],
.admin-theme div[style*="background: #fef2f2"][style*="color: #991b1b"],
.admin-theme div[style*="background: #fef2f2"][style*="color: #b91c1c"] {
    border: 1px solid #fecaca;
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.08);
}

.admin-theme span[style*="background: #dbeafe"][style*="color: #1d4ed8"],
.admin-theme span[style*="background: #dbeafe"][style*="color: #1e40af"] {
    border: 1px solid #bfdbfe;
}

.admin-theme .admin-container {
    display: grid;
    gap: 18px;
}

.admin-theme .admin-card {
    background: #ffffff;
    border: 1px solid #dbe5f2;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.admin-theme .alert {
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-weight: 500;
}

.admin-theme .alert-success {
    background: #ecfdf3;
    color: #166534;
    border-color: #bbf7d0;
}

.admin-theme .alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.admin-theme .admin-tab-actions {
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-theme .admin-tab-actions .btn {
    margin-right: 0 !important;
}

.admin-theme .admin-muted {
    color: #64748b;
}

.admin-theme .admin-empty {
    color: #64748b;
    padding: 20px;
    text-align: center;
}

.admin-theme .admin-overflow-x {
    overflow-x: auto;
}

.admin-theme .admin-inline {
    display: inline;
}

.admin-theme .admin-actions {
    display: flex;
    gap: 10px;
}

.admin-theme .admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 24px;
}

.admin-theme .admin-card-center {
    text-align: center;
}

.admin-theme .admin-stat-value {
    font-size: 32px;
    font-weight: 700;
}

.admin-theme .admin-stat-value-warning {
    color: #f59e0b;
}

.admin-theme .admin-stat-value-success {
    color: #10b981;
}

.admin-theme .section-title {
    color: #0f172a;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
}

.admin-theme .card h1,
.admin-theme .card h2,
.admin-theme .card h3,
.admin-theme .news-card h1,
.admin-theme .news-card h2,
.admin-theme .news-card h3,
.admin-theme .news-title {
    color: #0f172a;
    line-height: 1.28;
    letter-spacing: -0.01em;
    margin-top: 0;
    margin-bottom: 10px;
}

.admin-theme .card p,
.admin-theme .news-card p,
.admin-theme .app-description {
    color: #475569;
    line-height: 1.55;
    margin-bottom: 10px;
}

.admin-theme .card> :last-child,
.admin-theme .news-card> :last-child {
    margin-bottom: 0;
}

/* Admin redesign 2026 */
.admin-theme {
    background:
        radial-gradient(circle at 10% -10%, rgba(59, 130, 246, 0.22), transparent 45%),
        radial-gradient(circle at 90% -20%, rgba(139, 92, 246, 0.14), transparent 35%),
        #f3f7ff;
    color: #0f172a;
}

.admin-header {
    position: sticky;
    top: 0;
    z-index: 120;
    margin-bottom: 12px;
    background: linear-gradient(115deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 41, 59, 0.96) 45%, rgba(37, 99, 235, 0.88) 100%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(12px);
}

.admin-header .container {
    padding-top: 8px;
    padding-bottom: 8px;
}

.admin-brand-row {
    display: none;
}

.admin-logo {
    height: 74px;
    width: auto;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.35);
}

.admin-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-brand-kicker {
    margin: 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #bfdbfe;
    font-weight: 700;
}

.admin-brand-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #f8fafc;
}

.admin-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.admin-nav-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}

.admin-nav-actions .btn {
    padding: 7px 14px;
    font-size: 13px;
}

.admin-nav-scroll {
    overflow: visible;
    width: 100%;
}

.admin-nav-scroll::-webkit-scrollbar {
    display: none;
}

.admin-nav-scroll::-webkit-scrollbar-track {
    display: none;
}

.admin-nav-scroll::-webkit-scrollbar-thumb {
    display: none;
}

.admin-nav-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
    padding-bottom: 0;
}

.admin-nav-links-grouped {
    align-items: center;
}

.admin-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #e2e8f0;
    text-decoration: none;
    padding: 8px 13px;
    border-radius: 999px;
    font-weight: 600;
    transition: all 0.2s ease;
    font-size: 12px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.36);
    white-space: nowrap;
}

.admin-nav-link:hover {
    color: #ffffff;
    border-color: rgba(191, 219, 254, 0.7);
    background: rgba(30, 64, 175, 0.45);
    transform: translateY(-1px);
}

.admin-nav-link.active {
    color: #ffffff;
    border-color: rgba(147, 197, 253, 0.95);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.88) 0%, rgba(59, 130, 246, 0.95) 100%);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.34);
}

.admin-nav-link-accent {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-color: rgba(191, 219, 254, 0.75);
    color: #ffffff;
}

.admin-nav-link-violet {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    border-color: rgba(221, 214, 254, 0.75);
    color: #ffffff;
}

.admin-nav-link-disabled {
    opacity: 0.62;
    cursor: not-allowed;
}

.admin-nav-dropdown {
    position: relative;
}

.admin-nav-dropdown-toggle {
    appearance: none;
    cursor: pointer;
    font-family: inherit;
    line-height: 1;
}

.admin-nav-dropdown.active .admin-nav-dropdown-toggle,
.admin-nav-dropdown.open .admin-nav-dropdown-toggle {
    color: #ffffff;
    border-color: rgba(147, 197, 253, 0.95);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.88) 0%, rgba(59, 130, 246, 0.95) 100%);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.34);
}

.admin-nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 290px;
    max-width: min(92vw, 360px);
    max-height: calc(100vh - 130px);
    overflow-y: auto;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(15, 23, 42, 0.97);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.42);
    display: none;
    flex-direction: column;
    gap: 6px;
    z-index: 180;
}

.admin-nav-dropdown.open .admin-nav-dropdown-menu {
    display: flex;
}

.admin-nav-dropdown-menu .admin-nav-link {
    width: 100%;
    justify-content: space-between;
    border-radius: 10px;
    padding: 9px 12px;
}

.admin-nav-dropdown-menu-right {
    left: auto;
    right: 0;
}

.admin-module-subnav {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(226, 232, 240, 0.2);
}

.admin-module-subnav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-module-subnav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border-radius: 999px;
    text-decoration: none;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.34);
    border: 1px solid rgba(148, 163, 184, 0.34);
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.admin-module-subnav-link:hover {
    color: #ffffff;
    background: rgba(30, 64, 175, 0.4);
    border-color: rgba(191, 219, 254, 0.65);
}

.admin-module-subnav-link.active {
    color: #ffffff;
    border-color: rgba(147, 197, 253, 0.95);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.88) 0%, rgba(59, 130, 246, 0.95) 100%);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.34);
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1;
    margin-left: 3px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.admin-theme main.container {
    max-width: 1440px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 18px;
    box-shadow: 0 20px 46px rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(4px);
}

.admin-theme .section-title {
    font-size: clamp(28px, 3.2vw, 38px);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 22px;
}

.admin-theme .apps-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
}

.admin-theme .app-card,
.admin-theme .news-card,
.admin-theme .card,
.admin-theme .admin-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.98) 100%);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 16px;
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
}

.admin-theme .app-card {
    padding: 16px;
    align-items: center;
    min-height: 116px;
}

.admin-theme .app-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
    border-color: rgba(59, 130, 246, 0.35);
}

.admin-theme .app-icon {
    font-size: 34px;
}

.admin-theme .app-title {
    font-size: 1.35rem;
    margin-bottom: 4px;
}

.admin-theme .news-card {
    padding: 16px 18px;
}

.admin-theme table {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.09);
    border: 1px solid rgba(148, 163, 184, 0.26);
}

.admin-theme th {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    color: #ffffff;
}

.admin-theme tr:hover td {
    background: #eff6ff;
}

.admin-theme .btn {
    border-radius: 12px;
    font-weight: 700;
}

.admin-theme .btn-block {
    display: block;
    width: 100%;
}

.admin-module-main {
    padding: 32px 20px;
}

.contacts-admin-theme .contacts-container {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 16px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.contacts-admin-theme .contacts-main,
.contacts-admin-theme .categories-sidebar {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.contacts-admin-theme .categories-sidebar {
    background: #f8fafc;
}

.admin-theme .page-footer,
.admin-theme footer.page-footer {
    text-align: center;
    padding: 24px 20px;
    color: #64748b;
    font-size: 14px;
}

.admin-dashboard {
    display: grid;
    gap: 22px;
}

.admin-highlight {
    background: linear-gradient(135deg, #4f46e5 0%, #6d28d9 55%, #7c3aed 100%);
    border-radius: 16px;
    padding: 20px;
    color: #ffffff;
    box-shadow: 0 16px 34px rgba(79, 70, 229, 0.3);
}

.admin-highlight-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.admin-highlight-icon {
    font-size: 34px;
}

.admin-highlight-title {
    margin: 0;
    font-size: 1.45rem;
    line-height: 1.2;
}

.admin-highlight-subtitle {
    margin: 6px 0 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.admin-highlight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.admin-highlight-item {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 12px;
    padding: 12px;
    text-decoration: none;
    color: #ffffff;
    transition: transform 0.2s ease, background 0.2s ease;
}

.admin-highlight-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.26);
}

.admin-highlight-item-icon {
    font-size: 1.3rem;
    margin-bottom: 6px;
}

.admin-highlight-item-value {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.15;
}

.admin-highlight-item-label {
    margin-top: 4px;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.92);
}

.admin-overview-grid {
    margin-bottom: 6px;
}

.admin-overview-card {
    cursor: default;
}

.admin-overview-card-link {
    cursor: pointer;
}

.admin-overview-card.is-warning {
    border-color: rgba(245, 158, 11, 0.56);
    background: linear-gradient(180deg, #fffbeb 0%, #fff7ed 100%);
}

.admin-overview-value {
    color: #64748b;
    transition: color 0.2s ease;
}

.admin-overview-value.is-alert {
    color: #ef4444;
    animation: pulse 2s infinite;
}

.admin-overview-value.is-warning {
    color: #d97706;
}

.admin-overview-meta {
    margin: 6px 0 0 0;
    font-size: 0.82rem;
    color: #64748b;
}

.admin-overview-meta-small {
    font-size: 0.76rem;
    color: #94a3b8;
}

.admin-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.admin-panel {
    margin-bottom: 0;
}

.admin-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.admin-info-list p {
    margin-bottom: 8px;
}

.admin-log-item {
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.admin-log-title,
.admin-log-text,
.admin-log-meta {
    margin: 0;
}

.admin-log-text {
    color: #475569;
    font-size: 0.9rem;
    margin-top: 2px;
}

.admin-log-meta {
    color: #64748b;
    font-size: 0.8rem;
    margin-top: 2px;
}

.admin-log-actions {
    margin-top: 10px;
}

.admin-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-page-head .section-title {
    margin: 0;
}

.admin-card-spaced {
    margin-bottom: 20px;
}

.admin-overflow-x {
    overflow-x: auto;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table-wrap .table,
.admin-table-wrap table {
    width: 100%;
    margin-top: 10px;
}

.admin-form-grid {
    display: grid;
    gap: 12px;
}

.admin-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.admin-grid-2-wide {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.admin-inline-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-inline-form-inline {
    display: inline;
}

.admin-inline-form-inline-spaced {
    display: inline;
    margin-left: 6px;
}

.admin-inline-label {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.admin-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-flash-success {
    background: #dcfce7;
    color: #166534;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.admin-flash-info {
    background: #e0f2fe;
    color: #0c4a6e;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.admin-textarea-sm {
    min-height: 60px;
}

.admin-chip {
    background: #dbeafe;
    color: #1d4ed8;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
}

.events-subgrid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.events-stack {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.events-soft-card {
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.events-soft-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: flex-start;
}

.events-field-zero {
    margin: 0;
}

.events-toggle-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 24px;
}

.events-toggle-label {
    margin: 0;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
}

.events-actions-top {
    margin-top: 20px;
}

.events-note {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #78350f;
}

.events-note-example {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #fcd34d;
    font-family: monospace;
    background: #fef3c7;
    padding-left: 12px;
}

.events-spaced {
    margin-top: 16px;
}

.events-muted-cell {
    text-align: center;
    color: #64748b;
    padding: 20px;
}

.events-center-cell {
    text-align: center;
}

.events-age-cell {
    text-align: center;
    font-weight: 600;
    color: #1e40af;
}

.events-actions-column {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.events-btn-xs {
    padding: 6px 10px;
    font-size: 12px;
}

.events-detail-row {
    background: #f9fafb;
}

.events-detail-cell {
    padding: 12px !important;
}

.events-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.events-inline-send {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.events-inline-send-meta {
    font-size: 11px;
    color: #6b7280;
}

.events-inline-send-ok {
    color: #10b981;
    font-weight: 500;
}

.events-inline-send-empty {
    color: #9ca3af;
}

.events-template-vars {
    background: #e0e7ff;
    border: 1px solid #818cf8;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #3730a3;
}

.events-template-vars-grid {
    margin-top: 6px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 8px;
}

.events-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.events-template-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0e7ff 100%);
    border: 1px solid #a5b4fc;
    border-radius: 8px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.1);
}

.events-template-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
}

.events-template-text {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

.events-template-preview {
    background: white;
    padding: 6px 8px;
    border-radius: 4px;
    margin-top: 4px;
    word-break: break-word;
    overflow: hidden;
}

.events-template-preview-subject {
    max-height: 40px;
    margin-bottom: 8px;
}

.events-template-preview-body {
    max-height: 60px;
}

.events-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.events-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.events-modal-head,
.events-modal-body,
.events-modal-foot {
    padding: 20px;
}

.events-modal-head {
    border-bottom: 1px solid #e5e7eb;
}

.events-modal-title {
    margin: 0;
    color: #1f2937;
    font-size: 18px;
}

.events-modal-foot {
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.events-textarea-code {
    width: 100%;
    min-height: 120px;
    font-family: monospace;
}

.events-variables-box {
    background: #f3f4f6;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 12px;
    color: #6b7280;
}

.events-variables-list {
    margin-top: 6px;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@media (max-width: 1100px) {
    .admin-nav {
        grid-template-columns: 1fr;
    }

    .admin-nav-actions {
        justify-self: start;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .admin-header {
        position: static;
    }

    .admin-header .container {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .admin-brand-row {
        display: none;
    }

    .admin-logo {
        height: 58px;
    }

    .admin-brand-title {
        font-size: 17px;
    }

    .admin-nav-link {
        padding: 7px 11px;
        font-size: 12px;
    }

    .admin-nav-actions {
        gap: 5px;
    }

    .admin-nav-actions .btn {
        padding: 7px 12px;
        font-size: 12px;
    }

    .admin-nav-links-grouped {
        width: 100%;
    }

    .admin-nav-dropdown {
        width: 100%;
    }

    .admin-nav-dropdown-toggle {
        width: 100%;
        justify-content: flex-start;
    }

    .admin-nav-dropdown-menu,
    .admin-nav-dropdown-menu-right {
        position: static;
        min-width: 0;
        max-width: 100%;
        width: 100%;
        max-height: min(56vh, 420px);
        margin-top: 6px;
    }

    .admin-nav-links-grouped>.admin-nav-link {
        width: 100%;
        justify-content: flex-start;
    }

    .admin-module-subnav-link {
        width: 100%;
        justify-content: flex-start;
    }

    .admin-theme main.container {
        border-radius: 14px;
    }

    .admin-module-main {
        padding: 22px 14px;
    }

    .admin-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-theme .section-title {
        margin-bottom: 10px;
    }

    .admin-theme .card h1,
    .admin-theme .card h2,
    .admin-theme .card h3,
    .admin-theme .news-card h1,
    .admin-theme .news-card h2,
    .admin-theme .news-card h3,
    .admin-theme .news-title {
        margin-bottom: 8px;
    }
}

@media (max-width: 768px) {

    .admin-theme input[type="text"],
    .admin-theme input[type="email"],
    .admin-theme input[type="password"],
    .admin-theme input[type="url"],
    .admin-theme input[type="date"],
    .admin-theme input[type="datetime-local"],
    .admin-theme input[type="tel"],
    .admin-theme input[type="number"],
    .admin-theme textarea,
    .admin-theme select {
        font-size: 16px;
        padding: 12px 14px;
    }
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

th {
    background: var(--primary);
    color: white;
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: var(--bg);
}

.table-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.table-link:hover {
    text-decoration: underline;
}

.table-action {
    white-space: nowrap;
}

.return-form {
    display: none;
    margin-top: 8px;
}

.return-form.is-open {
    display: grid;
    gap: 6px;
}

/* Responsive */
@media (max-width: 1024px) {
    .content-layout {
        display: flex;
        flex-direction: column;
    }

    .sidebar {
        position: static;
    }

    /* Na mobilech zobrazit aplikace jako první */
    .apps-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .user-header-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        left: 10px;
        bottom: -18px;
        width: 42px;
        height: 42px;
        padding: 0;
        border: 1px solid rgba(125, 211, 252, 0.45);
        border-radius: 50%;
        background: linear-gradient(135deg, #0b2444 0%, #1d4ed8 58%, #3b82f6 100%);
        box-shadow: 0 12px 26px rgba(37, 99, 235, 0.3), 0 0 0 1px rgba(191, 219, 254, 0.15);
        cursor: pointer;
        z-index: 3;
    }

    .user-header-toggle::before {
        content: "";
        position: absolute;
        inset: 2px;
        border-radius: 50%;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
        pointer-events: none;
    }

    .user-header-toggle:active {
        transform: translateY(1px) scale(0.98);
        filter: saturate(1.05);
    }

    body.user-header-manually-collapsed .user-header-toggle {
        background: linear-gradient(135deg, #0f3b74 0%, #2563eb 55%, #38bdf8 100%);
    }

    @media (hover: hover) {
        .user-header-toggle:hover {
            transform: translateY(-1px);
            box-shadow: 0 14px 28px rgba(37, 99, 235, 0.36), 0 0 0 1px rgba(219, 234, 254, 0.2);
        }
    }

    body.has-user-global-header header.user-global-header {
        transition: padding 0.25s ease, box-shadow 0.25s ease;
    }

    body.has-user-global-header header.user-global-header .header-content,
    body.user-home-page header .header-content {
        max-height: 220px;
        opacity: 1;
        overflow: hidden;
        transform: translateY(0);
        transition: max-height 0.28s ease, opacity 0.2s ease, transform 0.25s ease, margin 0.25s ease;
    }

    body.has-user-global-header.user-header-manually-collapsed header.user-global-header,
    body.user-home-page.user-header-manually-collapsed header {
        padding-top: 8px;
        padding-bottom: 16px;
        margin-bottom: 18px;
    }

    body.has-user-global-header.user-header-manually-collapsed header.user-global-header .header-content,
    body.user-home-page.user-header-manually-collapsed header .header-content {
        max-height: 0;
        opacity: 0;
        transform: translateY(-12px);
        pointer-events: none;
    }

    body.has-user-global-header header.user-global-header .logo-section {
        max-height: 220px;
        overflow: hidden;
        opacity: 1;
        transform: translateY(0);
        transition: max-height 0.28s ease, opacity 0.2s ease, transform 0.25s ease, margin 0.25s ease;
    }

    body.has-user-global-header.user-header-scrolled header.user-global-header {
        padding: 10px 0;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
    }

    body.has-user-global-header.user-header-scrolled header.user-global-header .header-content {
        gap: 8px;
    }

    body.has-user-global-header.user-header-scrolled header.user-global-header .logo-section {
        max-height: 0;
        opacity: 0;
        transform: translateY(-8px);
        margin: 0;
        pointer-events: none;
    }

    body.user-home-page header {
        transition: padding 0.25s ease, box-shadow 0.25s ease;
    }

    body.user-home-page .logo-section {
        max-height: 220px;
        overflow: hidden;
        opacity: 1;
        transform: translateY(0);
        transition: max-height 0.28s ease, opacity 0.2s ease, transform 0.25s ease, margin 0.25s ease;
    }

    body.user-home-page.header-scrolled header {
        padding: 10px 0;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
    }

    body.user-home-page.header-scrolled .header-content {
        gap: 8px;
    }

    body.user-home-page.header-scrolled .logo-section {
        max-height: 0;
        opacity: 0;
        transform: translateY(-8px);
        margin: 0;
        pointer-events: none;
    }

    .container {
        padding: 15px;
    }

    body.has-user-global-header .header-content,
    body.user-home-page .header-content {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 10px;
    }

    body.has-user-global-header .header-right,
    body.user-home-page .header-right {
        align-items: flex-end;
        width: auto;
        flex: 1;
        min-width: 0;
        gap: 6px;
    }

    body.has-user-global-header .logo-section,
    body.user-home-page .logo-section {
        flex-direction: row;
        gap: 0;
    }

    .site-title h1 {
        font-size: 24px;
    }

    body.has-user-global-header .user-header-logo,
    body.user-home-page .user-header-logo {
        height: 56px;
    }

    body.has-user-global-header .current-datetime,
    body.user-home-page .current-datetime {
        font-size: 12px;
        text-align: right;
    }

    body.has-user-global-header .user-current-holiday,
    body.user-home-page .user-current-holiday {
        font-size: 12px;
    }

    body.has-user-global-header .user-auth,
    body.user-home-page .user-auth {
        justify-content: flex-end;
        gap: 8px;
        flex-wrap: wrap;
        width: auto;
        max-width: 100%;
    }

    .user-auth.user-auth-compact {
        flex-wrap: wrap;
    }

    .user-auth.user-auth-compact .profile-menu-wrap {
        min-width: 0;
    }

    .user-auth.user-auth-compact .profile-btn {
        max-width: 165px;
    }

    .user-auth.user-auth-compact .profile-btn .profile-btn-label {
        max-width: 110px;
    }

    .profile-menu {
        min-width: 200px;
    }

    .user-auth>* {
        margin-left: 0 !important;
    }

    .user-auth .btn-sm {
        padding: 7px 11px;
        font-size: 13px;
    }

    footer.user-global-footer .container,
    footer.page-footer.user-global-footer .container {
        gap: 8px;
        font-size: 12px;
    }

    .user-auth>div[style*="position: relative"] {
        margin-left: 0 !important;
    }

    .apps-grid {
        grid-template-columns: 1fr;
    }

    .reported-data-cta-btn {
        width: 100%;
        max-width: 320px;
        padding: 12px 16px;
        border-radius: 16px;
    }

    .reported-data-cta-label {
        font-size: 17px;
    }

    .reported-data-cta-subtitle {
        font-size: 10px;
        max-width: 240px;
    }

    .reported-data-modal-content {
        max-width: 100%;
        padding: 20px 18px 18px;
    }

    .reported-data-entry-head,
    .reported-data-modal-actions,
    .reported-data-actions-row {
        flex-direction: column;
        align-items: stretch;
    }

    .reported-data-remove-btn {
        width: 100%;
    }

    .reported-data-grid-2 {
        grid-template-columns: 1fr;
    }

    .section-header h2 {
        font-size: 20px;
    }

    .card {
        padding: 20px;
    }

    .modal-content {
        margin: 2vh 15px;
        padding: 25px 20px;
        max-height: 96vh;
        overflow-y: auto;
    }

    body.prelogin-page header {
        min-height: calc(100vh - 120px);
    }

    body.prelogin-page header .container {
        min-height: calc(100vh - 120px);
        padding: 18px 14px 24px;
    }

    .prelogin-hero-shell {
        gap: 10px;
    }

    .prelogin-topbar {
        flex-direction: column;
        align-items: center;
        text-align: center;
        font-size: 17px;
        gap: 4px;
    }

    .prelogin-topbar-time {
        line-height: 1.2;
    }

    .prelogin-nameday {
        font-size: 16px;
        line-height: 1.3;
    }

    .prelogin-brand-wrap {
        gap: 11px;
        padding: 14px 4px;
    }

    .prelogin-main-logo {
        width: min(220px, 62vw);
    }

    .prelogin-logo-plate {
        padding: 8px 10px;
        border-radius: 14px;
    }

    .prelogin-title {
        font-size: clamp(28px, 7.4vw, 42px);
    }

    .prelogin-subtitle {
        font-size: clamp(17px, 4.2vw, 22px);
        max-width: 96%;
    }

    .prelogin-lead {
        font-size: clamp(15px, 3.5vw, 18px);
        line-height: 1.42;
        max-width: 96%;
    }

    .prelogin-auth-buttons {
        width: 100%;
        gap: 10px;
    }

    .prelogin-auth-buttons .prelogin-btn {
        min-width: min(360px, 100%);
        width: 100%;
        min-height: 52px;
        font-size: clamp(17px, 4.4vw, 22px);
        padding: 12px 18px;
    }

    .prelogin-online-status {
        margin-top: 8px;
        font-size: 14px;
    }

    body.prelogin-page footer {
        padding-top: 0;
        padding-bottom: 16px;
        font-size: 13px;
    }

    body.prelogin-page .modal-content {
        margin: 2vh 10px;
        padding: 20px 14px 18px;
        border-radius: 14px;
    }

    body.prelogin-page #registerForm form>div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    body.prelogin-page #registerForm select#regPhoneCountry {
        flex: 0 0 46% !important;
    }

    body.prelogin-page #registerForm .form-group {
        margin-bottom: 16px;
    }
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Mobilní tlačítko pro scroll na novinky */
.mobile-news-scroll-btn {
    display: none;
    position: fixed;
    bottom: calc(var(--user-footer-height, 78px) + 16px + env(safe-area-inset-bottom, 0px));
    left: 20px;
    right: auto;
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 998;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: calc(100vw - 110px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-news-scroll-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.mobile-news-scroll-btn:active {
    transform: translateY(-1px);
}

/* Styl pro tlačítko načíst starší */
#load-more-btn {
    min-width: 200px;
    transition: all 0.3s ease;
}

#load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Zobrazení mobilního tlačítka jen na mobilech */
@media (max-width: 1024px) {
    .mobile-news-scroll-btn {
        display: block;
    }
}

@media (max-width: 768px) {
    .mobile-news-scroll-btn {
        bottom: calc(var(--user-footer-height, 78px) + 14px + env(safe-area-inset-bottom, 0px));
        left: 16px;
        right: auto;
        padding: 10px 14px;
        font-size: 13px;
        max-width: calc(100vw - 92px);
    }
}

/* Property page */
.property-page {
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    color: #0f172a;
    background: radial-gradient(circle at top, rgba(148, 163, 184, 0.25), transparent 55%),
        linear-gradient(120deg, #f8fafc 0%, #eef2ff 55%, #f1f5f9 100%);
    min-height: 100vh;
}

.property-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px 72px;
    position: relative;
    isolation: isolate;
}

.property-shell::before {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    top: -180px;
    right: -160px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.18), transparent 70%);
    filter: blur(10px);
    z-index: -1;
}

.property-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
    animation: property-fade-up 0.6s ease both;
}

.property-header-text {
    max-width: 640px;
}

.property-subtitle-note {
    margin-top: 12px;
}

.property-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}

.property-title {
    font-size: clamp(28px, 3.2vw, 40px);
    font-weight: 700;
    margin: 8px 0 12px;
}

.property-subtitle {
    font-size: 16px;
    color: #475569;
    margin: 0;
}

.property-back {
    white-space: nowrap;
}

.property-flash {
    padding: 12px 16px;
    border-radius: 14px;
    margin-bottom: 20px;
    font-weight: 600;
}

.property-flash-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.property-empty {
    text-align: left;
    background: #fff;
}

.property-empty h2 {
    margin-bottom: 8px;
}

.property-grid {
    display: grid;
    gap: 24px;
}

.property-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    background: #eef2ff;
    border-radius: 14px;
    font-size: 24px;
}

.property-badge {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #f1f5f9;
    color: #334155;
}

.property-badge-qty {
    background: #e0f2fe;
    color: #075985;
}

.property-badge-warn {
    background: #fee2e2;
    color: #b91c1c;
}

.property-badge-ok {
    background: #dcfce7;
    color: #166534;
}

.property-item {
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(6px);
    animation: property-fade-up 0.6s ease both;
    padding: 0;
}

.property-item:nth-child(2) {
    animation-delay: 0.05s;
}

.property-item:nth-child(3) {
    animation-delay: 0.1s;
}

.property-item:nth-child(4) {
    animation-delay: 0.15s;
}

.property-item summary {
    list-style: none;
}

.property-item summary::-webkit-details-marker {
    display: none;
}

.property-item summary::marker {
    content: "";
}

.property-summary {
    display: flex;
    gap: 18px;
    align-items: center;
    padding: 18px 22px;
    cursor: pointer;
    position: relative;
    min-width: 980px;
    white-space: nowrap;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.property-summary::after {
    content: "▾";
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 18px;
    transition: transform 0.2s ease;
}

.property-item[open] .property-summary::after {
    transform: translateY(-50%) rotate(180deg);
}

.property-summary-main {
    display: flex;
    gap: 14px;
    align-items: center;
    min-width: 260px;
    flex: 0 0 auto;
}

.property-item-name {
    font-size: 18px;
    font-weight: 700;
}

.property-item-code {
    font-size: 13px;
    color: #64748b;
}

.property-summary-cell {
    font-size: 14px;
    color: #334155;
    min-width: 130px;
    flex: 0 0 auto;
}

.property-summary-badges {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: flex-end;
    padding-right: 24px;
    margin-left: auto;
    flex: 0 0 auto;
}

.property-details {
    padding: 0 22px 22px;
    border-top: 1px solid #e2e8f0;
    display: grid;
    gap: 20px;
}

.property-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px 20px;
    color: #475569;
    font-size: 14px;
}

.property-meta strong {
    color: #0f172a;
    font-weight: 600;
}

.property-request-status {
    background: #f8fafc;
    border: 1px dashed #cbd5f5;
    border-radius: 14px;
    padding: 14px;
    display: grid;
    gap: 8px;
    color: #334155;
}

.property-request-line strong {
    color: #0f172a;
}

.property-request-note {
    display: block;
    margin-top: 4px;
    color: #64748b;
}

.property-actions {
    display: grid;
    gap: 16px;
}

.property-form {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    display: grid;
    gap: 10px;
}

.property-label {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.property-textarea {
    width: 100%;
    min-height: 90px;
    border-radius: 12px;
    border: 1px solid #cbd5f5;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
}

.property-textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.property-textarea:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

.property-btn {
    width: 100%;
}

.property-btn-danger {
    background: #ef4444;
}

.property-btn-danger:hover {
    background: #dc2626;
}

.property-btn:disabled,
.property-form button:disabled {
    background: #cbd5f5;
    color: #64748b;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.property-muted {
    font-size: 13px;
    color: #64748b;
}

.property-issue-toggle {
    margin-bottom: 24px;
    padding: 0;
}

.property-issue-toggle summary {
    list-style: none;
}

.property-issue-toggle summary::-webkit-details-marker {
    display: none;
}

.property-issue-summary {
    padding: 16px 20px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    background: #0f172a;
    color: #fff;
    border-radius: 16px;
    text-align: center;
}

.property-issue-body {
    padding: 18px 20px 22px;
}

.property-issue-form {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.property-issue-items {
    display: grid;
    gap: 10px;
}

.property-issue-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 160px 140px;
    gap: 14px;
    align-items: end;
}

.property-issue-field {
    display: grid;
    gap: 6px;
}

.property-issue-label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.property-issue-qty input {
    text-align: center;
}

.property-issue-add {
    justify-self: start;
    margin-top: 4px;
}

.property-issue-remove {
    margin-bottom: 2px;
}

.property-issue-remove:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@keyframes property-fade-up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .property-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .property-summary {
        min-width: 720px;
    }

    .property-summary-badges {
        padding-right: 0;
    }

    .property-summary::after {
        top: 20px;
        transform: none;
    }
}

@media (max-width: 640px) {
    .property-shell {
        padding: 24px 14px 40px;
    }

    .property-shell::before {
        width: 280px;
        height: 280px;
        top: -100px;
        right: -90px;
    }

    .property-header {
        gap: 16px;
        margin-bottom: 20px;
    }

    .property-title {
        margin: 6px 0 10px;
        font-size: 34px;
        line-height: 1.1;
    }

    .property-subtitle {
        font-size: 15px;
        line-height: 1.5;
    }

    .property-back {
        width: 100%;
    }

    .property-issue-toggle {
        margin-bottom: 16px;
    }

    .property-issue-summary {
        border-radius: 14px;
        padding: 14px 16px;
    }

    .property-issue-body {
        padding: 14px 14px 16px;
    }

    .property-empty.card {
        padding: 18px;
        margin-bottom: 14px;
    }

    .property-empty h2 {
        font-size: 20px;
        margin-bottom: 6px;
    }

    .property-grid {
        gap: 14px;
    }

    .property-item {
        overflow: hidden;
    }

    .property-summary {
        min-width: 0;
        white-space: normal;
        flex-wrap: wrap;
        gap: 10px;
        padding: 14px 14px 12px;
        overflow-x: visible;
    }

    .property-summary-main {
        min-width: 0;
        width: 100%;
        padding-right: 26px;
    }

    .property-item-name {
        font-size: 19px;
        line-height: 1.25;
        word-break: break-word;
    }

    .property-item-code {
        word-break: break-word;
    }

    .property-summary-cell {
        width: 100%;
        min-width: 0;
        font-size: 13px;
        color: #475569;
        padding-top: 8px;
        border-top: 1px dashed #e2e8f0;
    }

    .property-summary-badges {
        width: 100%;
        margin-left: 0;
        padding-right: 0;
        justify-content: flex-start;
    }

    .property-summary::after {
        right: 12px;
        top: 16px;
        transform: none;
    }

    .property-item[open] .property-summary::after {
        transform: rotate(180deg);
    }

    .property-details {
        padding: 0 14px 14px;
    }

    .property-issue-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .property-issue-remove,
    .property-issue-add {
        width: 100%;
    }
}

.admin-soft-item-row {
    border: 1px solid #e5e7eb;
    padding: 12px;
}

.admin-row-label {
    margin-top: 6px;
    display: block;
}

.admin-textarea-note {
    min-height: 80px;
}