@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
    --bg: #050b13;
    --bg-rgb: 5, 11, 19;
    --bg-2: #0b1721;
    --bg-2-rgb: 11, 23, 33;
    --text: #e6f9ff;
    --text-rgb: 230, 249, 255;
    --muted: #9ccde0;
    --muted-rgb: 156, 205, 224;
    --primary: #3dd6d0;
    --primary-rgb: 61, 214, 208;
    --primary-strong: #67ebff;
    --primary-strong-rgb: 103, 235, 255;
    --secondary: #1f9ab8;
    --secondary-rgb: 31, 154, 184;
    --highlight: #7ef9d6;
    --highlight-rgb: 126, 249, 214;

    --panel: rgba(var(--bg-2-rgb), var(--glass-opacity));
    --panel-strong: rgba(var(--bg-2-rgb), min(1, calc(var(--glass-opacity) + 0.18)));
    --line: rgba(var(--primary-strong-rgb), 0.18);

    --success: #43d39e;
    --success-rgb: 67, 211, 158;
    --success-soft: #9ff9df;
    --warning: #f6c453;
    --warning-rgb: 246, 196, 83;
    --warning-soft: #f6d783;
    --danger: #ff7b88;
    --danger-rgb: 255, 123, 136;
    --danger-soft: #ffadb5;
    --info: #6ab7ff;
    --info-rgb: 106, 183, 255;
    --neutral: #7d95a0;
    --neutral-rgb: 125, 149, 160;

    --grid-parallax: 0px;

    --radius: 14px;
    --button-radius: 14px;
    --card-radius: 16px;
    --glass-blur: 18px;
    --glass-opacity: 0.78;
    --shadow-intensity: 0.45;

    --heading-font: 'Figtree', sans-serif;
    --body-font: 'Figtree', sans-serif;
    --base-font-size: 16px;
}

html {
    scroll-behavior: smooth;
}

body {
    position: relative;
    overflow-x: hidden;
    background:
        radial-gradient(circle at top left, rgba(var(--secondary-rgb), 0.22), transparent 22%),
        radial-gradient(circle at bottom right, rgba(var(--highlight-rgb), 0.12), transparent 20%),
        var(--bg);
    color: var(--text);
    font-family: 'Figtree', sans-serif;
    margin: 0;
}

body::before {
    content: '';
    position: fixed;
    inset: -12% 0 -12% 0;
    background-image: linear-gradient(rgba(var(--primary-strong-rgb), 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--primary-strong-rgb), 0.05) 1px, transparent 1px);
    background-size: 32px 32px;
    background-repeat: repeat;
    mask-image: radial-gradient(circle at center, black 30%, transparent 100%);
    pointer-events: none;
    z-index: -1;
    transform: translate3d(0, var(--grid-parallax), 0);
    will-change: transform;
}

.contact-shell {
    position: relative;
    overflow: hidden;
    background: rgba(var(--bg-rgb), 0.7);
    border: 1px solid var(--line);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.contact-shell::before,
.contact-shell::after {
    content: '';
    position: absolute;
    width: 28rem;
    height: 28rem;
    border-radius: 9999px;
    filter: blur(80px);
    opacity: 0.5;
    pointer-events: none;
}

.contact-shell::before {
    background: rgba(var(--primary-rgb), 0.18);
    top: -8rem;
    right: -4rem;
}

.contact-shell::after {
    background: rgba(16, 185, 129, 0.12);
    bottom: -10rem;
    left: -5rem;
}

.glass-card {
    background: rgba(var(--bg-rgb), 0.78);
    border: 1px solid rgba(var(--primary-strong-rgb), 0.12);
    backdrop-filter: blur(18px);
}

.accent-text {
    color: var(--primary-strong);
}

.soft-border {
    border-color: rgba(var(--primary-strong-rgb), 0.12);
}

.parallax-layer {
    will-change: transform;
    transition: transform 0.25s ease-out;
}

.float-card {
    transform: translate3d(0, 0, 0);
    transition: transform 0.2s ease-out;
}

.tech-pill {
    border: 1px solid rgba(var(--primary-strong-rgb), 0.14);
    background: rgba(var(--bg-rgb), 0.7);
}

.form-field {
    width: 100%;
    border-radius: 0.9rem;
    background: rgba(var(--bg-rgb), 0.8);
    border: 1px solid rgba(var(--primary-strong-rgb), 0.12);
    color: var(--text);
    padding: 0.9rem 1rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.form-field:focus {
    border-color: rgba(var(--primary-rgb), 0.7);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.12);
}

.input-label {
    color: var(--muted);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--bg);
    box-shadow: 0 10px 25px rgba(var(--primary-rgb), 0.32);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    cursor: pointer;
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 35px rgba(var(--primary-rgb), 0.38);
}

.secondary-btn {
    background: rgba(var(--bg-rgb), 0.7);
    border: 1px solid rgba(var(--primary-strong-rgb), 0.14);
    color: var(--text);
    cursor: pointer;
}

.fade-in {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .contact-shell {
        border-radius: 1.25rem;
    }
}
+
.dashboard-menu-toggle { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 900px) {
.dashboard-sidebar { position: sticky; top: 0; z-index: 100; display: grid; grid-template-columns: minmax(0,1fr) auto; min-height: 0; padding: .7rem .9rem; border-right: 0; border-bottom: 1px solid rgba(var(--primary-strong-rgb), .14); background: rgba(var(--bg-rgb), .97); backdrop-filter: blur(18px); }
.dashboard-brand { min-width: 0; margin: 0; }.dashboard-brand .brand-mark { width: 2.25rem; height: 2.25rem; border-radius: .65rem; }.dashboard-brand strong { font-size: .78rem; }.dashboard-brand small { font-size: .52rem; }
.dashboard-menu-toggle { display: grid; width: 2.5rem; height: 2.5rem; padding: 0; place-items: center; border: 1px solid var(--line); border-radius: .7rem; background: rgba(var(--bg-rgb), .8); color: var(--primary-strong); }.dashboard-menu-toggle svg { width: 1.25rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.8; }
.dashboard-nav,.dashboard-sidebar-footer { display:none;grid-column:1/-1 }.dashboard-sidebar.is-menu-open .dashboard-nav { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin-top:.65rem;padding-top:.65rem;border-top:1px solid rgba(var(--primary-strong-rgb), .1) }.dashboard-sidebar.is-menu-open .dashboard-sidebar-footer { display:grid;margin-top:.4rem }.dashboard-nav-label{margin:.65rem .6rem .25rem}.dashboard-nav-link,.dashboard-logout{min-height:2.65rem;padding:.6rem .7rem}.dashboard-main{padding:1.5rem clamp(1rem,4vw,2rem)}
}
@media (max-width:650px){
.dashboard-main{padding:1rem .8rem 1.5rem}.dashboard-topbar{align-items:center;flex-direction:row;gap:.65rem;margin-bottom:1.4rem}.dashboard-topbar>div:first-child{min-width:0}.dashboard-topbar .eyebrow{font-size:.58rem;letter-spacing:.12em}.dashboard-topbar h1{margin-top:.2rem;font-size:clamp(1.45rem,8vw,2rem)}.dashboard-user-chip{width:auto;min-width:0;max-width:58%;padding:.45rem .55rem;gap:.5rem}.dashboard-user-avatar{width:2rem;height:2rem;flex-basis:2rem;border-radius:.55rem}.dashboard-user-details strong{font-size:.68rem}.dashboard-user-details small{font-size:.55rem}
.dashboard-duty-bar{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:.55rem;margin:0 0 1rem;padding:.65rem}.dashboard-duty-bar form{margin:0}.dashboard-duty-bar .dashboard-action-button{white-space:nowrap}.dashboard-welcome{gap:1rem;padding:1rem}.dashboard-welcome h2{font-size:1.3rem}.dashboard-welcome p,.dashboard-panel p{font-size:.8rem;line-height:1.6}.dashboard-status-panel{box-sizing:border-box;padding:.85rem 0 0}.dashboard-stat-card,.dashboard-panel{min-width:0;padding:1rem;border-radius:.85rem}.dashboard-stat-card strong{font-size:1.55rem}.dashboard-panel-heading{align-items:flex-start;flex-wrap:wrap}
.dashboard-filter-bar,.attendance-filter-bar{grid-template-columns:1fr;gap:.6rem;margin:1rem 0}.dashboard-filter-bar>span:empty{display:none}.dashboard-filter-button{width:100%;justify-content:center}.query-row{gap:.65rem;padding:.85rem 0}.query-row-meta{width:100%}.query-detail-list div{align-items:flex-start;flex-direction:column;gap:.2rem}.query-action-row,.dashboard-inline-form{align-items:stretch;flex-direction:column}.query-action-row>*,.dashboard-inline-form>*,.dashboard-inline-form .form-field,.dashboard-inline-form .dashboard-custom-select{width:100%}
.dashboard-form-two-col,.role-grid,.permission-groups,.profile-grid{gap:.75rem}.dashboard-wide-form{margin-top:1rem}.dashboard-submit-small{width:100%;justify-content:center}.profile-avatar-field{align-items:stretch;flex-direction:column}.member-actions{width:100%;flex-wrap:wrap;justify-content:flex-start}.team-directory-heading-actions{width:100%;align-items:center;flex-direction:row;justify-content:space-between}.team-card-grid{margin-top:.9rem}
.chat-shell{min-height:0;border-radius:.8rem}.chat-rail{max-height:19rem}.chat-main{min-height:65dvh}.chat-header{gap:.65rem;padding:.8rem}.chat-search{width:100%}.chat-messages{padding-block:.6rem}.chat-composer{padding:.7rem}.chat-composer-actions{align-items:flex-start;flex-direction:column}.chat-composer-actions .primary-btn{width:100%}.chat-presence-card{width:min(15.5rem,calc(100vw - 1rem))}
}
@media(max-width:420px){.dashboard-sidebar.is-menu-open .dashboard-nav{grid-template-columns:1fr}.dashboard-topbar{align-items:flex-start}.dashboard-user-chip{max-width:54%}.dashboard-user-details small{max-width:7.5rem}.dashboard-duty-bar{grid-template-columns:1fr auto}.dashboard-duty-bar>span:nth-child(2){grid-column:1/-1;grid-row:2}.dashboard-duty-bar form{grid-column:2;grid-row:1/span 2}.dashboard-duty-bar .dashboard-action-button{height:100%}}
@media(max-width:560px){.topbar{position:relative}.nav-wrap{min-height:0;gap:.85rem;padding:.85rem 0}.brand{gap:.65rem}.brand-mark{width:2.35rem;height:2.35rem;border-radius:.7rem}.brand strong{font-size:.78rem}.brand small{font-size:.54rem}.main-nav{width:100%;justify-content:center;gap:.55rem 1rem}.main-nav>a,.nav-drop-trigger{font-size:.68rem;letter-spacing:.06em}.footer-inner{width:min(100% - 1.5rem,1180px);padding:2rem 0 1rem}.footer-top{grid-template-columns:repeat(2,minmax(0,1fr));gap:1.75rem 1rem}.footer-brand-block{grid-column:1/-1;max-width:none}.footer-column{min-width:0;justify-self:start}.footer-brand-row{margin-bottom:.8rem}.footer-brand-block p{font-size:.86rem;line-height:1.65}.footer-column h4{margin-bottom:.7rem;font-size:.9rem}.footer-column ul{gap:.45rem}.footer-column li{font-size:.82rem}.footer-meta{margin-top:1.5rem}}
@media(max-width:390px){.footer-top{grid-template-columns:1fr}.footer-brand-block{grid-column:auto}}

