:root {
    --bg-main: #070b14;
    --bg-secondary: #0b1120;
    --bg-card: rgba(17, 25, 40, 0.66);
    --bg-card-strong: rgba(15, 23, 42, 0.86);

    --border-glass: rgba(255, 255, 255, 0.12);
    --border-glass-strong: rgba(255, 255, 255, 0.20);

    --text-main: #f5f7ff;
    --text-secondary: #a8b3cf;
    --text-muted: #7b86a5;

    --accent: #4f7cff;
    --accent-hover: #6b8eff;
    --accent-soft: rgba(79, 124, 255, 0.18);
    --accent-glow: rgba(79, 124, 255, 0.42);

    --success: #35d07f;
    --success-bg: rgba(53, 208, 127, 0.12);
    --error: #ff5d73;
    --error-bg: rgba(255, 93, 115, 0.12);
    --warning: #f5b942;

    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;

    --shadow-card: 0 24px 80px rgba(0, 0, 0, 0.42);
    --shadow-glow: 0 0 40px rgba(79, 124, 255, 0.24);

    --transition-fast: 0.18s ease;
    --transition-main: 0.28s ease;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: Inter, Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at 16% 12%, rgba(79, 124, 255, 0.28), transparent 32%),
        radial-gradient(circle at 84% 18%, rgba(111, 66, 255, 0.22), transparent 30%),
        radial-gradient(circle at 50% 100%, rgba(35, 211, 255, 0.12), transparent 36%),
        linear-gradient(135deg, #050711 0%, #070b14 42%, #0b1120 100%);
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.026) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.026) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent 85%);
    z-index: -3;
}

body::after {
    content: "";
    position: fixed;
    width: 560px;
    height: 560px;
    right: -220px;
    top: -180px;
    border-radius: 999px;
    background: rgba(79, 124, 255, 0.18);
    filter: blur(90px);
    pointer-events: none;
    animation: floatGlow 12s ease-in-out infinite alternate;
    z-index: -2;
}

a {
    color: var(--text-main);
    text-decoration: none;
    transition: color var(--transition-fast), opacity var(--transition-fast);
}

a:hover {
    color: var(--accent-hover);
}

.page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 16px;
}

.auth-shell {
    width: min(1080px, 100%);
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 28px;
    align-items: stretch;
}

.hero-panel,
.auth-card,
.glass-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-glass);
    background:
        linear-gradient(145deg, rgba(255,255,255,0.10), rgba(255,255,255,0.025)),
        var(--bg-card);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    box-shadow: var(--shadow-card);
    border-radius: var(--radius-lg);
}

.hero-panel::before,
.auth-card::before,
.glass-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(255,255,255,0.18), transparent 28%),
        radial-gradient(circle at 24% 18%, rgba(79, 124, 255, 0.20), transparent 34%),
        radial-gradient(circle at 90% 100%, rgba(106, 168, 255, 0.12), transparent 35%);
    pointer-events: none;
}

.hero-panel::after,
.auth-card::after,
.glass-card::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    right: -70px;
    bottom: -70px;
    border-radius: 999px;
    background: var(--accent-soft);
    filter: blur(32px);
    pointer-events: none;
}

.hero-panel {
    padding: 42px;
    min-height: 620px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-card {
    padding: 32px;
}

.content-layer {
    position: relative;
    z-index: 1;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 8px 12px;
    border: 1px solid var(--border-glass);
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--success);
    box-shadow: 0 0 18px rgba(53, 208, 127, 0.8);
}

h1,
h2,
h3 {
    margin: 0;
    letter-spacing: -0.045em;
}

h1 {
    font-size: clamp(42px, 7vw, 84px);
    line-height: 0.96;
}

h2 {
    font-size: clamp(32px, 5vw, 46px);
    line-height: 1.05;
}

p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.7;
}

.hero-title {
    margin-top: 28px;
    max-width: 720px;
}

.hero-text {
    max-width: 620px;
    margin-top: 22px;
    font-size: 17px;
}

.auth-title {
    margin-bottom: 10px;
}

.auth-subtitle {
    margin-bottom: 26px;
    font-size: 15px;
}

.form {
    display: grid;
    gap: 16px;
}

