@charset "UTF-8";

:root {
    --bg: #050811;
    --bg-soft: #090e1c;
    --surface: rgba(13, 19, 37, .76);
    --surface-solid: #0d1325;
    --surface-high: #121a30;
    --line: rgba(151, 176, 226, .14);
    --line-strong: rgba(78, 218, 255, .28);
    --text: #f4f7ff;
    --muted: #8995ad;
    --muted-bright: #b7c1d5;
    --cyan: #35d8ff;
    --cyan-soft: rgba(53, 216, 255, .14);
    --violet: #8468ff;
    --violet-soft: rgba(132, 104, 255, .15);
    --green: #45e6a7;
    --orange: #ffab54;
    --red: #ff607d;
    --shadow: 0 24px 70px rgba(0, 0, 0, .42);
    --radius: 22px;
    --radius-small: 13px;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--text);
    background:
        linear-gradient(rgba(48, 74, 129, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(48, 74, 129, .045) 1px, transparent 1px),
        radial-gradient(circle at 72% -10%, rgba(65, 83, 223, .18), transparent 35%),
        var(--bg);
    background-size: 52px 52px, 52px 52px, auto, auto;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background: linear-gradient(115deg, rgba(5, 8, 17, .15), rgba(5, 8, 17, .82) 58%, rgba(5, 8, 17, .4));
    pointer-events: none;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
::selection { color: #021017; background: var(--cyan); }

.noise {
    position: fixed;
    inset: 0;
    z-index: 50;
    pointer-events: none;
    opacity: .025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.ambient {
    position: fixed;
    z-index: -1;
    width: 34rem;
    height: 34rem;
    border-radius: 50%;
    filter: blur(110px);
    opacity: .12;
    pointer-events: none;
}
.ambient-one { top: 15%; left: -20rem; background: var(--cyan); }
.ambient-two { right: -20rem; bottom: 5%; background: var(--violet); }
.cursor-glow {
    position: fixed;
    z-index: -1;
    width: 480px;
    height: 480px;
    left: var(--mouse-x, 60%);
    top: var(--mouse-y, 20%);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(45, 196, 255, .075), transparent 67%);
    pointer-events: none;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    height: 82px;
    display: grid;
    grid-template-columns: minmax(230px, 1fr) auto minmax(230px, 1fr);
    align-items: center;
    gap: 28px;
    padding: 0 max(28px, calc((100vw - 1460px) / 2));
    border-bottom: 1px solid var(--line);
    background: rgba(5, 8, 17, .74);
    backdrop-filter: blur(22px) saturate(145%);
}

.brand { display: inline-flex; align-items: center; gap: 13px; width: max-content; }
.brand-mark {
    position: relative;
    display: grid;
    place-items: center;
    width: 39px;
    height: 39px;
    transform: rotate(30deg);
}
.brand-mark::before,
.brand-mark::after,
.brand-mark i {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    border: 1px solid var(--cyan);
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(53, 216, 255, .12);
}
.brand-mark::after { transform: scale(.68); border-color: var(--violet); }
.brand-mark i:nth-child(1) { width: 5px; height: 5px; border: 0; background: white; box-shadow: 0 0 14px var(--cyan); }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(3) { display: none; }
.brand-copy { display: flex; flex-direction: column; line-height: 1; }
.brand-copy strong { font-size: 15px; letter-spacing: .16em; }
.brand-copy em { color: var(--cyan); font-style: normal; }
.brand-copy small { margin-top: 7px; color: var(--muted); font-size: 9px; letter-spacing: .11em; text-transform: uppercase; }

.main-nav { display: flex; align-items: stretch; align-self: stretch; gap: 6px; }
.mobile-nav { display: none; }
.nav-link {
    position: relative;
    display: grid;
    place-items: center;
    padding: 0 19px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    transition: color .2s ease;
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link.active::after {
    content: "";
    position: absolute;
    right: 17px;
    bottom: -1px;
    left: 17px;
    height: 2px;
    border-radius: 5px 5px 0 0;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    box-shadow: 0 0 18px var(--cyan);
}

.session-actions { display: flex; align-items: center; justify-content: flex-end; gap: 11px; }
.mode-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 11px;
    color: var(--muted-bright);
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255,255,255,.025);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.mode-pill span { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 12px var(--orange); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 5px 10px 5px 5px; border: 1px solid transparent; border-radius: 12px; transition: .2s; }
.user-chip:hover { border-color: var(--line); background: rgba(255,255,255,.025); }
.user-chip > span:last-child { display: flex; flex-direction: column; gap: 3px; }
.user-chip strong { font-size: 12px; }
.user-chip small { color: var(--muted); font-size: 9px; }
.avatar {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(53,216,255,.3);
    border-radius: 10px;
    color: var(--cyan);
    background: linear-gradient(145deg, rgba(53,216,255,.12), rgba(132,104,255,.08));
    box-shadow: inset 0 0 14px rgba(53,216,255,.04);
    font-weight: 800;
}
.avatar-large { width: 58px; height: 58px; font-size: 22px; border-radius: 16px; }
.inline-form { display: inline; }
.icon-button {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--muted);
    background: transparent;
    transition: .2s;
}
.icon-button:hover { color: var(--text); border-color: var(--line-strong); background: var(--cyan-soft); }

.site-shell { width: min(1460px, calc(100% - 56px)); margin: 0 auto; }
.dashboard-hero {
    position: relative;
    min-height: 385px;
    display: flex;
    align-items: center;
    padding: 74px 4%;
    overflow: hidden;
}
.dashboard-hero::after {
    content: "POFI // TRACK // 01";
    position: absolute;
    right: 0;
    bottom: 30px;
    color: rgba(142,165,206,.22);
    font: 9px/1 ui-monospace, monospace;
    letter-spacing: .25em;
    writing-mode: vertical-rl;
}
.hero-copy { position: relative; z-index: 2; width: min(700px, 60%); }
.eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    color: var(--cyan);
    font: 600 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: .2em;
    text-transform: uppercase;
}
.eyebrow span { width: 24px; height: 1px; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
h1, h2, h3, p { margin-top: 0; }
.hero-copy h1,
.auth-visual h1,
.form-intro h1,
.account-layout h1,
.admin-hero h1 {
    margin-bottom: 22px;
    font-size: clamp(44px, 5.1vw, 76px);
    line-height: .98;
    letter-spacing: -.055em;
}
.hero-copy h1 em,
.auth-visual h1 em,
.form-intro h1 em,
.account-layout h1 em,
.admin-hero h1 em {
    color: transparent;
    background: linear-gradient(100deg, var(--cyan), #9b82ff 62%, #cf74ff);
    -webkit-background-clip: text;
    background-clip: text;
    font-style: normal;
}
.hero-copy > p:last-child, .auth-visual > p, .form-intro > p {
    max-width: 610px;
    margin: 0;
    color: var(--muted-bright);
    font-size: 15px;
    line-height: 1.8;
}

.hero-orbit {
    position: absolute;
    top: 48%;
    right: 7%;
    width: 310px;
    height: 310px;
    transform: translateY(-50%) perspective(600px) rotateX(61deg) rotateZ(-15deg);
    transform-style: preserve-3d;
}
.orbit-ring { position: absolute; inset: 0; border: 1px solid rgba(53,216,255,.24); border-radius: 50%; box-shadow: inset 0 0 34px rgba(53,216,255,.035); animation: orbit-spin 16s linear infinite; }
.orbit-ring::before, .orbit-ring::after { content: ""; position: absolute; inset: 16%; border: 1px dashed rgba(132,104,255,.35); border-radius: 50%; }
.orbit-ring::after { inset: 35%; border-style: solid; border-color: rgba(53,216,255,.23); }
.ring-two { inset: 12%; transform: rotateX(70deg); border-color: rgba(132,104,255,.25); animation-direction: reverse; animation-duration: 11s; }
.orbit-core {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 94px;
    height: 94px;
    border: 1px solid rgba(53,216,255,.35);
    border-radius: 50%;
    transform: translate(-50%, -50%) translateZ(70px) rotateZ(15deg) rotateX(-61deg);
    background: radial-gradient(circle, rgba(53,216,255,.18), rgba(8,13,28,.78) 68%);
    box-shadow: 0 0 60px rgba(53,216,255,.18), inset 0 0 30px rgba(53,216,255,.1);
}
.orbit-core span { font-size: 30px; font-weight: 800; }
.orbit-core small { color: var(--cyan); font: 8px/1 ui-monospace, monospace; letter-spacing: .18em; text-transform: uppercase; }
.orbit-dot { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 14px var(--cyan); }
.dot-one { top: 12%; left: 23%; }
.dot-two { right: 4%; bottom: 34%; background: var(--violet); box-shadow: 0 0 14px var(--violet); }
.dot-three { bottom: 9%; left: 34%; width: 5px; height: 5px; }
@keyframes orbit-spin { to { transform: rotate(360deg); } }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 34px 0 22px; perspective: 1000px; }
.stat-card,
.panel,
.board {
    border: 1px solid var(--line);
    background: linear-gradient(145deg, rgba(16,24,45,.84), rgba(8,13,27,.78));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.025), var(--shadow);
    backdrop-filter: blur(18px);
}
.stat-card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    min-height: 84px;
    padding: 14px 16px;
    overflow: hidden;
    border-radius: 17px;
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0);
    transition: transform .15s ease, border-color .25s ease, background .25s ease;
}
.stat-card::after { content: ""; position: absolute; top: -80px; left: var(--shine-x, 50%); width: 120px; height: 180px; transform: rotate(28deg); background: linear-gradient(90deg, transparent, rgba(255,255,255,.055), transparent); pointer-events: none; }
.stat-card:hover { border-color: rgba(53,216,255,.22); }
.stat-card > span { color: var(--muted-bright); font-size: 12px; font-weight: 600; }
.stat-card > strong { grid-row: 1 / 3; grid-column: 3; font-size: 28px; letter-spacing: -.04em; }
.stat-card > small { grid-column: 2; color: var(--muted); font-size: 10px; }
.stat-icon { grid-row: 1 / 3; display: grid; place-items: center; width: 34px; height: 34px; margin-right: 10px; border: 1px solid currentColor; border-radius: 10px; background: rgba(255,255,255,.025); font-size: 16px; box-shadow: inset 0 0 18px rgba(255,255,255,.02); }
.stat-icon.cyan { color: var(--cyan); }
.stat-icon.violet { color: #a088ff; }
.stat-icon.blue { color: #5ea5ff; }
.stat-icon.green { color: var(--green); }

.board { position: relative; margin-bottom: 80px; padding: 34px; border-radius: var(--radius); overflow: hidden; }
.board::before {
    content: "";
    position: absolute;
    top: 0;
    left: 9%;
    width: 34%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    box-shadow: 0 0 18px rgba(53,216,255,.5);
}
.board-heading, .section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 27px; }
.board-heading .eyebrow, .section-title .eyebrow { margin-bottom: 8px; }
.board h2, .section-title h2 { margin: 0; font-size: 28px; letter-spacing: -.035em; }
.readonly-note { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.readonly-note > span { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; color: var(--orange); }
.readonly-note > div { display: flex; flex-direction: column; gap: 3px; }
.readonly-note strong { color: var(--muted-bright); font-size: 11px; }
.readonly-note small { font-size: 9px; }

.button {
    min-height: 43px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .035em;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary { color: #021017; background: linear-gradient(115deg, var(--cyan), #7fddff); box-shadow: 0 11px 28px rgba(53,216,255,.16), inset 0 1px 0 rgba(255,255,255,.55); }
.button-primary:hover { box-shadow: 0 15px 34px rgba(53,216,255,.25); }
.button-ghost { color: var(--muted-bright); border-color: var(--line); background: rgba(255,255,255,.025); }
.button-ghost:hover { color: var(--text); border-color: var(--line-strong); background: var(--cyan-soft); }
.button-small { min-height: 36px; padding: 0 13px; font-size: 10px; }
.button-wide { width: 100%; }
.button-filter { min-height: 40px; border-color: var(--line); background: var(--surface-high); color: var(--muted-bright); }

.status-tabs { display: flex; gap: 4px; margin-bottom: 16px; padding: 5px; overflow-x: auto; border: 1px solid var(--line); border-radius: 13px; background: rgba(2,5,12,.35); }
.status-tabs a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; min-height: 35px; padding: 0 14px; border-radius: 9px; color: var(--muted); font-size: 10px; font-weight: 700; }
.status-tabs a:hover { color: var(--muted-bright); }
.status-tabs a.active { color: var(--text); background: rgba(53,216,255,.1); box-shadow: inset 0 0 0 1px rgba(53,216,255,.13); }
.status-tabs b { display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 7px; color: var(--cyan); background: rgba(53,216,255,.11); font-size: 9px; }

.filters { display: grid; grid-template-columns: minmax(260px, 1fr) auto auto auto auto auto; gap: 8px; align-items: center; margin-bottom: 20px; }
.filters select, .search-field {
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--muted-bright);
    background-color: rgba(5,9,19,.78);
}
.filters select { max-width: 180px; padding: 0 34px 0 12px; font-size: 10px; }
.search-field { display: flex; align-items: center; gap: 8px; padding: 0 13px; }
.search-field span { color: var(--cyan); font-size: 20px; line-height: 1; }
.search-field input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 11px; }
.search-field input::placeholder { color: #606b81; }
.reset-filter { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(255,96,125,.22); border-radius: 10px; color: var(--red); background: rgba(255,96,125,.06); }

.ticket-list { display: flex; flex-direction: column; gap: 5px; }
.ticket-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 64px;
    padding: 9px 14px 9px 17px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: linear-gradient(105deg, rgba(14,21,40,.84), rgba(8,13,26,.6));
    transition: transform .14s ease, border-color .23s ease, background .23s ease;
}
.ticket-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: currentColor; box-shadow: 0 0 15px currentColor; }
.ticket-color-red { color: var(--red); border-color: rgba(255,96,125,.18); background: linear-gradient(90deg, rgba(255,96,125,.09), rgba(8,13,26,.68) 22%); }
.ticket-color-orange { color: var(--orange); border-color: rgba(255,171,84,.2); background: linear-gradient(90deg, rgba(255,171,84,.09), rgba(8,13,26,.68) 22%); }
.ticket-color-green { color: var(--green); border-color: rgba(69,230,167,.18); background: linear-gradient(90deg, rgba(69,230,167,.08), rgba(8,13,26,.68) 22%); }
.ticket-color-blue { color: #5ea5ff; border-color: rgba(94,165,255,.19); background: linear-gradient(90deg, rgba(94,165,255,.09), rgba(8,13,26,.68) 22%); }
.ticket-card:hover { z-index: 2; border-color: rgba(53,216,255,.25); background: linear-gradient(105deg, rgba(18,29,52,.94), rgba(9,15,30,.78)); }
.ticket-card:hover .ticket-side b { color: var(--cyan); transform: translateX(3px); }
.ticket-main { min-width: 0; color: var(--text); }
.ticket-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-bottom: 4px; }
.ticket-id { color: #6f7b92; font: 600 9px/1 ui-monospace, SFMono-Regular, monospace; letter-spacing: .1em; }
.badge, .priority, .role-badge, .active-state { display: inline-flex; align-items: center; width: max-content; min-height: 21px; padding: 0 8px; border: 1px solid transparent; border-radius: 7px; font-size: 8px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.badge i, .active-state i { width: 5px; height: 5px; margin-right: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.badge-type-bug { color: #ff718d; border-color: rgba(255,96,125,.19); background: rgba(255,96,125,.075); }
.badge-type-improvement { color: #8bdaff; border-color: rgba(53,216,255,.18); background: rgba(53,216,255,.07); }
.badge-type-change { color: #b29cff; border-color: rgba(132,104,255,.22); background: rgba(132,104,255,.08); }
.badge-status-open { color: #9aa9bf; background: rgba(154,169,191,.07); border-color: rgba(154,169,191,.16); }
.badge-status-planned { color: #ae99ff; background: rgba(132,104,255,.08); border-color: rgba(132,104,255,.18); }
.badge-status-in_progress, .badge-status-testing { color: var(--cyan); background: rgba(53,216,255,.07); border-color: rgba(53,216,255,.18); }
.badge-status-resolved, .badge-status-closed { color: var(--green); background: rgba(69,230,167,.07); border-color: rgba(69,230,167,.17); }
.priority { min-height: 19px; padding: 0 7px; color: var(--muted); border-color: var(--line); background: rgba(255,255,255,.02); }
.priority-critical { color: var(--red); border-color: rgba(255,96,125,.25); }
.priority-critical { background: rgba(255,96,125,.08); box-shadow: 0 0 12px rgba(255,96,125,.08); }
.ticket-main h3 { margin: 0 0 4px; overflow: hidden; font-size: 12px; line-height: 1.25; letter-spacing: -.01em; text-overflow: ellipsis; white-space: nowrap; }
.ticket-footer { display: flex; flex-wrap: wrap; gap: 10px; color: #6e7a91; font-size: 7px; }
.project-name { color: var(--muted-bright); }
.due-date { color: var(--orange); }
.ticket-side { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 9px; }
.ticket-side b { font-size: 18px; transition: .2s; }
.empty-state { display: flex; flex-direction: column; align-items: center; padding: 74px 24px; border: 1px dashed var(--line); border-radius: 15px; text-align: center; }
.empty-state > span { color: var(--cyan); font-size: 34px; }
.empty-state h3 { margin: 12px 0 7px; font-size: 18px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 11px; }

.auth-layout, .form-layout, .account-layout {
    min-height: calc(100vh - 150px);
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(380px, .7fr);
    align-items: center;
    gap: clamp(48px, 8vw, 130px);
    padding: 80px 5%;
}
.auth-visual h1, .form-intro h1, .account-layout h1 { font-size: clamp(43px, 5vw, 70px); }
.access-list { display: grid; gap: 10px; margin-top: 42px; }
.access-list > div { display: flex; align-items: center; gap: 15px; max-width: 510px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 13px; background: rgba(12,18,35,.52); }
.access-list b { color: var(--cyan); font: 600 9px/1 ui-monospace, monospace; }
.access-list span { display: flex; flex-direction: column; gap: 4px; }
.access-list strong { font-size: 11px; }
.access-list small { color: var(--muted); font-size: 9px; }
.panel { position: relative; padding: 34px; border-radius: var(--radius); }
.panel::before { content: ""; position: absolute; inset: -1px -1px auto; height: 1px; background: linear-gradient(90deg, transparent, rgba(53,216,255,.55), transparent); }
.panel-kicker { margin-bottom: 28px; color: var(--cyan); font: 8px/1 ui-monospace, monospace; letter-spacing: .19em; }
.panel h2 { margin-bottom: 9px; font-size: 28px; letter-spacing: -.035em; }
.panel > p { margin-bottom: 26px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 17px; }
.field > span { color: var(--muted-bright); font-size: 9px; font-weight: 650; letter-spacing: .045em; }
.field > span small { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
    width: 100%;
    min-height: 47px;
    padding: 0 14px;
    outline: none;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: var(--text);
    background: rgba(4,8,17,.72);
    font-size: 11px;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { min-height: 120px; padding-top: 13px; resize: vertical; line-height: 1.65; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: rgba(53,216,255,.42); background: rgba(7,13,27,.88); box-shadow: 0 0 0 3px rgba(53,216,255,.06), 0 0 24px rgba(53,216,255,.05); }
.field input::placeholder, .field textarea::placeholder { color: #536077; }
.back-link { display: block; margin-top: 20px; color: var(--muted); font-size: 9px; text-align: center; }
.back-link:hover { color: var(--cyan); }
.form-layout { grid-template-columns: minmax(310px, .72fr) minmax(540px, 1.28fr); align-items: start; }
.form-intro { position: sticky; top: 150px; padding-top: 35px; }
.role-capability { margin-top: 40px; padding: 19px; border: 1px solid var(--line); border-radius: 14px; background: rgba(10,16,31,.58); }
.role-capability > small { display: block; margin-bottom: 9px; color: var(--muted); font: 7px/1 ui-monospace, monospace; letter-spacing: .16em; }
.role-capability > strong { display: block; margin-bottom: 15px; font-size: 14px; }
.role-capability > div { display: flex; flex-wrap: wrap; gap: 7px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 15px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding-top: 8px; }
.profile-summary { display: flex; align-items: center; gap: 15px; max-width: 430px; padding: 19px; }
.profile-summary > div { display: flex; flex-direction: column; gap: 4px; }
.profile-summary strong { font-size: 14px; }
.profile-summary small { color: var(--cyan); font-size: 9px; }

.security-banner { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 45px; padding: 9px 25px; color: #ffd9b2; border-bottom: 1px solid rgba(255,171,84,.2); background: rgba(255,171,84,.08); font-size: 10px; }
.security-banner > span { color: var(--orange); }
.security-banner strong { color: var(--orange); }

.admin-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; padding: 75px 4% 55px; }
.admin-hero h1 { margin-bottom: 0; font-size: clamp(45px, 5vw, 70px); }
.admin-count { display: flex; align-items: center; gap: 13px; padding: 18px 22px; border: 1px solid var(--line); border-radius: 16px; background: rgba(10,16,31,.58); }
.admin-count strong { font-size: 36px; }
.admin-count span { color: var(--muted); font-size: 9px; line-height: 1.5; text-transform: uppercase; }
.admin-grid { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 20px; }
.create-user-card { position: sticky; top: 105px; }
.user-management { padding: 6px 0; }
.users-list { display: flex; flex-direction: column; gap: 8px; }
.user-row { border: 1px solid var(--line); border-radius: 14px; background: rgba(10,16,31,.6); overflow: hidden; }
.user-row[open] { border-color: rgba(53,216,255,.2); background: rgba(13,21,40,.72); }
.user-row summary { display: grid; grid-template-columns: auto minmax(150px, 1fr) auto auto auto; align-items: center; gap: 13px; padding: 14px 16px; cursor: pointer; list-style: none; }
.user-row summary::-webkit-details-marker { display: none; }
.user-identity { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.user-identity strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.user-identity small { color: var(--muted); font-size: 8px; }
.role-badge { color: var(--muted-bright); border-color: var(--line); }
.role-admin { color: var(--cyan); border-color: rgba(53,216,255,.18); background: rgba(53,216,255,.06); }
.role-project_manager { color: #b09cff; border-color: rgba(132,104,255,.2); background: rgba(132,104,255,.06); }
.active-state { color: var(--muted); }
.active-state.online { color: var(--green); }
.active-state.offline { color: var(--red); }
.chevron { color: var(--muted); transition: transform .2s; }
.user-row[open] .chevron { transform: rotate(180deg); }
.user-edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 20px; padding: 20px; border-top: 1px solid var(--line); background: rgba(3,7,15,.3); }
.user-edit-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.user-edit-form .toggle-field, .user-edit-form button { align-self: center; }
.toggle-field { display: flex; align-items: center; gap: 9px; color: var(--muted-bright); font-size: 9px; }
.toggle-field input { position: absolute; opacity: 0; }
.toggle-field > span { position: relative; width: 35px; height: 19px; border-radius: 20px; background: #242d3e; transition: .2s; }
.toggle-field > span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #718097; transition: .2s; }
.toggle-field input:checked + span { background: rgba(69,230,167,.18); box-shadow: inset 0 0 0 1px rgba(69,230,167,.2); }
.toggle-field input:checked + span::after { left: 19px; background: var(--green); box-shadow: 0 0 8px var(--green); }
.reset-password-form { padding-left: 20px; border-left: 1px solid var(--line); }
.projects-panel { margin-bottom: 20px; }
.project-count { color: var(--muted); font-size: 9px; }
.project-create-form { display: grid; grid-template-columns: minmax(240px, 1fr) auto; gap: 12px; align-items: end; margin-bottom: 18px; }
.project-create-form .field { margin-bottom: 0; }
.projects-list { display: flex; flex-direction: column; gap: 7px; }
.project-row { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto auto; gap: 14px; align-items: center; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; background: rgba(5,9,19,.44); }
.project-row .field { margin-bottom: 0; }
.project-row .field > span { display: none; }
.project-row .field input { min-height: 38px; }
.project-usage { color: var(--muted); font-size: 8px; white-space: nowrap; }
.activity-panel { margin-bottom: 80px; }
.activity-list { display: flex; flex-direction: column; }
.activity-list > div { display: grid; grid-template-columns: auto 160px 1fr auto; gap: 12px; align-items: center; min-height: 42px; border-top: 1px solid rgba(151,176,226,.08); color: var(--muted); font-size: 9px; }
.activity-list strong { color: var(--muted-bright); }
.activity-list time { color: #5f6c83; font: 8px/1 ui-monospace, monospace; }
.activity-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }

.toast {
    position: fixed;
    z-index: 80;
    top: 96px;
    left: 50%;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: min(420px, calc(100% - 30px));
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    transform: translateX(-50%);
    background: rgba(13,20,38,.96);
    box-shadow: 0 20px 55px rgba(0,0,0,.46);
    backdrop-filter: blur(18px);
    font-size: 10px;
    animation: toast-in .35s ease both;
}
.toast > span { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 7px; }
.toast-success > span { color: var(--green); background: rgba(69,230,167,.1); }
.toast-error > span { color: var(--red); background: rgba(255,96,125,.1); }
.toast button { margin-left: auto; border: 0; color: var(--muted); background: transparent; font-size: 18px; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -14px); } }

.drawer-layer { position: fixed; inset: 0; z-index: 70; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(0,3,10,.68); backdrop-filter: blur(8px); animation: fade-in .25s ease both; }
.ticket-drawer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(720px, 94vw);
    border-left: 1px solid rgba(53,216,255,.18);
    background: linear-gradient(145deg, rgba(13,20,39,.98), rgba(5,9,18,.99));
    box-shadow: -35px 0 100px rgba(0,0,0,.5);
    animation: drawer-in .35s cubic-bezier(.22,.8,.25,1) both;
}
@keyframes drawer-in { from { transform: translateX(100%); } }
@keyframes fade-in { from { opacity: 0; } }
.drawer-head { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 27px; border-bottom: 1px solid var(--line); }
.drawer-head > div { display: flex; align-items: center; gap: 9px; }
.drawer-close { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: 21px; }
.drawer-close:hover { color: var(--text); border-color: var(--line-strong); }
.drawer-scroll { height: calc(100% - 72px); padding: 30px; overflow-y: auto; overscroll-behavior: contain; }
.drawer-status-row { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.drawer-scroll > h2 { margin-bottom: 14px; font-size: 29px; line-height: 1.18; letter-spacing: -.035em; }
.ticket-description { color: var(--muted-bright); font-size: 12px; line-height: 1.78; }
.ticket-info-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1px; margin: 25px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--line); }
.ticket-info-grid > div { min-height: 75px; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 13px; background: rgba(7,12,24,.96); }
.ticket-info-grid small { color: var(--muted); font-size: 7px; letter-spacing: .08em; text-transform: uppercase; }
.ticket-info-grid strong { color: var(--muted-bright); font-size: 10px; }
.admin-ticket-editor { margin: 25px 0; border: 1px solid rgba(132,104,255,.2); border-radius: 13px; overflow: hidden; background: rgba(132,104,255,.045); }
.admin-ticket-editor > summary { display: flex; justify-content: space-between; padding: 15px 17px; color: #c6b9ff; cursor: pointer; font-size: 10px; font-weight: 700; list-style: none; }
.admin-ticket-editor > summary::-webkit-details-marker { display: none; }
.ticket-edit-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; padding: 18px; border-top: 1px solid rgba(132,104,255,.14); }
.ticket-edit-form .full, .ticket-edit-form > button { grid-column: 1 / -1; }
.delete-ticket-form { padding: 0 18px 18px; text-align: right; }
.danger-link { border: 0; color: var(--red); background: transparent; font-size: 9px; text-decoration: underline; text-underline-offset: 3px; }
.comments { padding-top: 10px; }
.comments-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.comments-heading h3 { margin: 0; font-size: 18px; }
.comments-heading span { color: var(--muted); font-size: 8px; }
.comment { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 15px 0; border-top: 1px solid var(--line); }
.comment header { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.comment header strong { font-size: 10px; }
.comment header span { color: var(--muted); font-size: 8px; }
.comment p { margin: 0; color: var(--muted-bright); font-size: 10px; line-height: 1.65; }
.no-comments { padding: 20px 0; color: var(--muted); border-top: 1px solid var(--line); font-size: 10px; }
.comment-form { padding-top: 17px; border-top: 1px solid var(--line); }

.footer { width: min(1460px, calc(100% - 56px)); min-height: 95px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 auto; border-top: 1px solid var(--line); color: #59657b; font: 8px/1.4 ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }
.footer i { color: var(--cyan); font-style: normal; }
.footer a:hover { color: var(--cyan); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.reveal { animation: reveal-up .62s cubic-bezier(.22,.8,.25,1) both; }
.stats-grid.reveal { animation-delay: .08s; }
.board.reveal { animation-delay: .14s; }
@keyframes reveal-up { from { opacity: 0; transform: translateY(18px); } }

@media (max-width: 1120px) {
    .topbar { grid-template-columns: auto 1fr auto; padding: 0 24px; }
    .main-nav { justify-self: center; }
    .nav-link { padding: 0 12px; }
    .hero-orbit { right: 1%; transform: translateY(-50%) scale(.84) perspective(600px) rotateX(61deg) rotateZ(-15deg); }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .filters { grid-template-columns: minmax(220px, 1fr) repeat(3, auto); }
    .filters .button-filter, .reset-filter { grid-row: 2; }
    .admin-grid { grid-template-columns: 330px minmax(0, 1fr); }
    .user-row summary { grid-template-columns: auto minmax(120px,1fr) auto auto; }
    .user-row summary .active-state { display: none; }
    .user-edit-grid { grid-template-columns: 1fr; }
    .reset-password-form { padding: 15px 0 0; border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 820px) {
    .topbar { height: 68px; grid-template-columns: 1fr auto; padding: 0 16px; }
    .brand-copy small, .main-nav { display: none; }
    .mode-pill { display: none; }
    .user-chip > span:last-child { display: none; }
    .site-shell { width: min(100% - 28px, 700px); }
    .auth-visual h1, .form-intro h1, .account-layout h1, .admin-hero h1 { font-size: clamp(38px, 11vw, 58px); }
    .stats-grid { margin-bottom: 35px; }
    .board { padding: 20px; margin-bottom: 45px; }
    .board-heading { align-items: flex-start; }
    .readonly-note { display: none; }
    .filters { grid-template-columns: 1fr 1fr; }
    .search-field { grid-column: 1 / -1; }
    .filters select { width: 100%; max-width: none; }
    .ticket-card { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; min-height: 62px; padding: 8px 11px 8px 15px; }
    .ticket-side { display: none; }
    .auth-layout, .form-layout, .account-layout { grid-template-columns: 1fr; gap: 40px; padding: 55px 0; }
    .form-intro { position: static; padding-top: 0; }
    .auth-card, .ticket-form, .account-card { width: 100%; }
    .admin-hero { align-items: flex-start; padding: 55px 0 35px; }
    .admin-grid { grid-template-columns: 1fr; }
    .project-row { grid-template-columns: minmax(0, 1fr) auto auto; }
    .project-usage { display: none; }
    .create-user-card { position: static; }
    .activity-list > div { grid-template-columns: auto 1fr; padding: 10px 0; }
    .activity-list time { grid-column: 2; }
    .ticket-info-grid { grid-template-columns: 1fr 1fr; }
    .footer { width: calc(100% - 28px); flex-direction: column; justify-content: center; padding: 25px 0 105px; text-align: center; }
    .mobile-nav {
        position: fixed;
        z-index: 60;
        right: 12px;
        bottom: 12px;
        left: 12px;
        display: flex;
        align-items: center;
        justify-content: space-around;
        min-height: 64px;
        padding: 6px;
        border: 1px solid rgba(151,176,226,.18);
        border-radius: 17px;
        background: rgba(7,11,22,.9);
        box-shadow: 0 18px 50px rgba(0,0,0,.55);
        backdrop-filter: blur(20px);
    }
    .mobile-nav a { display: flex; flex: 1; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); font-size: 8px; }
    .mobile-nav a span { font-size: 17px; line-height: 1; }
    .mobile-nav a.active { color: var(--cyan); }
}

@media (max-width: 560px) {
    .topbar { padding: 0 12px; }
    .brand { gap: 8px; }
    .brand-mark { width: 31px; height: 31px; }
    .brand-mark::before, .brand-mark::after, .brand-mark i { width: 19px; height: 19px; }
    .brand-copy strong { font-size: 12px; }
    .session-actions { gap: 5px; }
    .user-chip { padding-right: 2px; }
    .stats-grid { grid-template-columns: 1fr; gap: 8px; }
    .stat-card { min-height: 74px; }
    .board-heading { flex-direction: column; }
    .board-heading .button { width: 100%; }
    .filters { grid-template-columns: 1fr; }
    .search-field, .filters .button-filter, .reset-filter { grid-column: 1; grid-row: auto; }
    .reset-filter { width: 100%; }
    .ticket-card { grid-template-columns: 1fr; }
    .ticket-main h3 { font-size: 12px; }
    .panel { padding: 23px; }
    .form-grid, .ticket-edit-form { grid-template-columns: 1fr; }
    .form-grid .full, .ticket-edit-form .full, .ticket-edit-form > button { grid-column: auto; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .button { width: 100%; }
    .admin-hero { flex-direction: column; }
    .user-row summary { grid-template-columns: auto minmax(0,1fr) auto; }
    .user-row summary .role-badge { display: none; }
    .user-edit-form { grid-template-columns: 1fr; }
    .project-create-form, .project-row { grid-template-columns: 1fr; }
    .project-row .toggle-field { padding: 4px 0; }
    .ticket-info-grid { grid-template-columns: 1fr; }
    .drawer-scroll { padding: 22px 18px; }
    .drawer-scroll > h2 { font-size: 24px; }
    .comment header { align-items: flex-start; flex-direction: column; gap: 3px; }
    .security-banner { align-items: flex-start; flex-wrap: wrap; justify-content: flex-start; }
}

@media (hover: none), (max-width: 820px) {
    .tilt-card { transform: none !important; }
    .cursor-glow { display: none; }
}

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