.chat-avatar img, .team-card-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.dashboard-alert[role="status"], .dashboard-alert.is-success { border-color: rgba(var(--success-rgb), .35); color: var(--success-soft); background: rgba(var(--success-rgb), .12); }
.profile-avatar-field { display: flex; align-items: center; gap: .8rem; }
.profile-avatar-field .form-field { min-width: 0; }
.profile-avatar-preview { display: grid; width: 3.25rem; height: 3.25rem; flex: 0 0 3.25rem; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: .8rem; background: linear-gradient(135deg, rgba(var(--primary-rgb), .28), rgba(var(--primary-strong-rgb), .08)); color: var(--primary-strong); font-weight: 800; }
.profile-avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.form-help { display: block; margin-top: .4rem; color: var(--muted); font-size: .65rem; }
.chat-dm-identity { display: flex; min-width: 0; align-items: center; gap: .55rem; }
.chat-dm-identity > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-dm-avatar { position: relative; display: grid; width: 1.65rem; height: 1.65rem; flex: 0 0 1.65rem; place-items: center; border-radius: .5rem; background: linear-gradient(135deg, rgba(var(--primary-rgb), .25), rgba(var(--primary-strong-rgb), .08)); color: var(--primary-strong); font-size: .58rem; font-weight: 800; }
.chat-dm-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.chat-channel-link .chat-dm-avatar .presence-dot { position: absolute; right: -.12rem; bottom: -.12rem; width: .38rem; height: .38rem; margin: 0; border: 2px solid rgb(var(--bg-rgb)); box-sizing: content-box; }
.presence-dot.is-active { background: var(--success); box-shadow: 0 0 0 4px rgba(var(--success-rgb), .12); }
.presence-dot.is-idle { background: var(--warning); box-shadow: 0 0 0 4px rgba(var(--warning-rgb), .14); }
.presence-dot.is-offline { background: var(--neutral); box-shadow: 0 0 0 4px rgba(var(--neutral-rgb), .12); }
.team-card-status .presence-dot.is-active, .chat-channel-link .chat-dm-avatar .presence-dot.is-active { background: var(--success); }
.team-card-status .presence-dot.is-idle, .chat-channel-link .chat-dm-avatar .presence-dot.is-idle { background: var(--warning); }
.team-card-status .presence-dot.is-offline, .chat-channel-link .chat-dm-avatar .presence-dot.is-offline { background: var(--neutral); }
.team-card-status.is-active { color: var(--success); }
.team-card-status.is-idle { color: var(--warning); }
.chat-profile-trigger { position: relative; display: inline-flex; min-width: 0; align-items: center; cursor: default; }
.chat-presence-card { position: fixed; z-index: 1000; top: var(--presence-card-top, 1rem); left: var(--presence-card-left, 1rem); display: none; width: 15.5rem; padding: .85rem; border: 1px solid rgba(var(--primary-strong-rgb), .22); border-radius: .8rem; background: rgba(var(--bg-rgb), .98); color: var(--text); box-shadow: 0 18px 50px rgba(0,0,0,.45); text-align: left; }
.chat-presence-card.is-visible { display: grid; gap: .75rem; pointer-events: none; }
.chat-presence-card-head { display: grid; grid-template-columns: 2.35rem minmax(0,1fr); align-items: center; gap: .65rem; padding-bottom: .7rem; border-bottom: 1px solid var(--line); }
.chat-presence-card-head > span:last-child, .chat-presence-detail > span { display: grid; min-width: 0; gap: .12rem; }
.chat-presence-card strong { color: var(--text); font-size: .72rem; }
.chat-presence-card small { overflow: hidden; color: var(--muted); font-size: .62rem; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.chat-presence-card-avatar { display: grid; width: 2.35rem; height: 2.35rem; place-items: center; border-radius: .65rem; background: rgba(var(--primary-rgb), .16); color: var(--primary-strong); font-size: .72rem; font-weight: 800; }
.chat-presence-card-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.chat-presence-detail { display: grid; grid-template-columns: .7rem minmax(0,1fr); align-items: center; gap: .55rem; }
.chat-presence-detail .presence-dot { width: .48rem; height: .48rem; }
.attendance-state { width: .55rem; height: .55rem; border-radius: .15rem; background: #718096; box-shadow: 0 0 0 3px rgba(113,128,150,.12); }
.attendance-state.is-clocked-in { background: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .12); }

.chat-shell { display: grid; grid-template-columns: 270px minmax(0, 1fr); height: min(760px, calc(100vh - 190px)); min-height: 560px; overflow: hidden; border-radius: 1rem; }
.chat-rail { display: flex; min-width: 0; flex-direction: column; border-right: 1px solid var(--line); background: rgba(var(--bg-rgb), 0.72); }
.chat-rail-heading, .chat-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; border-bottom: 1px solid var(--line); }
.chat-rail-heading h2, .chat-header h2 { margin: 0.2rem 0 0; font-size: 1rem; }
.chat-create-popover { position: relative; }.chat-create-popover > summary { display: grid; width: 2rem; height: 2rem; place-items: center; border: 1px solid var(--line); border-radius: 0.6rem; color: var(--primary-strong); cursor: pointer; list-style: none; font-size: 1.25rem; }.chat-create-popover > summary::-webkit-details-marker, .chat-message-actions summary::-webkit-details-marker { display: none; }.chat-popover-form { position: absolute; top: 2.4rem; left: 0; z-index: 100; display: grid; width: 280px; gap: 0.65rem; padding: 1rem; border: 1px solid var(--line); border-radius: 0.8rem; background: rgb(var(--bg-rgb)); box-shadow: 0 20px 50px #000; }.chat-popover-form textarea { min-height: 80px; }
.chat-member-picker { display: grid; max-height: 130px; gap: 0.3rem; overflow-y: auto; color: var(--muted); font-size: 0.7rem; }.chat-member-picker > span { color: var(--text); font-weight: 700; }.chat-channel-settings { position: relative; }.chat-channel-settings > summary { cursor: pointer; list-style: none; color: var(--muted); }.chat-channel-settings .chat-popover-form { right: 0; left: auto; }
.chat-channel-list { flex: 1; overflow-y: auto; padding: 0.5rem; }.chat-section-label { display: block; margin: 0.75rem 0.6rem 0.35rem; color: var(--muted); font-size: 0.64rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }.chat-channel-link { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.55rem 0.65rem; border-radius: 0.55rem; color: rgba(var(--text-rgb), .7); font-size: 0.78rem; }.chat-channel-link:hover, .chat-channel-link.is-active { background: rgba(var(--primary-rgb), .12); color: var(--text); }.chat-channel-link b { min-width: 1.25rem; padding: 0.15rem 0.35rem; border-radius: 1rem; background: var(--primary); color: var(--bg); font-size: 0.6rem; text-align: center; }.chat-channel-link .presence-dot { display: inline-block; width: 0.45rem; height: 0.45rem; margin-right: 0.35rem; background: #52616b; }.chat-channel-link .presence-dot.is-online { background: var(--highlight); }
.chat-new-dm { position: relative; z-index: 60; padding: 0.6rem 0.6rem 0.9rem; border-top: 1px solid var(--line); background: rgb(var(--bg-rgb)); }.chat-new-dm-row { display: flex; gap: 0.4rem; }.chat-new-dm-row .dashboard-custom-select { min-width: 0; flex: 1; }.chat-new-dm-row .custom-select-trigger { padding: 0.55rem 2rem 0.55rem 0.7rem; font-size: 0.7rem; }.chat-new-dm-row .custom-select-menu { top: auto; bottom: calc(100% + 0.35rem); max-height: 240px; border-radius: 14px; }.chat-new-dm-row button { padding: 0.45rem 0.65rem; border-radius: 0.55rem; }
.chat-main { display: flex; min-width: 0; min-height: 0; flex-direction: column; background: rgba(var(--bg-rgb), 0.62); }.chat-header { flex: 0 0 auto; padding: 0.85rem 1rem; }.chat-header p { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.68rem; }.chat-search { width: min(260px, 42%); }.chat-search .form-field { padding: 0.55rem 0.75rem; font-size: 0.72rem; }.chat-alert, .chat-search-summary { margin: 0.65rem 1rem 0; }.chat-search-summary { color: var(--muted); font-size: 0.72rem; }.chat-search-summary a { color: var(--primary-strong); }
.chat-messages { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 1rem 0; scroll-behavior: smooth; }.chat-message { position: relative; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) auto; gap: 0.7rem; padding: 0.55rem 1rem; }.chat-message:hover { background: rgba(var(--primary-strong-rgb), .035); }.chat-avatar { display: grid; width: 2.25rem; height: 2.25rem; place-items: center; border-radius: 0.6rem; background: linear-gradient(135deg, rgba(var(--primary-rgb), .25), rgba(var(--primary-strong-rgb), .08)); color: var(--primary-strong); font-size: 0.75rem; font-weight: 800; }.chat-message-content { min-width: 0; }.chat-message-content header { display: flex; align-items: baseline; gap: 0.45rem; }.chat-message-content header strong { font-size: 0.78rem; }.chat-message-content time, .chat-message-content header small { color: var(--muted); font-size: 0.6rem; }.chat-message-copy { margin-top: 0.18rem; color: rgba(var(--text-rgb), .88); font-size: 0.78rem; line-height: 1.5; overflow-wrap: anywhere; }
.chat-attachments { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }.chat-attachment { display: flex; width: min(100%, 430px); align-items: center; gap: 0.5rem; padding: 0.6rem; border: 1px solid var(--line); border-radius: 0.6rem; color: var(--text); font-size: 0.7rem; }.chat-attachment span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.chat-attachment small { margin-left: auto; color: var(--muted); white-space: nowrap; }.chat-attachment-image { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 0.6rem; line-height: 0; }.chat-attachment-image img { display: block; max-width: 260px; max-height: 200px; width: auto; height: auto; object-fit: cover; }
.chat-message-actions { display: flex; align-items: flex-start; gap: 0.15rem; opacity: 0; }.chat-message:hover .chat-message-actions, .chat-message-actions:focus-within { opacity: 1; }.chat-message-actions button, .chat-message-actions summary { display: grid; min-width: 1.55rem; height: 1.55rem; place-items: center; padding: 0.2rem; border: 1px solid var(--line); border-radius: 0.4rem; background: rgb(var(--bg-rgb)); color: var(--muted); cursor: pointer; list-style: none; }.chat-message-actions details { position: relative; }.chat-emoji-menu, .chat-edit-form { position: absolute; right: 0; bottom: 2rem; z-index: 20; display: flex; padding: 0.4rem; border: 1px solid var(--line); border-radius: 0.65rem; background: rgb(var(--bg-rgb)); box-shadow: 0 15px 35px #000; }.chat-emoji-menu form { margin: 0; }.chat-emoji-menu button { border: 0; background: transparent; font-size: 1rem; }.chat-edit-form { width: 280px; flex-direction: column; gap: 0.4rem; }.chat-edit-form textarea { min-height: 70px; padding: 0.5rem; border: 1px solid var(--line); border-radius: 0.4rem; background: rgb(var(--bg-rgb)); color: var(--text); }
.chat-reaction-row { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.35rem; }.chat-reaction-row form { margin: 0; }.chat-reaction { padding: 0.18rem 0.4rem; border: 1px solid var(--line); border-radius: 1rem; background: rgba(var(--bg-rgb), .8); color: var(--text); cursor: pointer; font-size: 0.67rem; }.chat-reaction.is-mine { border-color: var(--primary); background: rgba(var(--primary-rgb), .12); }
.chat-thread { margin-top: 0.45rem; }.chat-thread > summary { color: var(--primary-strong); cursor: pointer; font-size: 0.67rem; }.chat-thread-list { display: grid; gap: 0.5rem; margin-top: 0.5rem; padding-left: 0.6rem; border-left: 2px solid rgba(var(--primary-rgb), .18); }.chat-thread-reply { display: grid; grid-template-columns: 1.65rem 1fr; gap: 0.45rem; }.chat-thread-reply .chat-avatar { width: 1.65rem; height: 1.65rem; font-size: 0.58rem; }.chat-thread-reply strong { font-size: 0.67rem; }.chat-thread-reply time { margin-left: 0.4rem; }.chat-thread-reply p { margin: 0.15rem 0; color: var(--text); font-size: 0.7rem; line-height: 1.4; }.chat-reply-form { display: flex; max-width: 420px; gap: 0.35rem; margin-top: 0.45rem; opacity: 0; transition: opacity .2s; }.chat-message:hover .chat-reply-form, .chat-reply-form:focus-within { opacity: 1; }.chat-reply-form input { min-width: 0; flex: 1; padding: 0.35rem 0.5rem; border: 1px solid var(--line); border-radius: 0.4rem; background: rgba(var(--bg-rgb), .8); color: var(--text); font-size: 0.67rem; }.chat-reply-form button { border: 0; background: transparent; color: var(--primary-strong); cursor: pointer; font-size: 0.67rem; }
.chat-typing { min-height: 1.2rem; padding: 0 1rem; color: var(--muted); font-size: 0.65rem; }.chat-composer { flex: 0 0 auto; margin: 0 1rem 1rem; border: 1px solid rgba(var(--primary-strong-rgb), .2); border-radius: 0.75rem; background: rgb(var(--bg-rgb)); }.chat-composer textarea { display: block; box-sizing: border-box; width: 100%; min-height: 58px; padding: 0.7rem; resize: none; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 0.78rem; }.chat-composer-actions { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.62rem; }.chat-composer-actions button { margin-left: auto; padding: 0.45rem 0.8rem; border: 0; border-radius: 0.5rem; cursor: pointer; }.chat-attach-button { cursor: pointer; font-size: 1rem; }.chat-attach-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }.chat-empty { display: grid; flex: 1; place-content: center; padding: 2rem; color: var(--muted); text-align: center; }.chat-empty h2, .chat-empty h3 { margin: 0; color: var(--text); }.chat-empty p { margin: 0.4rem 0; }
@media (max-width: 900px) { .chat-shell { grid-template-columns: 210px minmax(0, 1fr); height: 700px; } }
@media (max-width: 640px) { .chat-shell { display: flex; height: auto; min-height: 0; flex-direction: column; }.chat-rail { max-height: 260px; border-right: 0; border-bottom: 1px solid var(--line); }.chat-main { min-height: 620px; }.chat-header { align-items: flex-start; flex-direction: column; }.chat-search { width: 100%; }.chat-message { grid-template-columns: 2rem minmax(0, 1fr); padding-inline: 0.7rem; }.chat-avatar { width: 2rem; height: 2rem; }.chat-message-actions { grid-column: 2; opacity: 1; }.chat-reply-form { opacity: 1; } }

.team-directory-heading { align-items: center; }.team-directory-heading p { margin: 0.35rem 0 0; }.team-directory-heading-actions { display: flex; align-items: center; gap: 0.7rem; }.team-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; margin-top: 1.25rem; }.team-card { position: relative; display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; align-items: center; gap: 0.8rem; padding: 1rem; border: 1px solid rgba(var(--primary-strong-rgb), .1); border-radius: 0.85rem; background: rgba(var(--bg-rgb), .48); transition: border-color .2s ease, transform .2s ease; }.team-card:hover { transform: translateY(-1px); border-color: rgba(var(--primary-strong-rgb), .24); }.team-card-avatar { display: grid; width: 3rem; height: 3rem; place-items: center; border-radius: 0.8rem; background: linear-gradient(135deg, rgba(var(--primary-rgb), .28), rgba(var(--primary-strong-rgb), .08)); color: var(--primary-strong); font-size: 1rem; font-weight: 800; }.team-card-identity { min-width: 0; }.team-card-identity h3 { margin: 0; }.team-card-identity a, .team-card-identity span { display: block; margin-top: 0.2rem; overflow: hidden; color: var(--muted); font-size: 0.7rem; text-overflow: ellipsis; white-space: nowrap; }.team-card-identity a:hover { color: var(--primary-strong); }.team-card-status { display: inline-flex; align-items: center; gap: 0.3rem; align-self: start; color: var(--muted); font-size: 0.65rem; }.team-card-status .presence-dot { width: 0.45rem; height: 0.45rem; background: #52616b; }.team-card-status.is-online { color: var(--highlight); }.team-card-actions { display: flex; grid-column: 2 / 4; justify-content: flex-end; gap: 0.4rem; }.team-card-actions form { margin: 0; }.team-card-actions a, .team-card-actions button { display: grid; width: 2.15rem; height: 2.15rem; padding: 0; place-items: center; border: 1px solid var(--line); border-radius: 0.6rem; background: rgba(var(--bg-rgb), .8); color: var(--primary-strong); cursor: pointer; }.team-card-actions a:hover, .team-card-actions button:hover { border-color: var(--primary); background: rgba(var(--primary-rgb), .12); }.team-card-actions button.is-danger { color: var(--danger); }.team-card-actions button.is-danger:hover { border-color: rgba(var(--danger-rgb), .7); background: rgba(var(--danger-rgb), .1); }.team-card-actions svg { width: 1.1rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
@media (max-width: 800px) { .team-card-grid { grid-template-columns: 1fr; } } @media (max-width: 480px) { .team-directory-heading-actions { align-items: flex-end; flex-direction: column; }.team-card { grid-template-columns: 2.5rem minmax(0,1fr) auto; }.team-card-avatar { width: 2.5rem; height: 2.5rem; }.team-card-status { grid-column: 2; }.team-card-actions { grid-column: 2 / 4; } }

.dashboard-body {
    min-height: 100vh;
}

.honeypot-field {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.dashboard-shell {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    min-height: 100vh;
}

.dashboard-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 1.5rem 1rem;
    background: rgba(var(--bg-rgb), 0.92);
    border-right: 1px solid rgba(var(--primary-strong-rgb), 0.1);
}

.dashboard-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
    margin-bottom: 2.5rem;
}