.form-group {
    display: grid;
    gap: 8px;
}

label {
    color: var(--text-secondary);
    font-size: 14px;
}

.input,
select,
input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,0.11);
    border-radius: var(--radius-md);
    background: rgba(8, 13, 26, 0.72);
    color: var(--text-main);
    outline: none;
    font: inherit;
    transition:
        border-color var(--transition-main),
        box-shadow var(--transition-main),
        background var(--transition-main),
        transform var(--transition-fast);
}

.input::placeholder,
input::placeholder {
    color: rgba(168, 179, 207, 0.62);
}

.input:focus,
select:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    border-color: rgba(106, 168, 255, 0.72);
    background: rgba(10, 18, 35, 0.88);
    box-shadow:
        0 0 0 4px rgba(79, 124, 255, 0.16),
        0 0 24px rgba(79, 124, 255, 0.18);
}

select {
    appearance: none;
}

.checkbox-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
    flex: 0 0 auto;
    margin-top: 1px;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

button,
.btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border: 0;
    border-radius: var(--radius-md);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-main),
        background var(--transition-main),
        border-color var(--transition-main),
        opacity var(--transition-fast);
}

.btn-primary,
button[type="submit"] {
    background: linear-gradient(135deg, var(--accent), #6a8cff);
    box-shadow:
        0 12px 34px rgba(79, 124, 255, 0.34),
        inset 0 1px 0 rgba(255,255,255,0.22);
}

.btn-primary:hover,
button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow:
        0 18px 44px rgba(79, 124, 255, 0.46),
        inset 0 1px 0 rgba(255,255,255,0.28);
}

.btn-secondary {
    border: 1px solid var(--border-glass);
    background: rgba(255,255,255,0.07);
    color: var(--text-main);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    border-color: var(--border-glass-strong);
    background: rgba(255,255,255,0.10);
}

.alert {
    position: relative;
    z-index: 1;
    padding: 14px 16px;
    margin-bottom: 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    animation: alertIn 0.36s ease both;
}

.alert ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.alert-error {
    color: #ffd7dd;
    background: var(--error-bg);
    border-color: rgba(255, 93, 115, 0.35);
}

.alert-success {
    color: #cbffdf;
    background: var(--success-bg);
    border-color: rgba(53, 208, 127, 0.32);
}

.auth-links {
    margin-top: 20px;
    display: grid;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 15px;
}

.auth-links a {
    color: var(--accent-hover);
}

.feature-grid {
    margin-top: 34px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.mini-card {
    padding: 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    background: rgba(255,255,255,0.055);
    transition:
        transform var(--transition-main),
        background var(--transition-main),
        border-color var(--transition-main),
        box-shadow var(--transition-main);
}

.mini-card:hover {
    transform: translateY(-6px);
    background: rgba(255,255,255,0.085);
    border-color: rgba(106, 168, 255, 0.34);
    box-shadow: 0 16px 50px rgba(0,0,0,0.24);
}

.mini-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.mini-card p {
    font-size: 13px;
    line-height: 1.55;
}

.reveal {
    opacity: 0;
    transform: translateY(26px) scale(0.98);
    filter: blur(8px);
    transition:
        opacity 0.75s ease,
        transform 0.75s ease,
        filter 0.75s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

.reveal-delay-1 {
    transition-delay: 0.08s;
}

.reveal-delay-2 {
    transition-delay: 0.16s;
}

.reveal-delay-3 {
    transition-delay: 0.24s;
}

.float-card {
    animation: floatCard 5.5s ease-in-out infinite;
}

.glow-orb {
    position: fixed;
    width: 360px;
    height: 360px;
    border-radius: 999px;
    background: rgba(79, 124, 255, 0.14);
    filter: blur(80px);
    pointer-events: none;
    z-index: -1;
}

.glow-orb.one {
    left: -140px;
    bottom: 8%;
    animation: orbMoveOne 14s ease-in-out infinite alternate;
}

.glow-orb.two {
    right: 10%;
    top: 18%;
    background: rgba(132, 92, 255, 0.12);
    animation: orbMoveTwo 16s ease-in-out infinite alternate;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #050711;
}

::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.16);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(106, 168, 255, 0.44);
}

@keyframes floatGlow {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }
    to {
        transform: translate3d(-80px, 90px, 0) scale(1.15);
    }
}

@keyframes floatCard {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes alertIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes orbMoveOne {
    from {
        transform: translate(0, 0);
    }
    to {
        transform: translate(90px, -60px);
    }
}

@keyframes orbMoveTwo {
    from {
        transform: translate(0, 0);
    }
    to {
        transform: translate(-120px, 80px);
    }
}

@media (max-width: 900px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        min-height: auto;
        padding: 28px;
    }

    .auth-card {
        padding: 24px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .auth-page {
        padding: 18px 12px;
        place-items: start center;
    }

    .hero-panel {
        padding: 22px;
        border-radius: 20px;
    }

    .auth-card {
        padding: 20px;
        border-radius: 20px;
    }

    h1 {
        font-size: 42px;
    }

    h2 {
        font-size: 32px;
    }

    .btn,
    button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

/* =========================
   Dashboard layout
========================= */

.dashboard-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 10%, rgba(79, 124, 255, 0.22), transparent 32%),
        radial-gradient(circle at 90% 0%, rgba(92, 225, 230, 0.12), transparent 30%),
        linear-gradient(135deg, #070b14 0%, #0b1120 48%, #070b14 100%);
    color: var(--text-main);
    position: relative;
    overflow-x: hidden;
}

.dashboard-main {
    width: 100%;
    min-height: 100vh;
    padding: 22px;
}

.dashboard-topbar {
    position: sticky;
    top: 16px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    margin-bottom: 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    background: rgba(13, 20, 34, 0.72);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.28);
}

.menu-button,
.sidebar-close {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border-radius: 14px;
    cursor: pointer;
    transition: 0.25s ease;
}

.menu-button {
    width: 46px;
    height: 46px;
    font-size: 22px;
}

.sidebar-close {
    width: 38px;
    height: 38px;
    font-size: 26px;
    line-height: 1;
}

.menu-button:hover,
.sidebar-close:hover {
    background: rgba(79, 124, 255, 0.18);
    border-color: rgba(79, 124, 255, 0.55);
    transform: translateY(-1px);
}

.topbar-user {
    flex: 1;
    min-width: 0;
}

.topbar-title {
    font-size: 18px;
    font-weight: 700;
}

.topbar-subtitle {
    margin-top: 3px;
    color: var(--text-secondary);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-create-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 14px;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    background: linear-gradient(135deg, #4f7cff, #6a8dff);
    box-shadow: 0 16px 38px rgba(79, 124, 255, 0.32);
}

/* =========================
   Sidebar
========================= */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    width: 310px;
    max-width: 86vw;
    height: 100vh;
    padding: 22px;
    background:
        radial-gradient(circle at 20% 0%, rgba(79, 124, 255, 0.22), transparent 38%),
        rgba(10, 16, 30, 0.94);
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(26px);
    -webkit-backdrop-filter: blur(26px);
    box-shadow: 30px 0 90px rgba(0, 0, 0, 0.45);
    transform: translateX(-105%);
    transition: transform 0.32s ease;
}

.sidebar.is-open {
    transform: translateX(0);
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: 0.28s ease;
}

.sidebar-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

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

.sidebar-header h2 {
    margin: 10px 0 0;
    font-size: 30px;
}

.sidebar-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 13px;
}

.sidebar-nav {
    display: grid;
    gap: 10px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 15px;
    border-radius: 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.035);
    transition: 0.25s ease;
}

.sidebar-link span {
    width: 24px;
    text-align: center;
    font-size: 18px;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: #fff;
    background: rgba(79, 124, 255, 0.16);
    border-color: rgba(79, 124, 255, 0.36);
    transform: translateX(3px);
}

.sidebar-link.danger {
    margin-top: 12px;
    color: #ffb4b4;
}

.sidebar-link.danger:hover {
    background: rgba(255, 80, 80, 0.12);
    border-color: rgba(255, 80, 80, 0.28);
}

/* =========================
   Dashboard content
========================= */

.dashboard-welcome,
.reports-panel {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(17, 25, 40, 0.62);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-radius: 28px;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
}

.dashboard-welcome {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 18px;
    padding: 28px;
    margin-bottom: 18px;
}