.dashboard-brand strong,
.dashboard-brand small {
    display: block;
}

.dashboard-brand strong { font-size: 0.9rem; }
.dashboard-brand small { color: var(--muted); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; }

.dashboard-nav { display: grid; gap: 0.25rem; }
.dashboard-nav-label { margin: 1.25rem 0 0.45rem 0.75rem; color: var(--muted); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; }
.dashboard-nav-link,
.dashboard-logout { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0.7rem 0.75rem; border: 0; border-radius: 0.7rem; background: transparent; color: rgba(var(--text-rgb), 0.7); font: inherit; font-size: 0.78rem; text-align: left; cursor: pointer; }
.dashboard-nav-link:hover,
.dashboard-nav-link.is-active,
.dashboard-logout:hover { background: rgba(var(--primary-rgb), 0.1); color: var(--primary-strong); }
.dashboard-sidebar-footer { margin-top: auto; display: grid; gap: 0.25rem; }
.nav-count { color: var(--primary-strong); }

.dashboard-main { min-width: 0; padding: 2rem clamp(1rem, 4vw, 4rem); }
.dashboard-topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2.5rem; }
.dashboard-topbar h1 { margin: 0.35rem 0 0; font-size: clamp(1.8rem, 3vw, 2.6rem); }
.dashboard-user-chip { display: flex; align-items: center; gap: 0.7rem; min-width: 11rem; padding: 0.55rem 0.75rem; border: 1px solid var(--line); border-radius: 0.8rem; color: var(--text); text-decoration: none; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.dashboard-user-chip:hover { border-color: rgba(var(--primary-strong-rgb), .35); background: rgba(var(--primary-rgb), .07); transform: translateY(-1px); }
.dashboard-user-chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.dashboard-user-avatar { position: relative; display: grid; width: 2.4rem; height: 2.4rem; flex: 0 0 2.4rem; place-items: center; border-radius: 0.7rem; background: linear-gradient(135deg, rgba(var(--primary-rgb), .28), rgba(var(--primary-strong-rgb), .08)); color: var(--primary-strong); font-size: .8rem; font-weight: 800; }
.dashboard-user-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.dashboard-user-avatar .presence-dot { position: absolute; right: -.15rem; bottom: -.15rem; width: .48rem; height: .48rem; border: 2px solid rgb(var(--bg-rgb)); box-sizing: content-box; }
.dashboard-user-details { display: grid; min-width: 0; gap: .15rem; }
.dashboard-user-details strong, .dashboard-user-details small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-user-details strong { font-size: .76rem; font-weight: 700; }
.dashboard-user-details small { color: var(--muted); font-size: .62rem; }
.dashboard-duty-bar { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin: -1.25rem 0 1.5rem; padding: 0.7rem 0.8rem; border: 1px solid rgba(var(--primary-strong-rgb), 0.1); border-radius: 0.75rem; color: var(--muted); font-size: 0.75rem; }
.dashboard-duty-bar > span { display: inline-flex; align-items: center; gap: 0.4rem; }
.dashboard-duty-bar form { margin-left: auto; }
.presence-dot { width: 0.55rem; height: 0.55rem; flex: 0 0 auto; border-radius: 50%; background: #718096; box-shadow: 0 0 0 4px rgba(113, 128, 150, 0.12); }
.presence-dot.is-online { background: var(--success); box-shadow: 0 0 0 4px rgba(var(--success-rgb), 0.12); }

.dashboard-welcome { display: flex; justify-content: space-between; gap: 1.5rem; padding: 1.5rem; margin-bottom: 1.25rem; border: 1px solid var(--line); border-radius: 1rem; background: rgba(var(--bg-rgb), 0.62); }
.dashboard-welcome h2 { margin: 0.65rem 0 0.4rem; font-size: clamp(1.4rem, 3vw, 2rem); }
.dashboard-welcome p, .dashboard-panel p { max-width: 650px; color: var(--muted); line-height: 1.7; }
.dashboard-status-panel { min-width: 160px; padding: 0.9rem; border-left: 1px solid var(--line); }
.dashboard-status-panel span, .dashboard-status-panel strong, .dashboard-status-panel small { display: block; }
.dashboard-status-label, .dashboard-status-panel small { color: var(--muted); font-size: 0.72rem; }
.dashboard-status-panel strong { margin: 0.5rem 0; }
.dashboard-status-panel strong .presence-dot { display: inline-block; margin-right: 0.35rem; }

.dashboard-stat-grid, .dashboard-content-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.dashboard-stat-card, .dashboard-panel { padding: 1.25rem; border-radius: 1rem; }
.dashboard-stat-card span, .dashboard-stat-card small, .dashboard-kicker { display: block; color: var(--muted); font-size: 0.72rem; }
.dashboard-stat-card strong { display: block; margin: 0.65rem 0 0.25rem; color: var(--primary-strong); font-size: 2rem; }
.dashboard-content-grid { grid-template-columns: 1.2fr 0.8fr; margin-top: 1rem; }
.dashboard-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.dashboard-panel h3 { margin: 0.35rem 0 0; font-size: 1.1rem; }
.dashboard-empty-state { margin-top: 1rem; padding: 0.9rem; border: 1px dashed rgba(var(--primary-strong-rgb), 0.16); border-radius: 0.75rem; color: var(--muted); font-size: 0.8rem; }
.dashboard-team-row { display: flex; align-items: center; gap: 0.65rem; margin-top: 1.25rem; }
.dashboard-team-row strong, .dashboard-team-row small { display: block; }
.dashboard-team-row small { margin-top: 0.2rem; color: var(--muted); font-size: 0.72rem; }
.status-badge { display: inline-flex; border-radius: 999px; padding: 0.35rem 0.55rem; font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; }
.status-new { color: var(--info); background: rgba(var(--info-rgb), 0.12); }
.status-in_review { color: var(--warning); background: rgba(var(--warning-rgb), 0.12); }
.status-accepted { color: var(--success); background: rgba(var(--success-rgb), 0.12); }
.status-denied { color: var(--danger); background: rgba(var(--danger-rgb), 0.12); }
.status-closed { color: var(--neutral); background: rgba(var(--neutral-rgb), 0.14); }
.dashboard-filter-bar { display: grid; grid-template-columns: 1.5fr 0.8fr auto; gap: 0.75rem; margin: 1.5rem 0; }
.dashboard-filter-button, .query-claim-button { padding: 0.75rem 1rem; border-radius: 0.75rem; }
.attendance-filter-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.attendance-filter-bar[data-range-mode="custom"] { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.attendance-filter-bar:not([data-range-mode="custom"]) .attendance-date-field,
.attendance-filter-bar:not([data-range-mode="custom"]) .date-field:has(.attendance-date-field) { display: none; }
.query-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; border-top: 1px solid rgba(var(--primary-strong-rgb), 0.1); }
.query-row h3 { margin: 0.3rem 0; font-size: 1rem; }
.query-row p, .query-row-meta small { margin: 0; color: var(--muted); font-size: 0.75rem; }
.query-row-meta { display: flex; align-items: flex-end; flex-direction: column; gap: 0.35rem; }
.dashboard-pagination { margin-top: 1rem; color: var(--muted); }
.dashboard-record-link { color: var(--text); }
.dashboard-record-link:hover { color: var(--primary-strong); }
.query-detail-grid, .query-composer-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 1rem; }
.query-composer-grid { margin-top: 1rem; }
.query-detail-sections { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 1.5rem; margin-top: 1.5rem; }
.query-detail-section { min-width: 0; }
.query-detail-section h3, .query-composer-grid h3 { margin: 0.35rem 0 0; }
.query-detail-list { display: grid; gap: 0.65rem; margin: 0.85rem 0; }
.query-detail-list div { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid rgba(var(--primary-strong-rgb), 0.08); }
.query-detail-list dt, .query-detail-list dd { margin: 0; font-size: 0.78rem; }
.query-detail-list dt, .muted-text { color: var(--muted); }
.query-message-copy { white-space: pre-wrap; padding: 1rem; border-radius: 0.75rem; background: rgba(var(--bg-rgb), 0.5); color: var(--text); line-height: 1.7; font-size: 0.85rem; }
.query-action-row, .dashboard-inline-form { display: flex; align-items: end; flex-wrap: wrap; gap: 0.65rem; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid rgba(var(--primary-strong-rgb), 0.1); }
.dashboard-inline-form label { width: 100%; }
.dashboard-inline-form .form-field { flex: 1 1 180px; }
.dashboard-inline-form .dashboard-custom-select { flex: 1 1 180px; min-width: 0; }
.dashboard-panel:has(.dashboard-custom-select.is-open) { position: relative; z-index: 50; }
.query-timeline { display: grid; gap: 1rem; margin-top: 1.25rem; }
.query-timeline-item { position: relative; display: grid; grid-template-columns: 0.75rem 1fr; gap: 0.65rem; }
.timeline-marker { width: 0.55rem; height: 0.55rem; margin-top: 0.25rem; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.12); }
.query-timeline-item strong, .query-timeline-item small { display: block; }
.query-timeline-item small { margin-top: 0.2rem; color: var(--muted); font-size: 0.68rem; }
.query-timeline-item p { margin: 0.45rem 0 0; color: var(--text); font-size: 0.78rem; line-height: 1.6; white-space: pre-wrap; }
.message-internal_note .timeline-marker { background: #f6c76a; box-shadow: 0 0 0 4px rgba(246, 199, 106, 0.12); }
.message-email .timeline-marker { background: var(--success); box-shadow: 0 0 0 4px rgba(var(--success-rgb), 0.12); }

.query-workspace .dashboard-panel {
    border-color: rgba(var(--primary-strong-rgb), .13);
    border-radius: 1.1rem;
    background: linear-gradient(145deg, rgba(var(--bg-2-rgb), .86), rgba(var(--bg-rgb), .78));
    box-shadow: 0 16px 40px rgba(0, 0, 0, .16);
}
.query-workspace .query-overview-card,
.query-workspace .query-history-card,
.query-workspace .query-composer-card { padding: 1.4rem; }
.query-workspace .query-customer-heading,
.query-workspace .query-history-card .dashboard-panel-heading,
.query-workspace .query-composer-heading {
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(var(--primary-strong-rgb), .1);
}
.query-workspace .query-customer-heading h2 { margin: .35rem 0 .25rem; font-size: 1.25rem; letter-spacing: -.02em; }
.query-workspace .query-customer-heading p { margin: 0; color: var(--muted); font-size: .75rem; }
.query-workspace .query-customer-heading .status-badge { border: 1px solid rgba(var(--success-rgb), .16); }
.query-heading-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .5rem; }
.query-heading-actions form { margin: 0; }
.query-workspace .query-detail-sections { grid-template-columns: minmax(0, 1.5fr) minmax(180px, .5fr); gap: 1.25rem; margin-top: 1.15rem; }
.query-workspace .query-handler-card { padding-left: 1.25rem; border-left: 1px solid rgba(var(--primary-strong-rgb), .09); }
.query-workspace .query-handler-card > p { margin: .7rem 0 .2rem; color: var(--text); font-size: .82rem; font-weight: 700; }
.query-workspace .query-handler-card > small { font-size: .66rem; }
.query-workspace .query-detail-list { gap: 0; margin: .7rem 0 .9rem; }
.query-workspace .query-detail-list div { padding: .55rem .15rem; border-bottom-color: rgba(var(--primary-strong-rgb), .08); }
.query-workspace .query-detail-list dt { font-size: .68rem; }
.query-workspace .query-detail-list dd { color: var(--text); font-size: .72rem; font-weight: 650; text-align: right; }
.query-workspace .query-message-copy {
    padding: .95rem 1rem;
    border: 1px solid rgba(var(--primary-strong-rgb), .08);
    border-left: 3px solid rgba(var(--primary-rgb), .55);
    border-radius: .7rem;
    background: rgba(var(--bg-rgb), .42);
    color: rgba(var(--text-rgb), .9);
    font-size: .8rem;
    line-height: 1.7;
    overflow-wrap: anywhere;
}
.query-workspace .dashboard-inline-form { margin-top: 1.15rem; padding-top: 1.1rem; }
.query-workspace .dashboard-inline-form .dashboard-action-button { min-height: 2.65rem; padding-inline: 1.1rem; }
.query-workspace .query-history-card .query-timeline { position: relative; gap: 0; margin-top: 1rem; }
.query-workspace .query-history-card .query-timeline::before { content: ''; position: absolute; top: .3rem; bottom: .75rem; left: .27rem; width: 1px; background: rgba(var(--primary-strong-rgb), .12); }
.query-workspace .query-timeline-item { grid-template-columns: .6rem minmax(0, 1fr); gap: .75rem; padding-bottom: 1.05rem; }
.query-workspace .query-timeline-item:last-child { padding-bottom: 0; }
.query-workspace .timeline-marker { position: relative; z-index: 1; width: .58rem; height: .58rem; border: 2px solid rgb(var(--bg-2-rgb)); }
.query-workspace .query-timeline-item strong { font-size: .78rem; }
.query-workspace .query-timeline-item p { max-width: none; margin-top: .4rem; color: rgba(var(--text-rgb), .88); overflow-wrap: anywhere; }
.query-workspace .query-composer-heading h3 { margin: .3rem 0 0; }
.query-workspace .query-composer-card .dashboard-form { gap: .9rem; margin-top: 1rem; }
.query-workspace .query-composer-card .form-field { border-radius: .75rem; background: rgba(var(--bg-rgb), .48); }
.query-workspace .query-composer-card .form-field:hover { border-color: rgba(var(--primary-strong-rgb), .22); }
.query-workspace .query-composer-card textarea.form-field { min-height: 150px; }
.query-workspace .query-recipient { padding-left: .1rem; font-size: .68rem; }
.query-workspace .query-note-card { border-top-color: rgba(246, 199, 106, .22); }
.query-workspace .query-note-card .dashboard-kicker { color: #d7b45e; }
.query-workspace .secondary-btn:hover { border-color: rgba(var(--primary-strong-rgb), .3); background: rgba(var(--primary-rgb), .06); }

@media (max-width: 1050px) {
    .query-workspace .query-detail-sections { grid-template-columns: 1fr; }
    .query-workspace .query-handler-card { padding: 1rem 0 0; border-top: 1px solid rgba(var(--primary-strong-rgb), .09); border-left: 0; }
}

@media (max-width: 650px) {
    .query-workspace .query-overview-card,
    .query-workspace .query-history-card,
    .query-workspace .query-composer-card { padding: 1rem; }
    .query-workspace .query-detail-list dd { text-align: left; }
}
.status-active { color: var(--success); background: rgba(var(--success-rgb), 0.12); }
.status-suspended, .status-disabled { color: var(--warning); background: rgba(var(--warning-rgb), 0.12); }
.dashboard-action-button { display: inline-flex; width: auto; padding: 0.55rem 0.75rem; border-radius: 0.65rem; font-size: 0.7rem; }
.danger-btn { display: inline-flex; align-items: center; border: 1px solid rgba(252, 165, 165, 0.25); border-radius: 0.65rem; background: rgba(127, 29, 29, 0.15); color: #fca5a5; cursor: pointer; }
.danger-btn:hover { background: rgba(127, 29, 29, 0.3); }
.member-identity, .member-details, .member-actions { display: flex; align-items: center; gap: 0.7rem; }
.member-avatar { display: grid; width: 2.25rem; height: 2.25rem; place-items: center; border-radius: 50%; background: rgba(var(--primary-rgb), 0.14); color: var(--primary-strong); font-weight: 700; }
.member-identity h3 { margin: 0; }
.member-identity p, .member-details small { margin: 0; color: var(--muted); font-size: 0.72rem; }
.member-details { flex-direction: column; align-items: flex-start; }
.member-actions { justify-content: flex-end; }
.dashboard-form-panel { max-width: 920px; }
.dashboard-inline-link { margin: 0; }
.dashboard-wide-form { margin-top: 1.5rem; }
.dashboard-form-two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.dashboard-form-two-col > div, .dashboard-wide-form > div { display: grid; gap: 0.45rem; }
.dashboard-submit-small { width: auto; justify-self: start; padding: 0.8rem 1.2rem; }
.role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.role-card { display: flex; flex-direction: column; gap: 0.75rem; padding: 1rem; border: 1px solid rgba(var(--primary-strong-rgb), 0.1); border-radius: 0.85rem; background: rgba(var(--bg-rgb), 0.4); }
.role-card h3 { margin: 0 0 0.25rem; }
.role-card p { margin: 0; font-size: 0.78rem; }
.role-card small { color: var(--muted); font-size: 0.7rem; }
.role-actions { margin-top: auto; }
.permission-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin-top: 0.5rem; }
.permission-group { min-width: 0; padding: 0.8rem; border: 1px solid rgba(var(--primary-strong-rgb), 0.1); border-radius: 0.75rem; }
.permission-group legend { padding: 0 0.35rem; color: var(--primary-strong); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
.permission-group .dashboard-checkbox { align-items: flex-start; margin: 0.65rem 0; }
.permission-group legend .permission-group-count { margin-left: .4rem; padding: .1rem .35rem; border-radius: 999px; background: rgba(var(--primary-rgb), .14); color: var(--primary-strong); font-size: .6rem; letter-spacing: 0; }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.dashboard-notice { margin-bottom: 1rem; padding: 0.8rem 1rem; border: 1px solid rgba(246, 199, 106, 0.25); border-radius: 0.75rem; background: rgba(246, 199, 106, 0.08); color: #f6c76a; font-size: 0.8rem; }
.dashboard-password-notice { margin-top: -1.25rem; }
.dashboard-password-notice a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 0.2em; }
.dashboard-password-notice a:hover { color: #ffe4a3; }

.dashboard-auth-page { display: grid; min-height: calc(100vh - 160px); place-items: center; padding: 3rem 1rem; }
.dashboard-auth-card { width: min(100%, 440px); padding: clamp(1.5rem, 5vw, 2.5rem); border-radius: 1.2rem; }
.dashboard-auth-heading h1 { margin: 0.8rem 0 0.5rem; font-size: 2.4rem; }
.dashboard-auth-heading p { color: var(--muted); line-height: 1.7; }
.dashboard-form { display: grid; gap: 1rem; margin-top: 1.75rem; }
.dashboard-form > div { display: grid; gap: 0.45rem; }
.dashboard-checkbox { display: flex; align-items: center; gap: 0.5rem; color: var(--muted); font-size: 0.78rem; }
.dashboard-submit { width: 100%; padding: 0.9rem 1rem; border-radius: 0.8rem; font-weight: 700; }

.dashboard-alert { display: block; margin: 0 0 1.25rem; padding: 0.8rem 0.95rem; border: 1px solid rgba(var(--danger-rgb), 0.35); border-radius: 0.7rem; color: var(--danger-soft); background: rgba(var(--danger-rgb), 0.12); font-size: 0.82rem; line-height: 1.5; }
.dashboard-back-link { display: block; margin-top: 1.5rem; color: var(--muted); font-size: 0.75rem; text-align: center; }
.dashboard-back-link:hover { color: var(--primary-strong); }
.password-field-wrap { position: relative; }
.password-field-wrap .form-field { box-sizing: border-box; padding-right: 3rem; }
.password-visibility-toggle { position: absolute; top: 50%; right: 0.65rem; display: grid; width: 2rem; height: 2rem; padding: 0; place-items: center; transform: translateY(-50%); border: 0; border-radius: 0.5rem; background: transparent; color: var(--muted); cursor: pointer; }
.password-visibility-toggle:hover, .password-visibility-toggle:focus-visible { outline: none; background: rgba(var(--primary-rgb), .1); color: var(--primary-strong); }
.password-visibility-toggle svg { width: 1.15rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.password-eye-closed { display: none; }
.password-visibility-toggle[aria-pressed="true"] .password-eye-open { display: none; }
.password-visibility-toggle[aria-pressed="true"] .password-eye-closed { display: block; }

@media (max-width: 900px) {
    .dashboard-shell { grid-template-columns: 1fr; }
    .dashboard-sidebar { position: static; min-height: auto; }
    .dashboard-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-nav-label { grid-column: 1 / -1; }
    .dashboard-sidebar-footer { margin-top: 1rem; }
}

@media (max-width: 650px) {
    .dashboard-main { padding: 1.25rem 1rem; }
    .dashboard-topbar, .dashboard-welcome { align-items: flex-start; flex-direction: column; }
    .dashboard-user-chip { width: 100%; }
    .dashboard-duty-bar form { margin-left: 0; }
    .dashboard-status-panel { width: 100%; border-left: 0; border-top: 1px solid var(--line); }
    .dashboard-stat-grid, .dashboard-content-grid { grid-template-columns: 1fr; }
    .dashboard-filter-bar { grid-template-columns: 1fr; }
    .query-row { align-items: flex-start; flex-direction: column; }
    .query-row-meta { align-items: flex-start; }
    .dashboard-form-two-col, .role-grid, .permission-groups { grid-template-columns: 1fr; }
    .profile-grid { grid-template-columns: 1fr; }
    .member-details, .member-actions { align-items: flex-start; }
    .query-detail-grid, .query-composer-grid, .query-detail-sections { grid-template-columns: 1fr; }
}

* {
    box-sizing: border-box;
}

a {
    text-decoration: none;
}

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

.site-shell {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    color: var(--text);
}

.site-main {
    display: block;
    flex: 1 0 auto;
}

.container {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(18px);
    background: rgba(var(--bg-rgb), 0.62);
    border-bottom: 1px solid rgba(var(--primary-strong-rgb), 0.08);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 82px;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    color: var(--text);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--bg);
    font-weight: 900;
    box-shadow: 0 12px 30px rgba(var(--primary-rgb), 0.25);
    overflow: hidden;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.brand-mark-fallback::before {
    content: 'HP';
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 0.95rem;
    letter-spacing: 0.04em;
}

.brand small {
    color: var(--muted);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.main-nav > a,
.nav-drop-trigger {
    color: rgba(var(--text-rgb), 0.8);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.main-nav > a:hover,
.nav-drop-trigger:hover,
.nav-dropdown:hover .nav-drop-trigger,
.nav-dropdown:focus-within .nav-drop-trigger,
.nav-dropdown-menu a:hover {
    color: var(--primary-strong);
}

.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-drop-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: transparent;
    border: 0;
    appearance: none;
    -webkit-appearance: none;
    padding: 0;
    margin: 0;
    font: inherit;
    line-height: 1;

    color: rgba(var(--text-rgb), 0.8);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}

.nav-chevron {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    display: flex;
    flex-direction: column;
    min-width: 220px;
    padding: 0.7rem;
    background: rgba(var(--bg-rgb), 0.96);
    border: 1px solid rgba(var(--primary-strong-rgb), 0.12);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.nav-dropdown-menu::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -10px;
    height: 10px;
}

.nav-dropdown-menu a {
    display: block;
    width: 100%;
    white-space: nowrap;
    color: rgba(var(--text-rgb), 0.8);
    text-decoration: none;
    padding: 0.65rem 0.8rem;
    border-radius: 10px;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.nav-dropdown:hover .nav-chevron,
.nav-dropdown:focus-within .nav-chevron,
.nav-dropdown.is-open .nav-chevron {
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .main-nav {
        align-items: flex-start;
    }

    .nav-dropdown {
        position: relative;
        display: inline-flex;
    }

    .nav-drop-trigger {
        justify-content: flex-start;
    }

    .nav-dropdown-menu {
        top: calc(100% + 0.5rem);
        left: 0;
        min-width: 220px;
        width: max-content;

        max-width: calc(100vw - 1.5rem);
    }

    .main-nav > .nav-dropdown:last-of-type .nav-dropdown-menu {
        right: 0;
        left: auto;
    }
}

.hero-section {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 2rem;
    padding: 5rem 0 3rem;
}

.hero-copy h1 {
    font-size: clamp(2.7rem, 5vw, 5rem);
    line-height: 0.96;
    letter-spacing: -0.06em;
    margin: 0.8rem 0 1rem;
    max-width: 620px;
}

.hero-copy p {
    max-width: 620px;
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.6rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(var(--primary-strong-rgb), 0.18);
    background: rgba(var(--bg-rgb), 0.5);
    border-radius: 999px;
    padding: 0.65rem 1rem;
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--primary-strong);
}

.cta-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.primary-btn,
.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.4rem;
    border-radius: 14px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--bg);
    box-shadow: 0 18px 42px rgba(var(--primary-rgb), 0.3);
}

.secondary-btn {
    background: rgba(var(--bg-rgb), 0.7);
    border: 1px solid rgba(var(--primary-strong-rgb), 0.14);
    color: var(--text);
}

.primary-btn:hover,
.secondary-btn:hover {
    transform: translateY(-1px);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    max-width: 600px;
}

.stat-card,
.service-card,
.step-card,
.showcase-card,
.feature-panel,
.cta-box,
.contact-shell {
    border: 1px solid rgba(var(--primary-strong-rgb), 0.12);
    background: rgba(var(--bg-rgb), 0.72);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.28);
}

.stat-card {
    border-radius: 20px;
    padding: 1rem 1rem 1.2rem;
}

.stat-card strong {
    display: block;
    font-size: 2rem;
    line-height: 1;
    color: var(--primary-strong);
    margin-bottom: 0.55rem;
}

.stat-card span {
    color: var(--muted);
    font-size: 0.82rem;
}

.hero-panel {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-screen {
    width: min(100%, 520px);
    background: linear-gradient(180deg, rgba(var(--bg-rgb), 0.95), rgba(var(--bg-rgb), 0.8));
    border: 1px solid rgba(var(--primary-strong-rgb), 0.16);
    border-radius: 28px;
    padding: 1rem;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5);
}

.screen-topbar {
    display: flex;
    gap: 0.5rem;
    padding-bottom: 1rem;
}

.screen-topbar span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: rgba(var(--primary-strong-rgb), 0.7);
}

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

.mini-card {
    min-height: 130px;
    border-radius: 20px;
    padding: 1rem;
    background: rgba(18, 35, 48, 0.96);
    border: 1px solid rgba(var(--primary-strong-rgb), 0.1);
    display: flex;
    flex-direction: column;
    justify-content: end;
}

.mini-card.big {
    min-height: 180px;
}

.mini-card.wide {
    grid-column: span 2;
}

.mini-card small {
    color: var(--muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.62rem;
}

.mini-card strong {
    font-size: 1.3rem;
    margin-top: 0.7rem;
}

.mini-card em {
    font-style: normal;
    color: var(--primary-strong);
    margin-top: 0.5rem;
    font-size: 0.72rem;
}

.section-block {
    padding: 4rem 0;
}

.section-header {
    margin-bottom: 2rem;
}

.section-header h2,
.page-header h1,
.feature-panel h2,
.cta-box h2 {
    margin-top: 0.8rem;
    line-height: 1.1;
    letter-spacing: -0.05em;
}

.section-header h2 {
    font-size: clamp(2rem, 3vw, 3rem);
    max-width: 760px;
}

.service-grid,
.showcase-grid,
.process-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.service-card,
.showcase-card,
.step-card {
    border-radius: 26px;
    padding: 1.5rem;
}

.icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    height: 54px;
    border-radius: 16px;
    background: rgba(var(--primary-rgb), 0.08);
    border: 1px solid rgba(var(--primary-strong-rgb), 0.12);
    color: var(--primary-strong);
    font-weight: 800;
    margin-bottom: 1rem;
}

.service-card h3,
.showcase-card h3,
.step-card h3 {
    margin: 0 0 0.8rem;
    font-size: 1.5rem;
}

.service-card p,
.showcase-card p,
.step-card p,
.page-header p,
.feature-list span,
.service-card li {
    color: var(--muted);
    line-height: 1.8;
}

.service-card a {
    display: inline-block;
    margin-top: 1rem;
    color: var(--primary-strong);
    font-weight: 700;
}

.service-card ul {
    margin: 1rem 0 0;
    padding-left: 1.2rem;
}

.alt-panel {
    margin-top: 1rem;
}

.process-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.step-card span {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary-strong);
    font-weight: 800;
    margin-bottom: 1rem;
}

.feature-panel {
    margin-top: 2rem;
    border-radius: 26px;
    padding: 2rem;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.feature-list div {
    padding: 1rem 1rem 0 0;
    border-top: 1px solid rgba(var(--primary-strong-rgb), 0.12);
}

.feature-list strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.page-content {
    padding: 4rem 0 5rem;
}

.page-header {
    margin-bottom: 2.5rem;
}

.page-header h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    max-width: 760px;
    margin: 0.8rem 0 1rem;
}

.page-header p {
    max-width: 760px;
    font-size: 1.08rem;
}

.showcase-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cta-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-radius: 30px;
    padding: 2rem 2.2rem;
}

.cta-box h2 {
    font-size: clamp(2rem, 3vw, 3rem);
    max-width: 700px;
}

.site-footer {
    position: relative;
    width: 100%;
    display: block;
    margin-top: 2rem;
    background: linear-gradient(180deg, rgba(var(--bg-rgb), 0.96), rgba(var(--bg-rgb), 1));
    border-top: 1px solid rgba(var(--primary-strong-rgb), 0.08);
    box-shadow: inset 0 1px 0 rgba(var(--primary-strong-rgb), 0.04), 0 -20px 60px rgba(var(--bg-rgb), 0.35);
}

.site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(var(--primary-rgb), 0.08), transparent 30%);
    pointer-events: none;
}