.dashboard-welcome h1 {
    margin: 16px 0 10px;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1;
}

.dashboard-welcome p {
    max-width: 720px;
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}

.dashboard-clock {
    min-width: 220px;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard-clock span,
.stat-card span,
.info-label {
    color: var(--text-secondary);
    font-size: 13px;
}

.dashboard-clock strong {
    font-size: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.stat-card {
    padding: 20px;
    min-height: 132px;
    border-radius: 24px;
    background: rgba(17, 25, 40, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.11);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.stat-card strong {
    display: block;
    margin: 10px 0 8px;
    font-size: 38px;
    line-height: 1;
}

.stat-card small {
    color: var(--text-secondary);
    line-height: 1.4;
}

.reports-panel {
    padding: 22px;
}

.reports-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.reports-panel-header h2 {
    margin: 0 0 6px;
    font-size: 26px;
}

.reports-panel-header p {
    margin: 0;
    color: var(--text-secondary);
}

.reports-filters {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.filter-field {
    display: grid;
    gap: 8px;
}

.filter-field label {
    color: var(--text-secondary);
    font-size: 13px;
}

.filter-field input,
.filter-field select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    outline: none;
}

.filter-field input:focus,
.filter-field select:focus {
    border-color: rgba(79, 124, 255, 0.6);
    box-shadow: 0 0 0 4px rgba(79, 124, 255, 0.12);
}

.filter-field select option {
    color: #111827;
}

.reports-list {
    display: grid;
    gap: 10px;
    max-height: 430px;
    overflow-y: auto;
    padding-right: 4px;
}

.report-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.report-row.ghost {
    opacity: 0.72;
}

.report-title {
    font-weight: 700;
    margin-bottom: 5px;
}

.report-meta {
    color: var(--text-secondary);
    font-size: 13px;
}

.report-status {
    white-space: nowrap;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.report-status.muted {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.055);
}

.report-status.pending {
    color: #c9d8ff;
    background: rgba(79, 124, 255, 0.16);
    border-color: rgba(79, 124, 255, 0.32);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 16px;
}

.pagination button {
    min-width: 42px;
    min-height: 38px;
    padding: 0 13px;
    border-radius: 12px;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.11);
    background: rgba(255, 255, 255, 0.055);
}

.pagination button.active {
    color: #fff;
    background: rgba(79, 124, 255, 0.35);
    border-color: rgba(79, 124, 255, 0.6);
}

.pagination button:disabled {
    opacity: 0.45;
}

/* =========================
   Dashboard responsive
========================= */

@media (max-width: 980px) {
    .stats-grid,
    .reports-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-welcome {
        flex-direction: column;
    }

    .dashboard-clock {
        min-width: 0;
    }
}

@media (max-width: 640px) {
    .dashboard-main {
        padding: 12px;
    }

    .dashboard-topbar {
        top: 8px;
        border-radius: 18px;
        padding: 12px;
    }

    .topbar-create-btn {
        display: none;
    }

    .dashboard-welcome,
    .reports-panel {
        border-radius: 22px;
        padding: 18px;
    }

    .stats-grid,
    .reports-filters {
        grid-template-columns: 1fr;
    }

    .report-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .pagination {
        justify-content: flex-start;
    }
}


/* =========================
   Dashboard clean fixes
========================= */

.topbar-subtitle {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.clean-header {
    align-items: flex-start;
}

.create-report-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    min-width: 150px;
    text-align: center;
}

.filter-toggle {
    width: 100%;
    margin: 18px 0 16px;
    min-height: 48px;
    border-radius: 16px;
    border: 1px solid rgba(79, 124, 255, 0.34);
    background: rgba(79, 124, 255, 0.12);
    color: var(--text-main);
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    transition: 0.25s ease;
}

.filter-toggle:hover {
    background: rgba(79, 124, 255, 0.2);
    transform: translateY(-1px);
}

.reports-filters.filters-collapsed {
    display: none;
}

.reports-filters.filters-collapsed.is-open {
    display: grid;
}

.empty-state {
    margin-top: 14px;
    padding: 24px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.empty-state h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

.empty-state p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.reports-panel .pagination {
    display: flex;
}

@media (max-width: 640px) {
    .reports-panel-header {
        align-items: stretch;
    }

    .create-report-btn {
        width: 100%;
        min-height: 48px;
    }

    .reports-panel-header h2 {
        font-size: 34px;
        line-height: 1.05;
    }

    .reports-panel-header p {
        font-size: 16px;
        line-height: 1.45;
    }
}


/* Period filter fix for iPhone */
.period-grid {
    display: grid;
    grid-template-columns: 1fr 0.8fr;
    gap: 10px;
}

.period-grid select {
    min-width: 0;
}

@media (max-width: 640px) {
    .period-grid {
        grid-template-columns: 1fr;
    }
}


/* Period day/month/year filter */
.period-grid-three {
    grid-template-columns: 0.75fr 1.25fr 0.9fr;
}

@media (max-width: 640px) {
    .period-grid-three {
        grid-template-columns: 1fr;
    }
}


/* Filter action buttons */
.filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: end;
}

.filter-apply-btn,
.filter-reset-btn {
    min-height: 48px;
    border-radius: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.25s ease;
}

.filter-apply-btn {
    border: 1px solid rgba(79, 124, 255, 0.55);
    background: linear-gradient(135deg, #4f7cff, #6a8dff);
    color: #ffffff;
    box-shadow: 0 14px 34px rgba(79, 124, 255, 0.25);
}

.filter-reset-btn {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.055);
    color: var(--text-secondary);
}

.filter-apply-btn:hover,
.filter-reset-btn:hover {
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .filter-actions {
        grid-template-columns: 1fr;
    }
}


/* =========================
   Profile page
========================= */

.profile-panel {
    max-width: 980px;
    margin: 0 auto;
    padding: 28px;
    border-radius: 28px;
    background: rgba(17, 25, 40, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.profile-panel h1 {
    margin: 16px 0 10px;
    font-size: clamp(38px, 7vw, 64px);
    line-height: 1;
}

.profile-subtitle {
    margin: 0 0 22px;
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
}

.profile-form {
    margin-top: 22px;
    padding: 20px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.password-form {
    margin-top: 18px;
}

.form-section-title {
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 800;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.profile-grid .input-group input,
.profile-grid .input-group select {
    width: 100%;
    min-height: 52px;
    padding: 0 15px;
    border-radius: 16px;
    color: var(--text-main);
    background: rgba(7, 11, 20, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.12);
    outline: none;
}

.profile-grid .input-group input:focus,
.profile-grid .input-group select:focus {
    border-color: rgba(79, 124, 255, 0.6);
    box-shadow: 0 0 0 4px rgba(79, 124, 255, 0.12);
}

.profile-grid .input-group input:disabled {
    opacity: 0.72;
    cursor: not-allowed;
}

.profile-grid .input-group select option {
    color: #111827;
}

.profile-submit {
    width: 100%;
    margin-top: 16px;
    min-height: 52px;
}

@media (max-width: 700px) {
    .profile-panel {
        padding: 18px;
        border-radius: 24px;
    }

    .profile-form {
        padding: 16px;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }
}


/* Profile top notifications */
.profile-toast {
    position: sticky;
    top: 92px;
    z-index: 30;
    margin: 18px 0;
    padding: 16px 18px;
    border-radius: 18px;
    font-weight: 800;
    line-height: 1.45;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    animation: toastSlideIn 0.35s ease both;
}

.success-toast {
    color: #d8ffe9;
    background: rgba(39, 174, 96, 0.20);
    border: 1px solid rgba(39, 174, 96, 0.42);
    box-shadow: 0 18px 50px rgba(39, 174, 96, 0.18);
}

.error-toast {
    color: #ffd7d7;
    background: rgba(255, 80, 80, 0.18);
    border: 1px solid rgba(255, 80, 80, 0.38);
    box-shadow: 0 18px 50px rgba(255, 80, 80, 0.14);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .profile-toast {
        top: 82px;
        border-radius: 16px;
        padding: 14px 16px;
    }
}


/* =========================
   Employees page fixed
========================= */

.employees-panel,
.employee-detail-panel {
    max-width: 1120px;
    margin: 0 auto;
    padding: 28px;
    border-radius: 28px;
    background: rgba(17, 25, 40, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.employees-panel h1,
.employee-detail-panel h1 {
    margin: 16px 0 10px;
    font-size: clamp(38px, 7vw, 64px);
    line-height: 1;
}

.employees-subtitle {
    margin: 0 0 22px;
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
}

.employees-search {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 16px;
    padding: 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.filter-reset-link {
    min-height: 48px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    text-decoration: none;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-weight: 800;
}

.employees-count {
    margin: 12px 0 18px;
    color: var(--text-secondary);
}

.employees-count strong {
    color: var(--text-main);
}

.employees-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.employee-card-link {
    text-decoration: none;
    color: var(--text-main);
    padding: 18px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.09);
    transition: 0.25s ease;
}

.employee-card-link:hover {
    transform: translateY(-2px);
    background: rgba(79, 124, 255, 0.10);
    border-color: rgba(79, 124, 255, 0.34);
}

.employee-avatar {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 24px;
    color: #fff;
    background: linear-gradient(135deg, #4f7cff, #6a8dff);
    box-shadow: 0 16px 40px rgba(79, 124, 255, 0.28);
}

.employee-name {
    font-size: 20px;
    font-weight: 900;
    margin-bottom: 5px;
}

.employee-meta,
.employee-position {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.4;
}

.employee-open {
    color: var(--text-secondary);
    font-size: 13px;
    white-space: nowrap;
}

.back-link {
    display: inline-flex;
    margin-bottom: 18px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 800;
}

.employee-profile-head {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
}

.employee-avatar-large {
    width: 86px;
    height: 86px;
    border-radius: 28px;
    font-size: 36px;
}

.employee-profile-head p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 16px;
}

.employee-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 20px 0;
}

.employee-profile-item {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.employee-profile-item span {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 13px;
}

.employee-profile-item strong {
    word-break: break-word;
    font-size: 18px;
}

.employee-detail-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 22px;
}

.employee-detail-actions button,
.employee-detail-actions a {
    min-height: 52px;
    border-radius: 16px;
    border: 1px solid rgba(79, 124, 255, 0.42);
    background: rgba(79, 124, 255, 0.14);
    color: var(--text-main);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    cursor: pointer;
}

.employee-reports-block {
    padding: 22px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.copy-phone-btn.is-copied {
    background: rgba(39, 174, 96, 0.22);
    border-color: rgba(39, 174, 96, 0.44);
    color: #d8ffe9;
}

@media (max-width: 820px) {
    .employees-grid {
        grid-template-columns: 1fr;
    }

    .employees-search {
        grid-template-columns: 1fr;
    }

    .employee-card-link {
        grid-template-columns: auto 1fr;
    }

    .employee-open {
        grid-column: 1 / -1;
    }

    .employee-profile-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .employee-profile-grid,
    .employee-detail-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .employees-panel,
    .employee-detail-panel {
        padding: 18px;
        border-radius: 24px;
    }
}


/* Employee reports filters */
.employee-detail-actions {
    grid-template-columns: 1fr;
}

.employee-detail-actions .copy-phone-btn {
    width: 100%;
}

.employee-reports-header {
    margin-bottom: 14px;
}

.employee-reports-filters {
    margin: 0 0 16px;
}

.employee-reports-filters.filters-collapsed {
    display: none;
}

.employee-reports-filters.filters-collapsed.is-open {
    display: grid;
    grid-template-columns: 2fr 0.8fr 1fr 0.8fr 1fr;
    gap: 12px;
}

.employee-filter-actions {
    grid-column: 1 / -1;
}

@media (max-width: 900px) {
    .employee-reports-filters.filters-collapsed.is-open {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .employee-reports-filters.filters-collapsed.is-open {
        grid-template-columns: 1fr;
    }
}


/* Employee card without open label */
.employee-card-link {
    grid-template-columns: auto 1fr;
}

.employee-card-link .employee-main {
    min-width: 0;
}


/* =========================
   My reports page
========================= */

.my-reports-panel {
    max-width: 1120px;
    margin: 0 auto;
    padding: 28px;
    border-radius: 28px;
    background: rgba(17, 25, 40, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.my-reports-panel h1 {
    margin: 16px 0 10px;
    font-size: clamp(38px, 7vw, 64px);
    line-height: 1;
}

.my-reports-subtitle {
    margin: 0 0 22px;
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
}

.my-reports-top {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
    margin-bottom: 18px;
}

.my-reports-stat {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.my-reports-stat span {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.my-reports-stat strong {
    font-size: 38px;
    line-height: 1;
}

.my-reports-create {
    min-height: 54px;
    min-width: 170px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.my-reports-filters {
    margin: 0 0 16px;
}

.my-reports-filters.filters-collapsed {
    display: none;
}

.my-reports-filters.filters-collapsed.is-open {
    display: grid;
    grid-template-columns: 2fr 0.8fr 1fr 0.8fr 1fr;
    gap: 12px;
}

.my-reports-filter-actions {
    grid-column: 1 / -1;
}

.my-reports-list {
    margin-top: 14px;
}

@media (max-width: 900px) {
    .my-reports-filters.filters-collapsed.is-open {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .my-reports-top {
        grid-template-columns: 1fr;
    }

    .my-reports-create {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .my-reports-panel {
        padding: 18px;
        border-radius: 24px;
    }

    .my-reports-filters.filters-collapsed.is-open {
        grid-template-columns: 1fr;
    }
}


/* My reports without create button */
.my-reports-top {
    grid-template-columns: 1fr;
}


/* Create report + draft autosave */
.create-report-panel {
    max-width: 980px;
    margin: 0 auto;
    padding: 28px;
    border-radius: 28px;
    background: rgba(17, 25, 40, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.create-report-panel h1 {
    margin: 16px 0 10px;
    font-size: clamp(38px, 7vw, 64px);
    line-height: 1;
}

.create-report-subtitle {
    margin: 0 0 22px;
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
}

.draft-status {
    margin: 16px 0 20px;
    padding: 14px 16px;
    border-radius: 18px;
    color: #c9d8ff;
    background: rgba(79, 124, 255, 0.12);
    border: 1px solid rgba(79, 124, 255, 0.28);
    font-weight: 800;
    line-height: 1.45;
}

.create-report-form {
    display: grid;
    gap: 16px;
}

.report-current-time {
    display: grid;
    gap: 8px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.report-current-time span {
    color: var(--text-secondary);
}

.report-current-time strong {
    font-size: 24px;
}

.create-report-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.create-report-form .input-group {
    display: grid;
    gap: 8px;
}

.create-report-form .input-group label {
    color: var(--text-secondary);
    font-size: 14px;
}

.create-report-form .input-group input,
.create-report-form .input-group textarea {
    width: 100%;
    padding: 0 15px;
    border-radius: 16px;
    color: var(--text-main);
    background: rgba(7, 11, 20, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.12);
    outline: none;
}

.create-report-form .input-group input {
    min-height: 52px;
}

.create-report-form .input-group textarea {
    padding-top: 14px;
    padding-bottom: 14px;
    resize: vertical;
    min-height: 130px;
}

.create-report-form .input-group input:focus,
.create-report-form .input-group textarea:focus {
    border-color: rgba(79, 124, 255, 0.6);
    box-shadow: 0 0 0 4px rgba(79, 124, 255, 0.12);
}

.create-report-form .input-group small {
    color: var(--text-secondary);
    font-size: 12px;
}

.no-remarks-check {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: var(--text-main);
    font-weight: 800;
}

.no-remarks-check input {
    width: 22px;
    height: 22px;
    accent-color: #4f7cff;
}

.create-report-submit {
    width: 100%;
    min-height: 56px;
    font-size: 16px;
}

@media (max-width: 820px) {
    .create-report-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .create-report-panel {
        padding: 18px;
        border-radius: 24px;
    }
}


/* Create report final */
.create-report-panel {
    max-width: 980px;
    margin: 0 auto;
    padding: 28px;
    border-radius: 28px;
    background: rgba(17, 25, 40, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.create-report-panel h1 {
    margin: 16px 0 10px;
    font-size: clamp(38px, 7vw, 64px);
    line-height: 1;
}

.create-report-subtitle {
    margin: 0 0 22px;
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
}

.draft-status {
    margin: 16px 0 20px;
    padding: 14px 16px;
    border-radius: 18px;
    color: #c9d8ff;
    background: rgba(79, 124, 255, 0.12);
    border: 1px solid rgba(79, 124, 255, 0.28);
    font-weight: 800;
    line-height: 1.45;
}

.create-report-form {
    display: grid;
    gap: 16px;
}

.report-current-time {
    display: grid;
    gap: 8px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.report-current-time span {
    color: var(--text-secondary);
}

.report-current-time strong {
    font-size: 24px;
}

.create-report-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.create-report-form .input-group {
    display: grid;
    gap: 8px;
}

.create-report-form .input-group label {
    color: var(--text-secondary);
    font-size: 14px;
}

.create-report-form .input-group input,
.create-report-form .input-group textarea {
    width: 100%;
    padding: 0 15px;
    border-radius: 16px;
    color: var(--text-main);
    background: rgba(7, 11, 20, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.12);
    outline: none;
}

.create-report-form .input-group input {
    min-height: 52px;
}

.create-report-form .input-group textarea {
    padding-top: 14px;
    padding-bottom: 14px;
    resize: vertical;
    min-height: 130px;
}

.create-report-form .input-group input:focus,
.create-report-form .input-group textarea:focus {
    border-color: rgba(79, 124, 255, 0.6);
    box-shadow: 0 0 0 4px rgba(79, 124, 255, 0.12);
}

.create-report-form .input-group small {
    color: var(--text-secondary);
    font-size: 12px;
}

.no-remarks-check {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: var(--text-main);
    font-weight: 800;
}

.no-remarks-check input {
    width: 22px;
    height: 22px;
    accent-color: #4f7cff;
}

.create-report-submit {
    width: 100%;
    min-height: 56px;
    font-size: 16px;
}

@media (max-width: 820px) {
    .create-report-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .create-report-panel {
        padding: 18px;
        border-radius: 24px;
    }
}


/* Report form input alignment fix */
.create-report-form .input-group input,
.create-report-form .input-group textarea {
    font-size: 16px;
    line-height: 1.45;
    box-sizing: border-box;
}

.create-report-form .input-group input {
    height: 58px;
    padding: 0 18px;
    display: flex;
    align-items: center;
}

.create-report-form .input-group input::placeholder,
.create-report-form .input-group textarea::placeholder {
    color: rgba(168, 179, 207, 0.72);
    opacity: 1;
}

.create-report-form .input-group textarea {
    min-height: 150px;
    padding: 18px;
    line-height: 1.55;
}

.create-report-form .input-group small {
    margin-top: 2px;
    padding-left: 2px;
    line-height: 1.35;
}

.no-remarks-check {
    min-height: 74px;
    box-sizing: border-box;
}

.no-remarks-check span {
    line-height: 1.35;
}


/* Report form typography cleanup */
.create-report-form .input-group label {
    font-size: 15px;
    line-height: 1.3;
    margin-bottom: 2px;
}

.create-report-form .input-group input,
.create-report-form .input-group textarea {
    font-size: 17px;
    line-height: 1.45;
}

.create-report-form .input-group input::placeholder {
    font-size: 15px;
    color: rgba(168, 179, 207, 0.58);
}

.create-report-form .input-group textarea::placeholder {
    font-size: 15px;
    line-height: 1.45;
    color: rgba(168, 179, 207, 0.58);
}

.create-report-form .input-group textarea {
    min-height: 165px;
    padding: 18px;
}

.create-report-form .input-group small {
    font-size: 13px;
    color: rgba(168, 179, 207, 0.78);
    margin-top: 1px;
}

.no-remarks-check span {
    font-size: 17px;
}

@media (max-width: 640px) {
    .create-report-form .input-group input,
    .create-report-form .input-group textarea {
        font-size: 16px;
    }

    .create-report-form .input-group input::placeholder,
    .create-report-form .input-group textarea::placeholder {
        font-size: 14px;
    }

    .no-remarks-check span {
        font-size: 16px;
    }
}


/* Zero cut report hint */
.zero-cut-hint {
    padding: 14px 16px;
    border-radius: 18px;
    color: #c9d8ff;
    background: rgba(79, 124, 255, 0.10);
    border: 1px solid rgba(79, 124, 255, 0.24);
    font-weight: 700;
    line-height: 1.45;
}