.footer-inner {
    position: relative;
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 3rem 0 1.25rem;
}

.footer-top {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(120px, 0.65fr) minmax(120px, 0.65fr);
    gap: 2.5rem;
    align-items: start;
    justify-content: end;
}

.footer-brand-block {
    max-width: 760px;
    margin-right: auto;
}

.footer-column {
    justify-self: end;
    min-width: 160px;
}

.footer-brand-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.2rem;
}

.footer-brand-copy {
    display: grid;
    gap: 0.2rem;
}

.footer-brand-copy span {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.footer-brand-copy small {
    color: var(--muted);
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.footer-brand-block p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
    font-size: 1.05rem;
}

.footer-column h4 {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    letter-spacing: -0.03em;
    color: var(--text);
}

.footer-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.6rem;
}

.footer-column li {
    position: relative;
    padding-left: 1rem;
    color: var(--muted);
}

.footer-column li::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-strong);
}

.footer-column a,
.footer-meta-links a {
    color: rgba(var(--text-rgb), 0.8);
    transition: color 0.2s ease;
}

.footer-column a:hover,
.footer-meta-links a:hover {
    color: var(--primary-strong);
}

.footer-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(var(--primary-strong-rgb), 0.08);
}

.footer-meta p {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    text-align: center;
    width: 100%;
}

.footer-meta-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@media (max-width: 900px) {
    .footer-top {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.footer-top-with-contact {
    grid-template-columns: minmax(0, 1.5fr) minmax(110px, 0.55fr) minmax(110px, 0.55fr) minmax(180px, 0.85fr);
    gap: 2rem;
}

.footer-contact {
    min-width: 180px;
}

.footer-contact ul {
    gap: 0.9rem;
}

.footer-contact li {
    display: grid;
    gap: 0.15rem;
    padding-left: 0;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.footer-contact li::before {
    content: none;
}

.footer-contact-label {
    color: var(--muted);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.75;
}

.footer-contact li > span:not(.footer-contact-label),
.footer-contact li > a {
    color: rgba(var(--text-rgb), 0.88);
    font-size: 0.9rem;
}

.footer-contact li > a:hover {
    color: var(--primary-strong);
}

.footer-social {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 1.5rem 0 0;
    padding: 0;
}

.footer-social a {
    position: relative;
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border: 1px solid rgba(var(--primary-strong-rgb), 0.16);
    border-radius: 0.85rem;
    background: rgba(var(--primary-rgb), 0.06);
    color: rgba(var(--text-rgb), 0.78);
    transition: color 0.22s ease, border-color 0.22s ease, background 0.22s ease,
                transform 0.22s ease, box-shadow 0.22s ease;
}

.footer-social .social-icon {
    width: 1.1rem;
    height: 1.1rem;
}

.footer-social a:hover,
.footer-social a:focus-visible {
    border-color: rgba(var(--primary-strong-rgb), 0.5);
    background: rgba(var(--primary-rgb), 0.14);
    color: var(--primary-strong);
    outline: none;
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(var(--primary-rgb), 0.18);
}

@media (max-width: 1080px) {
    .footer-top-with-contact {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 2rem 1.5rem;
    }

    .footer-top-with-contact .footer-brand-block {
        grid-column: 1 / -1;
        max-width: none;
    }

    .footer-top-with-contact .footer-column {
        justify-self: start;
        min-width: 0;
    }
}

@media (max-width: 560px) {
    .footer-top-with-contact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.75rem 1rem;
    }

    .footer-contact {
        grid-column: 1 / -1;
    }
}

@media (max-width: 390px) {
    .footer-top-with-contact {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .footer-top,
    .footer-meta {
        display: grid;
        grid-template-columns: 1fr;
    }

    .footer-brand-block p {
        font-size: 0.96rem;
    }
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 1.5rem;
    align-items: start;
}

.contact-panel,
.contact-card {
    border: 1px solid rgba(var(--primary-strong-rgb), 0.12);
    background: rgba(var(--bg-rgb), 0.72);
    border-radius: 26px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.28);
}

.contact-panel {
    padding: 1.5rem;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.tech-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.65rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(var(--primary-strong-rgb), 0.14);
    background: rgba(var(--bg-rgb), 0.7);
    color: rgba(var(--text-rgb), 0.9);
    font-size: 0.75rem;
    letter-spacing: 0.03em;
}

.mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.75rem;
}

.mini-info {
    border-radius: 20px;
    padding: 1.2rem;
    border: 1px solid rgba(var(--primary-strong-rgb), 0.12);
    background: rgba(var(--bg-rgb), 0.7);
}

.mini-info span {
    display: block;
    color: var(--primary-strong);
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.mini-info strong {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.mini-info p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.contact-card {
    padding: 1.5rem;
}

.contact-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.contact-card-header h3 {
    margin: 0.6rem 0 0;
    font-size: 1.9rem;
    letter-spacing: -0.04em;
}

.small-eyebrow {
    display: inline-flex;
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(var(--primary-strong-rgb), 0.12);
    background: rgba(var(--bg-rgb), 0.5);
    color: var(--primary-strong);
}

.arrow-badge {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary-strong);
    border: 1px solid rgba(var(--primary-strong-rgb), 0.12);
    font-size: 1.6rem;
    font-weight: 700;
}

.contact-card form {
    display: grid;
    gap: 1rem;
}

.input-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.form-field {
    width: 100%;
    border: 1px solid rgba(var(--primary-strong-rgb), 0.12);
    background: rgba(var(--bg-rgb), 0.8);
    color: var(--text);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field:focus {
    outline: none;
    border-color: rgba(var(--primary-rgb), 0.7);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.12);
}

.custom-select {
    position: relative;
    display: block;
}

.custom-select-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    cursor: pointer;
    color: var(--text);
    background: rgba(var(--bg-rgb), 0.8);
    border: 1px solid rgba(var(--primary-strong-rgb), 0.12);
    border-radius: 14px;
    padding: 0.9rem 3.2rem 0.9rem 1rem;
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.custom-select-trigger:focus,
.custom-select.is-open .custom-select-trigger {
    outline: none;
    border-color: rgba(var(--primary-rgb), 0.7);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.12);
}

.custom-select-value {
    display: block;
    color: var(--text);
    font: inherit;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-select-chevron {
    position: absolute;
    right: 1rem;
    top: 50%;
    width: 9px;
    height: 9px;
    border-right: 2px solid rgba(var(--text-rgb), 0.8);
    border-bottom: 2px solid rgba(var(--text-rgb), 0.8);
    transform: translateY(-60%) rotate(45deg);
    transition: transform 0.2s ease;
    pointer-events: none;
}

.custom-select.is-open .custom-select-chevron {
    transform: translateY(-30%) rotate(225deg);
}

.custom-select-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    background: rgba(var(--bg-rgb), 0.98);
    border: 1px solid rgba(var(--primary-strong-rgb), 0.14);
    border-top: none;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    z-index: 25;
}

.custom-select-menu.is-open {
    display: flex;
}

.dashboard-custom-select.is-open .dashboard-custom-select-menu {
    display: flex;
}

.custom-option {
    display: block;
    width: 100%;
    padding: 0.8rem 1rem;
    border: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
    font: inherit;
    font-size: 0.96rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.custom-option[hidden] {
    display: none;
}

.custom-option:hover,
.custom-option:focus-visible {
    background: rgba(var(--primary-rgb), 0.1);
    outline: none;
}

.custom-option.is-selected {
    background: rgba(var(--primary-rgb), 0.16);
    color: #f3feff;
}

.custom-select-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.dashboard-custom-select-menu { max-height: none; overflow: hidden; border: 1px solid rgba(var(--primary-strong-rgb), 0.14); border-radius: 14px; }
.custom-select-options { display: flex; flex-direction: column; max-height: 270px; overflow-y: auto; }
.custom-select-options::-webkit-scrollbar { width: 8px; }
.custom-select-options::-webkit-scrollbar-track { background: rgba(var(--bg-rgb), 0.7); }
.custom-select-options::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(var(--primary-rgb), 0.45); }
.custom-select-search.form-field { position: relative; z-index: 1; flex: 0 0 auto; box-sizing: border-box; width: 100%; margin: 0; padding: 0.85rem 0.8rem; border-radius: 13px 13px 0 0; background: rgb(var(--bg-rgb)); box-shadow: 0 1px 0 rgba(var(--primary-strong-rgb), 0.18); }
.dashboard-checkbox input[type='checkbox'] { position: relative; appearance: none; -webkit-appearance: none; width: 1rem; height: 1rem; flex: 0 0 auto; margin: 0; border: 1px solid rgba(var(--primary-strong-rgb), 0.32); border-radius: 0.3rem; background: rgba(var(--bg-rgb), 0.8); cursor: pointer; transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease; }
.dashboard-checkbox input[type='checkbox']:hover { border-color: var(--primary-strong); }
.dashboard-checkbox input[type='checkbox']:checked { border-color: var(--primary); background: var(--primary); box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.12); }
.dashboard-checkbox input[type='checkbox']:checked::after { content: ''; position: absolute; left: 50%; top: 50%; width: 0.3rem; height: 0.55rem; border: solid var(--bg); border-width: 0 2px 2px 0; transform: translate(-50%, -60%) rotate(45deg); }
.dashboard-checkbox input[type='checkbox']:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(var(--primary-strong-rgb), 0.2); }
.dashboard-checkbox input[type='checkbox']:disabled { opacity: 0.45; cursor: not-allowed; }

textarea.form-field {
    min-height: 150px;
    resize: vertical;
}

.compact-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.35rem;
}

@media (max-width: 980px) {
    .hero-section,
    .service-grid,
    .process-grid,
    .showcase-grid,
    .feature-list,
    .cta-box {
        grid-template-columns: 1fr;
    }

    .hero-section {
        display: block;
    }

    .hero-panel {
        margin-top: 2rem;
    }

    .cta-box {
        display: grid;
    }
}

@media (max-width: 760px) {
    .nav-wrap {
        flex-direction: column;
        justify-content: center;
        padding: 1rem 0;
    }

    .main-nav {
        justify-content: center;
    }

    .stats-grid,
    .mini-grid,
    .service-grid,
    .showcase-grid,
    .process-grid,
    .feature-list,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .cta-box {
        padding: 1.4rem;
    }

    .compact-row,
    .footer-wrap {
        flex-direction: column;
        align-items: flex-start;
    }
}

html {
    scroll-behavior: smooth;
}

body {
    background:
        radial-gradient(circle at top left, rgba(var(--secondary-rgb), 0.22), transparent 22%),
        radial-gradient(circle at bottom right, rgba(var(--highlight-rgb), 0.12), transparent 20%),
        var(--bg);
    color: var(--text);
    font-family: 'Figtree', sans-serif;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: linear-gradient(rgba(var(--primary-strong-rgb), 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--primary-strong-rgb), 0.05) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(circle at center, black 30%, transparent 100%);
    pointer-events: none;
}

.contact-shell {
    position: relative;
    overflow: hidden;
    background: rgba(var(--bg-rgb), 0.7);
    border: 1px solid var(--line);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.contact-shell::before,
.contact-shell::after {
    content: '';
    position: absolute;
    width: 28rem;
    height: 28rem;
    border-radius: 9999px;
    filter: blur(80px);
    opacity: 0.5;
    pointer-events: none;
}

.contact-shell::before {
    background: rgba(var(--primary-rgb), 0.18);
    top: -8rem;
    right: -4rem;
}

.contact-shell::after {
    background: rgba(16, 185, 129, 0.12);
    bottom: -10rem;
    left: -5rem;
}

.glass-card {
    background: rgba(var(--bg-rgb), 0.78);
    border: 1px solid rgba(var(--primary-strong-rgb), 0.12);
    backdrop-filter: blur(18px);
}

.accent-text {
    color: var(--primary-strong);
}

.soft-border {
    border-color: rgba(var(--primary-strong-rgb), 0.12);
}

.parallax-layer {
    will-change: transform;
    transition: transform 0.25s ease-out;
}

.float-card {
    transform: translate3d(0, 0, 0);
    transition: transform 0.2s ease-out;
}

.tech-pill {
    border: 1px solid rgba(var(--primary-strong-rgb), 0.14);
    background: rgba(var(--bg-rgb), 0.7);
}

.form-field {
    width: 100%;
    border-radius: 0.9rem;
    background: rgba(var(--bg-rgb), 0.8);
    border: 1px solid rgba(var(--primary-strong-rgb), 0.12);
    color: var(--text);
    padding: 0.9rem 1rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field:focus {
    border-color: rgba(var(--primary-rgb), 0.7);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.12);
}

.input-label {
    color: var(--muted);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--bg);
    box-shadow: 0 10px 25px rgba(var(--primary-rgb), 0.32);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 35px rgba(var(--primary-rgb), 0.38);
}

.secondary-btn {
    background: rgba(var(--bg-rgb), 0.7);
    border: 1px solid rgba(var(--primary-strong-rgb), 0.14);
    color: var(--text);
}

.fade-in {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .contact-shell {
        border-radius: 1.25rem;
    }
}

.main-nav > a.is-current,
.nav-dropdown.is-current > .nav-drop-trigger {
    color: var(--primary-strong);
}

.main-nav > a.is-current::after {
    content: '';
    display: block;
    height: 2px;
    margin-top: .3rem;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--primary-strong));
}

.nav-dropdown.is-current::after {
    content: '';
    position: absolute;
    right: .9rem;
    bottom: -.45rem;
    left: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--primary-strong));
}

.nav-dropdown:focus-within .nav-drop-trigger { color: rgba(var(--text-rgb), .8); }
.nav-dropdown:hover .nav-drop-trigger,
.nav-dropdown.is-open .nav-drop-trigger,
.nav-dropdown:focus-visible .nav-drop-trigger { color: var(--primary-strong); }
.nav-dropdown.is-current:focus-within .nav-drop-trigger { color: var(--primary-strong); }

html,
body,
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--primary-rgb), .55) rgba(var(--bg-rgb), .6);
}

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

::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(var(--bg-rgb), .6);
}

::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: linear-gradient(var(--primary), var(--secondary));
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover { background: var(--primary-strong); background-clip: padding-box; }

::-webkit-scrollbar-corner { background: transparent; }

html {
    font-size: var(--base-font-size);
}

body,
input,
select,
textarea,
button {
    font-family: var(--body-font);
}

h1, h2, h3, h4, h5, h6,
.brand strong,
.footer-brand-copy span,
.dashboard-brand strong {
    font-family: var(--heading-font);
}

.form-field,
.custom-select-trigger,
.custom-select-menu,
.dashboard-custom-select-menu,
.brand-mark,
.tech-pill,
.social-icon-menu,
.site-media-preview,
.dashboard-alert,
.dashboard-empty-state {
    border-radius: var(--radius);
}

.primary-btn,
.secondary-btn,
.dashboard-filter-button,
.dashboard-action-button,
.dashboard-submit,
.query-claim-button,
.social-row-remove,
.social-add-button,
.footer-social a {
    border-radius: var(--button-radius);
}

.glass-card,
.dashboard-panel,
.dashboard-stat-card,
.stat-card,
.service-card,
.step-card,
.showcase-card,
.feature-panel,
.cta-box,
.contact-shell,
.contact-card,
.contact-panel,
.panel-screen,
.mini-info,
.theme-preview-card {
    border-radius: var(--card-radius);
}

.glass-card,
.dashboard-panel,
.dashboard-sidebar,
.custom-select-menu,
.dashboard-custom-select-menu,
.social-icon-menu,
.topbar {
    backdrop-filter: blur(var(--glass-blur));
}

.glass-card {
    background: rgba(var(--bg-rgb), var(--glass-opacity));
}

.stat-card,
.service-card,
.step-card,
.showcase-card,
.feature-panel,
.cta-box,
.contact-shell,
.dashboard-stat-card,
.dashboard-panel {
    box-shadow: 0 25px 80px rgba(0, 0, 0, var(--shadow-intensity));
}

.panel-screen {
    box-shadow: 0 20px 80px rgba(0, 0, 0, var(--shadow-intensity));
}

.primary-btn {
    box-shadow: 0 18px 42px rgba(var(--primary-rgb), calc(var(--shadow-intensity) * 0.66));
}

.maintenance-bypass-bar {
    position: relative;
    z-index: 120;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.9rem;
    padding: 0.7rem 1.1rem;
    border-bottom: 1px solid rgba(var(--warning-rgb), 0.35);
    background: rgba(var(--warning-rgb), 0.12);
    color: var(--warning-soft);
    font-size: 0.82rem;
}

.maintenance-bypass-bar strong {
    color: var(--warning);
}

.maintenance-bypass-dot {
    width: 0.5rem;
    height: 0.5rem;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--warning);
    box-shadow: 0 0 0 4px rgba(var(--warning-rgb), 0.2);
}

.maintenance-bypass-bar a {
    padding: 0.25rem 0.7rem;
    border: 1px solid rgba(var(--warning-rgb), 0.4);
    border-radius: 999px;
    color: var(--warning-soft);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.maintenance-bypass-bar a:hover {
    background: rgba(var(--warning-rgb), 0.2);
    color: var(--text);
}

.maintenance-bypass-bar span:not(.maintenance-bypass-dot) {
    flex: 1 1 18rem;
    min-width: 0;
}

.maintenance-body {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 2rem 1.25rem;
    background-color: var(--bg);
    color: var(--text);
}

.maintenance-backdrop {
    position: fixed;
    inset: 0;
    z-index: -2;
    background-position: center;
    background-size: cover;
    opacity: 0.28;
    filter: saturate(0.85);
}

.maintenance-backdrop::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 10%, rgba(var(--bg-rgb), 0.92) 85%);
}

.maintenance-shell {
    width: min(100%, 34rem);
}

.maintenance-card {
    position: relative;
    overflow: hidden;
    padding: clamp(1.75rem, 5vw, 2.75rem);
    border-radius: var(--card-radius);
    text-align: center;
    box-shadow: 0 40px 120px rgba(0, 0, 0, var(--shadow-intensity));
}

.maintenance-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 22rem;
    height: 12rem;
    transform: translate(-50%, -60%);
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.28), transparent 70%);
    pointer-events: none;
}

.maintenance-card > * {
    position: relative;
}

.maintenance-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.maintenance-brand-copy {
    display: grid;
    gap: 0.15rem;
}

.maintenance-brand-copy strong {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.maintenance-brand-copy small {
    color: var(--muted);
    font-size: 0.58rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.maintenance-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border: 1px solid rgba(var(--warning-rgb), 0.35);
    border-radius: 999px;
    background: rgba(var(--warning-rgb), 0.1);
    color: var(--warning-soft);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.maintenance-status i {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--warning);
    box-shadow: 0 0 0 0 rgba(var(--warning-rgb), 0.55);
    animation: maintenance-pulse 2.4s ease-out infinite;
}

@keyframes maintenance-pulse {
    70% { box-shadow: 0 0 0 0.55rem rgba(var(--warning-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--warning-rgb), 0); }
}

.maintenance-card h1 {
    margin: 1.15rem 0 0.85rem;
    font-size: clamp(1.7rem, 5vw, 2.4rem);
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.maintenance-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.maintenance-card .maintenance-return {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.55rem 1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(var(--primary-rgb), 0.06);
}

.maintenance-return span {
    color: var(--muted);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.maintenance-return strong {
    color: var(--primary-strong);
    font-size: 0.9rem;
}

.maintenance-footer {
    display: grid;
    justify-items: center;
    gap: 0.9rem;
    margin-top: 1.9rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}

.maintenance-email {
    color: rgba(var(--text-rgb), 0.85);
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.maintenance-email:hover {
    color: var(--primary-strong);
}

.maintenance-social {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.maintenance-social a {
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid rgba(var(--primary-strong-rgb), 0.16);
    border-radius: var(--button-radius);
    background: rgba(var(--primary-rgb), 0.06);
    color: rgba(var(--text-rgb), 0.78);
    transition: color 0.22s ease, border-color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.maintenance-social a:hover {
    border-color: rgba(var(--primary-strong-rgb), 0.5);
    background: rgba(var(--primary-rgb), 0.14);
    color: var(--primary-strong);
    transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
    .maintenance-status i { animation: none; }
}

.date-field {
    position: relative;
    min-width: 0;
}

.date-field .form-field {
    width: 100%;
    padding-right: 2.8rem;

    color-scheme: dark;
}

.date-field input::-webkit-calendar-picker-indicator {
    display: none;
    -webkit-appearance: none;
}

.date-field input::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
}

.date-field-trigger {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    transform: translateY(-50%);
    border: 1px solid transparent;
    border-radius: 0.6rem;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.date-field-trigger svg {
    width: 1.05rem;
    height: 1.05rem;
}

.date-field-trigger:hover,
.date-field.is-open .date-field-trigger {
    border-color: rgba(var(--primary-rgb), 0.35);
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary-strong);
}

.date-field input:disabled ~ .date-field-trigger {
    opacity: 0.4;
    cursor: not-allowed;
}

.date-panel {
    position: absolute;
    z-index: 60;
    top: calc(100% + 0.4rem);
    left: 0;
    padding: 0.75rem;
    border: 1px solid rgba(var(--primary-strong-rgb), 0.22);
    border-radius: var(--radius);
    background: var(--panel-strong);
    box-shadow: 0 24px 60px rgba(var(--bg-rgb), 0.65);
    backdrop-filter: blur(var(--glass-blur));
}

.date-panel[hidden] {
    display: none;
}

.date-field.is-flipped .date-panel {
    top: auto;
    bottom: calc(100% + 0.4rem);
}

.date-panel-body {
    display: flex;
    gap: 0.6rem;
}

.date-calendar {
    width: 15.5rem;
}

.date-panel-head {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr) 2rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.date-panel-title {
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
}

.date-nav {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--line);
    border-radius: 0.55rem;
    background: transparent;
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.date-nav:hover {
    border-color: rgba(var(--primary-rgb), 0.45);
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary-strong);
}

.date-dow,
.date-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.15rem;
}

.date-dow span {
    padding: 0.3rem 0;
    color: var(--muted);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-align: center;
    text-transform: uppercase;
}

.date-day {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    background: transparent;
    color: rgba(var(--text-rgb), 0.85);
    font-size: 0.76rem;
    cursor: pointer;
    transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.date-day:hover,
.date-day:focus-visible {
    border-color: rgba(var(--primary-rgb), 0.45);
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary-strong);
    outline: none;
}

.date-day.is-outside {
    color: rgba(var(--muted-rgb), 0.45);
}

.date-day.is-today {
    border-color: rgba(var(--primary-strong-rgb), 0.35);
}

.date-day.is-selected {
    border-color: transparent;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--bg);
    font-weight: 700;
}

.date-time {
    display: flex;
    gap: 0.3rem;
    padding-left: 0.6rem;
    border-left: 1px solid var(--line);
}

.date-time-col {
    display: grid;
    gap: 0.15rem;
    align-content: start;
    width: 3rem;
    max-height: 15rem;
    overflow-y: auto;
    scrollbar-width: thin;
}

.date-time-option {
    padding: 0.35rem 0;
    border: 1px solid transparent;
    border-radius: 0.45rem;
    background: transparent;
    color: rgba(var(--text-rgb), 0.85);
    font-size: 0.76rem;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.date-time-option:hover {
    border-color: rgba(var(--primary-rgb), 0.45);
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary-strong);
}

.date-time-option.is-selected {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--bg);
    font-weight: 700;
}

.date-panel-foot {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--line);
}

.date-panel-link {
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.date-panel-link:hover {
    border-color: rgba(var(--primary-rgb), 0.45);
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary-strong);
}

.date-panel-link.is-primary {
    color: var(--primary-strong);
}

.dashboard-panel:has(.date-field.is-open) {
    position: relative;
    z-index: 60;
}

@media (max-width: 560px) {
    .date-panel {
        left: auto;
        right: 0;
    }

    .date-panel-body {
        flex-wrap: wrap;
    }

    .date-time {
        width: 100%;
        padding-left: 0;
        padding-top: 0.6rem;
        border-left: 0;
        border-top: 1px solid var(--line);
    }

    .date-time-col {
        flex: 1;
        max-height: 9rem;
    }
}

.role-access {
    display: grid;
    gap: 0.7rem;
}

.role-access-empty {
    margin: 0;
    color: var(--muted);
    font-size: 0.75rem;
    font-style: italic;
}

.role-access-meter {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.role-access-bar {
    flex: 1;
    height: 0.35rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(var(--primary-strong-rgb), 0.12);
}

.role-access-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--secondary), var(--primary-strong));
}

.role-access-count {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 0.7rem;
    white-space: nowrap;
}

.role-access-count strong {
    color: var(--primary-strong);
}

.role-area-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.role-area {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.5rem;
    border: 1px solid rgba(var(--primary-strong-rgb), 0.12);
    border-radius: 999px;
    background: rgba(var(--bg-rgb), 0.4);
    color: rgba(var(--text-rgb), 0.8);
    font-size: 0.66rem;
}

.role-area i {
    display: grid;
    place-items: center;
    min-width: 1.05rem;
    height: 1.05rem;
    padding: 0 0.2rem;
    border-radius: 999px;
    background: rgba(var(--primary-rgb), 0.16);
    color: var(--primary-strong);
    font-size: 0.6rem;
    font-style: normal;
    font-weight: 700;
}

.role-permission-detail summary {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--muted);
    font-size: 0.7rem;
    cursor: pointer;
    list-style: none;
    transition: color 0.15s ease;
}

.role-permission-detail summary::-webkit-details-marker {
    display: none;
}

.role-permission-detail summary::before {
    content: '';
    width: 0.4rem;
    height: 0.4rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.15s ease;
}

.role-permission-detail[open] summary::before {
    transform: rotate(45deg);
}

.role-permission-detail summary:hover {
    color: var(--primary-strong);
}

.role-permission-columns {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
    gap: 0.75rem;
    margin-top: 0.7rem;
    padding: 0.8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(var(--bg-rgb), 0.35);
}

.role-permission-columns h4 {
    margin: 0 0 0.35rem;
    color: var(--primary-strong);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.role-permission-columns ul {
    display: grid;
    gap: 0.2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.role-permission-columns li {
    color: rgba(var(--text-rgb), 0.78);
    font-size: 0.7rem;
}

.role-protected-badge {
    position: relative;
    cursor: help;
    outline: none;
}

.role-protect-field {
    display: grid;
    gap: 0.35rem;
}

.role-protect-field .form-help {
    margin: 0;
    padding-left: 1.5rem;
}

.role-protected-tip {
    position: absolute;
    z-index: 70;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 16rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid rgba(var(--primary-strong-rgb), 0.22);
    border-radius: 0.7rem;
    background: var(--panel-strong);
    box-shadow: 0 18px 40px rgba(var(--bg-rgb), 0.6);
    backdrop-filter: blur(var(--glass-blur));
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.6;
    text-align: left;
    text-transform: none;

    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.25rem);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.role-protected-tip::before {
    content: '';
    position: absolute;
    top: -0.3rem;
    right: 1.1rem;
    width: 0.55rem;
    height: 0.55rem;
    transform: rotate(45deg);
    border-top: 1px solid rgba(var(--primary-strong-rgb), 0.22);
    border-left: 1px solid rgba(var(--primary-strong-rgb), 0.22);
    background: var(--panel-strong);
}

.role-protected-badge:hover .role-protected-tip,
.role-protected-badge:focus-visible .role-protected-tip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.role-protected-badge:focus-visible {
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.25);
}

.role-card:has(.role-protected-badge:hover),
.role-card:has(.role-protected-badge:focus-visible) {
    position: relative;
    z-index: 70;
}

@media (prefers-reduced-motion: reduce) {
    .role-protected-tip { transition: none; }
}

.chat-shell.is-switching .chat-main {
    opacity: 0.55;
    transition: opacity 0.12s ease;
    pointer-events: none;
}

.chat-shell .chat-main {
    transition: opacity 0.18s ease;
}

.chat-attachment-image {
    display: block;
    min-height: 4rem;
}

@media (prefers-reduced-motion: reduce) {
    .chat-shell .chat-main { transition: none; }
}

.dashboard-empty-state:has(strong) {
    display: grid;
    gap: 0.3rem;
    padding: 1.1rem;
    text-align: center;
}

.dashboard-empty-state strong {
    color: var(--text);
    font-size: 0.85rem;
}

.dashboard-empty-state strong + span {
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.6;
}

.brand-mark:has(img) {
    width: 3.1rem;
    height: 3.1rem;
    border-radius: 0;
    background: none;
    box-shadow: none;
    overflow: visible;
}

.brand-mark:has(img) img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.dashboard-brand .brand-mark:has(img) {
    width: 2.6rem;
    height: 2.6rem;
}

@media (max-width: 560px) {
    .brand-mark:has(img) {
        width: 2.7rem;
        height: 2.7rem;
    }
}

@media (max-width: 560px) {
    .dashboard-brand .brand-mark:has(img) {
        width: 2.2rem;
        height: 2.2rem;
    }
}

.chat-avatar,
.chat-dm-avatar {
    border-radius: 50%;
}

.chat-avatar:has(img),
.chat-dm-avatar:has(img) {
    background: none;
}

input[type="checkbox"],
input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    display: inline-grid;
    width: 1.05rem;
    height: 1.05rem;
    flex: 0 0 auto;
    margin: 0;
    place-content: center;
    border: 1px solid rgba(var(--primary-strong-rgb), 0.35);
    background: rgba(var(--bg-rgb), 0.8);
    color: var(--bg);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

input[type="checkbox"] { border-radius: 0.3rem; }
input[type="radio"] { border-radius: 50%; }

input[type="checkbox"]:hover,
input[type="radio"]:hover { border-color: rgba(var(--primary-rgb), 0.7); }

input[type="checkbox"]::before,
input[type="radio"]::before {
    content: "";
    transform: scale(0);
    transition: transform 0.12s ease;
}

input[type="checkbox"]::before {
    width: 0.62rem;
    height: 0.62rem;

    background: currentColor;
    clip-path: polygon(14% 44%, 0 65%, 39% 100%, 100% 22%, 84% 5%, 37% 66%);
}

input[type="radio"]::before {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: currentColor;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    border-color: transparent;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

input[type="checkbox"]:checked::before,
input[type="radio"]:checked::before { transform: scale(1); }

input[type="checkbox"]:indeterminate {
    border-color: transparent;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

input[type="checkbox"]:indeterminate::before {
    width: 0.55rem;
    height: 2px;
    clip-path: none;
    border-radius: 1px;
    transform: scale(1);
}

input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.28);
}

input[type="checkbox"]:disabled,
input[type="radio"]:disabled { opacity: 0.45; cursor: default; }

.pf-toggle input[type="checkbox"],
.sr-only input[type="checkbox"] { appearance: none; }

input[type="range"] { accent-color: var(--primary); }

.topbar-actions { display: flex; align-items: center; gap: 0.9rem; margin-left: 1rem; }
.topbar-actions a { display: inline-flex; align-items: center; color: var(--muted); font-size: 0.78rem; transition: color 0.2s ease; }
.topbar-actions a:hover { color: var(--primary-strong); }
.topbar-actions svg { display: block; }
.topbar-account { white-space: nowrap; }
@media (max-width: 720px) { .topbar-account { display: none; } }

.topbar-account { gap: 0.4rem; }
.topbar-account-text { white-space: nowrap; }
@media (max-width: 860px) { .topbar-account-text { display: none; } }

.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.85rem;
    border: 1px solid rgba(var(--primary-strong-rgb), 0.18);
    border-radius: 10px;
    background: rgba(var(--bg-rgb), 0.7);
    color: var(--muted);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.ghost-btn:hover,
.ghost-btn:focus-visible {
    border-color: rgba(var(--primary-strong-rgb), 0.45);
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-strong);
    outline: none;
}

.ghost-btn.is-danger:hover,
.ghost-btn.is-danger:focus-visible {
    border-color: rgba(var(--danger-rgb), 0.45);
    background: rgba(var(--danger-rgb), 0.1);
    color: var(--danger);
}

.ghost-btn.is-icon {
    width: 2.3rem;
    height: 2.3rem;
    padding: 0;
    font-size: 0.95rem;
}

.ghost-btn.is-icon svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hp-stepper {
    display: inline-flex;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid rgba(var(--primary-strong-rgb), 0.18);
    border-radius: 10px;
    background: rgba(var(--bg-rgb), 0.7);
}

.hp-stepper:focus-within {
    border-color: rgba(var(--primary-strong-rgb), 0.45);
}

.hp-stepper-btn {
    display: grid;
    width: 2rem;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.hp-stepper-btn:hover,
.hp-stepper-btn:focus-visible {
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary-strong);
    outline: none;
}

.hp-stepper-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.hp-stepper-btn svg {
    width: 0.85rem;
    height: 0.85rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.hp-stepper-input {
    width: 2.6rem;
    padding: 0.5rem 0;
    border: 0;
    border-left: 1px solid rgba(var(--primary-strong-rgb), 0.14);
    border-right: 1px solid rgba(var(--primary-strong-rgb), 0.14);
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}

.hp-stepper-input:focus {
    outline: none;
}

.hp-stepper-input::-webkit-outer-spin-button,
.hp-stepper-input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
}

.hp-confirm {
    width: 100%;
    max-width: min(26rem, calc(100vw - 2rem));
    padding: 0;
    border: 0;
    overflow: visible;
    background: transparent;
    color: inherit;
}

.hp-confirm::backdrop {
    background: rgba(var(--bg-rgb), 0.68);
    backdrop-filter: blur(6px);
}

.hp-confirm .dashboard-modal-panel,
.hp-confirm-panel {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.5rem;
    border: 1px solid rgba(var(--primary-strong-rgb), 0.18);
    border-radius: 1.1rem;
    background: rgb(var(--bg-rgb));
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.hp-confirm-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.9rem;
    align-items: start;
}

.hp-confirm-mark {
    display: grid;
    flex: 0 0 auto;
    width: 2.4rem;
    height: 2.4rem;
    place-items: center;
    border-radius: 0.7rem;
    background: rgba(var(--danger-rgb), 0.12);
    color: var(--danger);
}

.hp-confirm-mark svg {
    width: 1.3rem;
    height: 1.3rem;
    max-width: 1.3rem;
    max-height: 1.3rem;
    flex: 0 0 auto;
}

.hp-confirm h2 { margin: 0; font-size: 1rem; letter-spacing: -0.01em; }
.hp-confirm p { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.82rem; line-height: 1.6; }
.hp-confirm p:empty { display: none; }

.hp-confirm-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }
.hp-confirm-actions .hp-btn { padding: 0.5rem 1rem; }

.hp-confirm-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(var(--primary-strong-rgb), 0.2);
    border-radius: 10px;
    background: rgba(var(--bg-rgb), 0.7);
    color: var(--text);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.hp-confirm-actions button.is-danger { border-color: rgba(var(--danger-rgb), 0.4); color: var(--danger); }
.hp-confirm-actions button.is-danger:hover { background: rgba(var(--danger-rgb), 0.1); }
.hp-confirm-actions button.is-primary { border-color: transparent; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: var(--bg); }

:root[data-theme="light"] {
    --bg: #f4f7fa;
    --bg-rgb: 244, 247, 250;
    --bg-2: #ffffff;
    --bg-2-rgb: 255, 255, 255;

    --text: #0f1d26;
    --text-rgb: 15, 29, 38;
    --muted: #55707f;
    --muted-rgb: 85, 112, 127;

    --primary-strong: #0d7183;
    --primary-strong-rgb: 13, 113, 131;

    --line: rgba(15, 29, 38, 0.14);
    --panel: rgba(255, 255, 255, 0.94);
    --panel-strong: #ffffff;

    --glass-opacity: 0.96;

    color-scheme: light;
}

:root[data-theme="light"] body { background: var(--bg); color: var(--text); }
:root[data-theme="light"] .glass-card { border-color: var(--line); box-shadow: 0 10px 30px rgba(15, 29, 38, 0.06); }
:root[data-theme="light"] .hp-picker,
:root[data-theme="light"] .hp-varmenu,
:root[data-theme="light"] .hp-confirm .dashboard-modal-panel { background: #fff; box-shadow: 0 24px 60px rgba(15, 29, 38, 0.18); }
:root[data-theme="light"] .primary-btn { color: #04222a; }

.hp-theme-toggle {
    display: inline-grid;
    width: 2.2rem;
    height: 2.2rem;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(var(--primary-strong-rgb), 0.18);
    border-radius: 999px;
    background: rgba(var(--bg-rgb), 0.6);
    color: var(--muted);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.hp-theme-toggle:hover,
.hp-theme-toggle:focus-visible {
    border-color: rgba(var(--primary-strong-rgb), 0.45);
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary-strong);
    outline: none;
}

.hp-theme-toggle svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.hp-theme-toggle .hp-icon-sun { display: none; }
:root[data-theme="light"] .hp-theme-toggle .hp-icon-sun { display: block; }
:root[data-theme="light"] .hp-theme-toggle .hp-icon-moon { display: none; }

.form-field[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.form-field[type="number"]::-webkit-outer-spin-button,
.form-field[type="number"]::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
}

.hp-map { margin: 2rem 0 0; }
.hp-map-label { margin: 0 0 .75rem; font-size: .95rem; letter-spacing: .02em; color: var(--text); }
.hp-map-frame {
    position: relative;
    height: var(--hp-map-height, 320px);
    border: 1px solid var(--line);
    border-radius: var(--card-radius, 16px);
    overflow: hidden;
    background: var(--panel);
}
.hp-map-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.hp-map-link {
    display: inline-block;
    margin-top: .6rem;
    font-size: .82rem;
    color: var(--link);
    text-decoration: none;
}
.hp-map-link:hover { text-decoration: underline; }

.hp-map.is-footer { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.hp-map.is-footer .hp-map-frame { --hp-map-height: 260px; }

@media (max-width: 560px) {
    .hp-map-frame { height: var(--hp-map-height-sm, 220px); }
}

.chat-receipt { display: inline-flex; align-items: center; gap: 0.25rem; margin-top: 0.3rem; color: var(--muted); font-size: 0.62rem; }
.chat-receipt svg { width: 0.85rem; height: 0.85rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chat-receipt.is-seen { color: var(--primary-strong); }

.mobile-badge { display: inline-grid; place-items: center; width: 1rem; height: 1rem; margin-left: 0.3rem; color: var(--primary-strong); vertical-align: -0.12em; }
.mobile-badge svg { width: 0.78rem; height: 0.78rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.chat-upload { display: inline-flex; align-items: center; gap: 0.45rem; min-width: 0; max-width: 22rem; padding: 0.2rem 0.3rem 0.2rem 0.2rem; border: 1px solid var(--line); border-radius: 999px; background: rgba(var(--primary-rgb), .06); }
.chat-upload[hidden] { display: none; }
.chat-upload-ring { flex: 0 0 auto; width: 1.55rem; height: 1.55rem; transform: rotate(-90deg); }
.chat-upload-track, .chat-upload-fill { fill: none; stroke-width: 3.4; }
.chat-upload-track { stroke: rgba(var(--primary-strong-rgb), .18); }
.chat-upload-fill { stroke: var(--primary); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .15s linear; }
.chat-upload-done { fill: none; stroke: var(--primary-strong); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: rotate(90deg); transform-origin: 18px 18px; transition: opacity .2s ease; }
.chat-upload.is-done .chat-upload-done { opacity: 1; }
.chat-upload.is-failed .chat-upload-fill { stroke: var(--danger); }
.chat-upload-text { display: grid; min-width: 0; line-height: 1.2; }
.chat-upload-text strong { overflow: hidden; color: var(--text); font-size: 0.66rem; text-overflow: ellipsis; white-space: nowrap; }
.chat-upload-text small { color: var(--muted); font-size: 0.58rem; white-space: nowrap; }
.chat-composer-actions .chat-upload-remove { margin-left: 0; padding: 0 0.35rem; background: transparent; color: var(--muted); font-size: 0.95rem; line-height: 1; }
.chat-composer-actions .chat-upload-remove:hover { color: var(--danger); }

.chat-attachment-image { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; }
.chat-attachment-video { max-width: min(22rem, 100%); max-height: 15rem; border-radius: 0.6rem; background: #000; }
.chat-attachment-audio { width: min(22rem, 100%); height: 2.2rem; }
.chat-lightbox { position: fixed; z-index: 200; inset: 0; display: grid; align-content: center; justify-items: center; gap: 0.8rem; padding: 2rem; background: rgba(2, 6, 10, .88); backdrop-filter: blur(4px); }
.chat-lightbox figure { display: grid; justify-items: center; gap: 0.5rem; margin: 0; max-height: 82vh; }
.chat-lightbox img { max-width: min(92vw, 1200px); max-height: 76vh; border-radius: 0.6rem; object-fit: contain; }
.chat-lightbox figcaption { color: var(--muted); font-size: 0.7rem; }
.chat-lightbox-close { position: absolute; top: 1rem; right: 1.2rem; padding: 0.2rem 0.6rem; border: 0; border-radius: 0.5rem; background: transparent; color: var(--text); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.chat-lightbox-download { padding: 0.4rem 0.9rem; border: 1px solid var(--line); border-radius: 0.6rem; color: var(--text); font-size: 0.72rem; }
.chat-lightbox-download:hover { border-color: var(--primary); }

.auth-alternatives { display: grid; gap: 0.6rem; margin-top: 1rem; }
.auth-divider { display: flex; align-items: center; gap: 0.7rem; color: var(--muted); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; }
.auth-divider::before, .auth-divider::after { flex: 1; height: 1px; background: var(--line); content: ''; }
.auth-alt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; padding: 0.65rem 1rem; font-size: 0.8rem; }
.auth-alt-btn svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.auth-alt-note { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.72rem; text-align: center; }
.auth-recovery { margin-top: 1rem; color: var(--muted); font-size: 0.75rem; }
.auth-recovery summary { cursor: pointer; }
.auth-recovery p { margin: 0.5rem 0 0; }
.auth-cancel-form { margin-top: 0.8rem; text-align: center; }
.auth-cancel-form button { border: 0; background: none; }
.code-field { font-size: 1.1rem; letter-spacing: 0.35em; text-align: center; }

.qr-login[hidden],
.auth-alt-btn[hidden],
.ghost-btn[hidden] { display: none; }

.qr-login { display: grid; justify-items: center; gap: 0.7rem; margin-top: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 0.9rem; background: rgba(var(--primary-rgb), .04); }
.qr-login-frame { display: grid; place-items: center; min-width: 200px; min-height: 200px; padding: 0.6rem; border-radius: 0.8rem; background: #fff; }
.qr-login-frame svg { display: block; width: 200px; height: 200px; }
.qr-login-state { margin: 0; color: var(--muted); font-size: 0.74rem; text-align: center; }

.two-factor-setup { display: grid; grid-template-columns: auto 1fr; gap: 1.6rem; align-items: start; }
.two-factor-qr { padding: 0.8rem; border-radius: 0.9rem; background: #fff; }
.two-factor-qr svg { display: block; }
.two-factor-steps { display: grid; gap: 1rem; }
.setup-steps { margin: 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.78rem; line-height: 1.7; }
.setup-secret { display: grid; gap: 0.3rem; }
.setup-secret code { padding: 0.5rem 0.7rem; border: 1px solid var(--line); border-radius: 0.6rem; background: var(--bg-2); font-size: 0.85rem; letter-spacing: 0.12em; }
@media (max-width: 720px) { .two-factor-setup { grid-template-columns: 1fr; justify-items: center; } }

.status-pill { padding: 0.15rem 0.6rem; border: 1px solid var(--line); border-radius: 999px; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; }
.status-pill.is-on { border-color: rgba(var(--primary-rgb), .5); background: rgba(var(--primary-rgb), .12); color: var(--primary-strong); }
.status-pill.is-off { color: var(--muted); }
.recovery-panel { margin-bottom: 1.2rem; }
.recovery-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.4rem; margin: 0.8rem 0; padding: 0; list-style: none; }
.recovery-codes code { display: block; padding: 0.4rem 0.6rem; border: 1px solid var(--line); border-radius: 0.5rem; background: var(--bg-2); font-size: 0.8rem; letter-spacing: 0.06em; }
.recovery-copy { display: flex; gap: 0.6rem; align-items: flex-start; }
.recovery-copy textarea { flex: 1; resize: none; font-size: 0.72rem; }
.passkey-add { margin-top: 0.8rem; }
.passkey-add-row { display: flex; gap: 0.6rem; margin-top: 0.3rem; }
.passkey-add-row .form-field { flex: 1; }
.passkey-list { display: grid; gap: 0.5rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.passkey-row { display: flex; gap: 0.8rem; align-items: center; justify-content: space-between; padding: 0.7rem 0.85rem; border: 1px solid var(--line); border-radius: 0.7rem; }
.passkey-row strong { display: block; font-size: 0.85rem; }
.passkey-row small { color: var(--muted); font-size: 0.68rem; }

.security-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.9rem; margin: 1.25rem 0; }
.security-stat { display: grid; gap: 0.35rem; padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--card-radius, 1rem); background: linear-gradient(180deg, rgba(var(--primary-rgb), .07), transparent 70%); }
.security-stat-value { display: flex; align-items: baseline; gap: 0.3rem; color: var(--text); font-size: 1.85rem; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.security-stat-value small { color: var(--muted); font-size: 0.85rem; font-weight: 500; }
.security-stat-label { color: var(--muted); font-size: 0.72rem; }

.security-form { display: grid; gap: 1.1rem; }
.security-lede { max-width: 62ch; margin: 0 0 1.1rem; line-height: 1.6; }

.security-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.6rem; }
.security-role { display: flex; align-items: center; gap: 0.7rem; padding: 0.8rem 0.95rem; border: 1px solid var(--line); border-radius: 0.8rem; background: rgba(var(--bg-rgb), .35); cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.security-role:hover { border-color: rgba(var(--primary-strong-rgb), .45); transform: translateY(-1px); }
.security-role:has(input:checked) { border-color: var(--primary); background: rgba(var(--primary-rgb), .1); }
.security-role:has(input:focus-visible) { box-shadow: 0 0 0 4px rgba(var(--primary-strong-rgb), .18); }
.security-role input[type='checkbox'] { position: relative; flex: 0 0 auto; width: 1.05rem; height: 1.05rem; margin: 0; appearance: none; -webkit-appearance: none; border: 1px solid rgba(var(--primary-strong-rgb), .35); border-radius: 0.32rem; background: rgba(var(--bg-rgb), .8); cursor: pointer; transition: border-color .18s ease, background .18s ease; }
.security-role input[type='checkbox']:checked { border-color: var(--primary); background: var(--primary); }
.security-role input[type='checkbox']:checked::after { content: ''; position: absolute; left: 50%; top: 50%; width: 0.3rem; height: 0.55rem; border: solid var(--bg); border-width: 0 2px 2px 0; transform: translate(-50%, -60%) rotate(45deg); }
.security-role-body { display: grid; gap: 0.1rem; min-width: 0; }
.security-role-name { color: var(--text); font-size: 0.85rem; font-weight: 600; }
.security-role-note:empty { display: none; }

.security-methods { display: grid; gap: 0.7rem; }
.security-method { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 0.9rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 0.9rem; background: rgba(var(--bg-rgb), .35); cursor: pointer; transition: border-color .18s ease, background .18s ease; }
.security-method:hover { border-color: rgba(var(--primary-strong-rgb), .4); }
.security-method:has(.security-switch:checked) { border-color: rgba(var(--primary-rgb), .55); background: rgba(var(--primary-rgb), .07); }
.security-method:has(.security-switch:focus-visible) { box-shadow: 0 0 0 4px rgba(var(--primary-strong-rgb), .18); }
.security-switch { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.security-switch-track { position: relative; flex: 0 0 auto; width: 2.6rem; height: 1.5rem; margin-top: 0.1rem; border: 1px solid var(--line); border-radius: 999px; background: rgba(var(--bg-rgb), .75); transition: background .2s ease, border-color .2s ease; }
.security-switch-track::after { content: ''; position: absolute; top: 50%; left: 0.18rem; width: 1.05rem; height: 1.05rem; border-radius: 50%; background: var(--muted); transform: translateY(-50%); transition: transform .2s ease, background .2s ease; }
.security-switch:checked + .security-switch-track { border-color: transparent; background: linear-gradient(135deg, var(--primary), var(--secondary, var(--primary-strong))); }
.security-switch:checked + .security-switch-track::after { background: var(--bg); transform: translate(1.05rem, -50%); }
.security-method-copy { display: grid; gap: 0.25rem; min-width: 0; }
.security-method-copy strong { color: var(--text); font-size: 0.9rem; }
.security-method-copy small { max-width: 70ch; color: var(--muted); font-size: 0.74rem; line-height: 1.55; }

.security-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem; }
.security-field { display: grid; gap: 0.35rem; align-content: start; }
.security-field-wide { grid-column: 1 / -1; }
.security-hint { color: var(--muted); font-size: 0.7rem; line-height: 1.5; }
.security-hint code, .security-lede code { padding: 0.1rem 0.35rem; border-radius: 0.35rem; background: rgba(var(--primary-rgb), .12); color: var(--primary-strong); font-size: 0.95em; }
.security-fingerprints { min-height: 5.5rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.72rem; letter-spacing: 0.02em; }

.security-actions { display: flex; justify-content: flex-end; padding-top: 0.25rem; }
.security-actions .primary-btn { padding: 0.75rem 1.6rem; border-radius: 0.8rem; font-weight: 700; }
@media (max-width: 640px) { .security-actions { justify-content: stretch; } .security-actions .primary-btn { width: 100%; } }

.module-notice { display: flex; gap: 0.9rem; align-items: center; margin: 0 0 1.25rem; padding: 0.95rem 1.1rem; border: 1px solid rgba(var(--warning-rgb), .35); border-radius: 0.85rem; background: rgba(var(--warning-rgb), .1); }
.module-notice-mark { display: grid; flex: 0 0 auto; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: rgba(var(--warning-rgb), .16); }
.module-notice-mark svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: var(--warning); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.module-notice-copy { flex: 1; min-width: 0; }
.module-notice-copy strong { display: block; color: var(--warning-soft, var(--warning)); font-size: 0.85rem; }
.module-notice-copy p { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.75rem; line-height: 1.55; }
.module-notice-action { flex: 0 0 auto; }
@media (max-width: 640px) { .module-notice { flex-wrap: wrap; } .module-notice-action { width: 100%; } }
