/* =====================================================================
   Page Forge — Design system (dark · glass · RTL)
   ===================================================================== */
:root {
    --bg: #070812;
    --bg-2: #0c0e1d;
    --surface: rgba(22, 25, 48, 0.55);
    --surface-2: rgba(32, 36, 66, 0.6);
    --border: rgba(148, 163, 255, 0.12);
    --border-strong: rgba(148, 163, 255, 0.26);
    --text: #e8eaff;
    --muted: #8d93bd;
    --accent: hsl(262, 90%, 66%);
    --accent-2: hsl(190, 92%, 56%);
    --accent-3: hsl(326, 88%, 66%);
    --ok: hsl(152, 70%, 52%);
    --warn: hsl(38, 95%, 60%);
    --err: hsl(352, 90%, 64%);
    --grad: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    --grad-hot: linear-gradient(135deg, var(--accent-3) 0%, var(--accent) 100%);
    --radius: 18px;
    --radius-sm: 11px;
    --shadow: 0 20px 60px -20px rgba(0, 0, 0, .65), 0 0 0 1px var(--border) inset;
    --font: 'Cairo', 'Inter', system-ui, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
    --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    font-family: var(--font);
    background: radial-gradient(1200px 700px at 85% -10%, #1b1640 0%, transparent 60%),
                radial-gradient(900px 600px at -10% 110%, #0d2a3a 0%, transparent 60%), var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.3; }
h1 { font-size: 1.7rem; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 1.08rem; font-weight: 700; }
code { font-family: var(--mono); font-size: .85em; background: rgba(139, 92, 246, .14); padding: 1px 6px; border-radius: 6px; color: #c9b8ff; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.mono { font-family: var(--mono) !important; font-size: 13px !important; }
::selection { background: rgba(139, 92, 246, .45); }

/* ---------- animated background orbs ---------- */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-orbs span { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .32; animation: float 22s var(--ease) infinite alternate; }
.bg-orbs span:nth-child(1) { width: 480px; height: 480px; background: var(--accent); top: -120px; right: 10%; }
.bg-orbs span:nth-child(2) { width: 380px; height: 380px; background: var(--accent-2); bottom: -120px; left: 5%; animation-delay: -6s; }
.bg-orbs span:nth-child(3) { width: 300px; height: 300px; background: var(--accent-3); top: 40%; left: 45%; opacity: .16; animation-delay: -12s; }
@keyframes float { to { transform: translate(60px, 40px) scale(1.15); } }

/* ---------- glass ---------- */
.glass {
    background: var(--surface);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; gap: 22px; padding: 22px; }
.sidebar { position: sticky; top: 22px; height: calc(100vh - 44px); border-radius: var(--radius); padding: 22px 16px; display: flex; flex-direction: column; gap: 26px; }
.main { min-width: 0; padding-bottom: 120px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand strong { display: block; font-size: 1.05rem; }
.brand small { display: block; font-size: .78rem; }
.brand-mark {
    width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
    background: var(--grad); font-family: 'Inter'; font-weight: 800; color: #fff; letter-spacing: .02em;
    box-shadow: 0 10px 30px -8px var(--accent);
}
.brand-lg .brand-mark { width: 58px; height: 58px; font-size: 1.25rem; border-radius: 16px; }
.brand-lg h1 { font-size: 1.45rem; }

.nav { display: flex; flex-direction: column; gap: 6px; }
.nav-item {
    all: unset; cursor: pointer; display: flex; align-items: center; gap: 10px;
    padding: 11px 14px; border-radius: 12px; color: var(--muted); font-weight: 600;
    transition: background .25s var(--ease), color .25s, transform .25s var(--ease);
}
.nav-item:hover { background: rgba(255, 255, 255, .04); color: var(--text); transform: translateX(-3px); }
.nav-item.active { background: linear-gradient(135deg, rgba(139, 92, 246, .22), rgba(34, 211, 238, .12)); color: #fff; box-shadow: 0 0 0 1px var(--border-strong) inset; }
.nav-item .ico { width: 22px; text-align: center; }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--muted); font-family: 'Inter'; }
.user-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }

/* ---------- views ---------- */
.view { display: none; animation: viewIn .45s var(--ease); }
.view.active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 6px 4px 22px; flex-wrap: wrap; }
.page-head h1 { background: linear-gradient(90deg, #fff, #c7c9ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.head-actions { display: flex; align-items: center; gap: 12px; }
.autosave { font-size: .8rem; }

/* ---------- cards & steps ---------- */
.card { border-radius: var(--radius); padding: 22px; margin-bottom: 18px; transition: border-color .3s, transform .3s var(--ease); }
.card > h2 { margin-bottom: 14px; }
.step { position: relative; animation: viewIn .5s var(--ease) both; }
.step:nth-of-type(2) { animation-delay: .04s; } .step:nth-of-type(3) { animation-delay: .08s; }
.step:nth-of-type(4) { animation-delay: .12s; } .step:nth-of-type(5) { animation-delay: .16s; }
.step:nth-of-type(6) { animation-delay: .2s; }  .step:nth-of-type(7) { animation-delay: .24s; }
.step:hover { border-color: var(--border-strong); }
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.step-head p { margin: 0; font-size: .85rem; flex-basis: 100%; padding-inline-start: 46px; margin-top: -6px; }
.step-num {
    width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0;
    background: var(--grad); color: #fff; font-weight: 800; font-family: 'Inter'; font-size: .95rem;
    box-shadow: 0 8px 22px -8px var(--accent);
}

.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.align-end { align-items: end; }

/* ---------- form fields ---------- */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; min-width: 0; }
.field > span { font-size: .85rem; color: var(--muted); font-weight: 600; }
input[type=text], input[type=number], input[type=url], input[type=password], input[type=search], select, textarea {
    width: 100%; font: inherit; color: var(--text);
    background: rgba(8, 10, 24, .55); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 11px 14px; outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
}
textarea { resize: vertical; min-height: 90px; line-height: 1.7; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(139, 92, 246, .18); background: rgba(8, 10, 24, .8); }
input::placeholder, textarea::placeholder { color: #5a5f86; }
select { appearance: none; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: 18px 52%, 13px 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-left: 34px; }
select option { background: var(--bg-2); }
input[type=range] { width: 100%; accent-color: var(--accent); }
.hint { font-size: .8rem; color: var(--muted); margin: 4px 0 0; }

.advanced { margin-top: 4px; }
.advanced summary { cursor: pointer; color: var(--muted); font-size: .88rem; font-weight: 600; padding: 6px 0; list-style: none; }
.advanced summary::before { content: '▸ '; display: inline-block; transition: transform .2s; }
.advanced[open] summary::before { transform: rotate(90deg); }
.advanced[open] > .grid { margin-top: 12px; }

.path-input { display: flex; align-items: stretch; direction: ltr; }
.path-base { background: rgba(139, 92, 246, .12); border: 1px solid var(--border); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); padding: 11px 12px; font-family: var(--mono); font-size: 12px; color: #b9a8ff; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.path-input input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* ---------- switch ---------- */
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: .9rem; color: var(--muted); }
.switch input { display: none; }
.switch .slider { width: 44px; height: 24px; border-radius: 99px; background: rgba(255, 255, 255, .1); position: relative; flex-shrink: 0; transition: background .25s; }
.switch .slider::after { content: ''; position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease); }
.switch input:checked + .slider { background: var(--grad); }
.switch input:checked + .slider::after { transform: translateX(-20px); }

/* ---------- buttons ---------- */
.btn {
    font: inherit; font-weight: 700; cursor: pointer; border: 0; border-radius: 12px; padding: 11px 20px;
    color: var(--text); display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    transition: transform .2s var(--ease), box-shadow .25s, background .25s, opacity .2s; white-space: nowrap; text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 30px -10px var(--accent); position: relative; overflow: hidden; }
.btn-primary::after { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); transform: translateX(100%); transition: transform .7s var(--ease); }
.btn-primary:hover { box-shadow: 0 14px 38px -10px var(--accent); transform: translateY(-2px); }
.btn-primary:hover::after { transform: translateX(-100%); }
.btn-ghost { background: rgba(255, 255, 255, .05); box-shadow: 0 0 0 1px var(--border) inset; }
.btn-ghost:hover { background: rgba(255, 255, 255, .09); box-shadow: 0 0 0 1px var(--border-strong) inset; }
.btn-danger { background: rgba(244, 63, 94, .12); color: #ff9aae; box-shadow: 0 0 0 1px rgba(244, 63, 94, .3) inset; }
.btn-danger:hover { background: rgba(244, 63, 94, .22); }
.btn-sm { padding: 8px 14px; font-size: .85rem; border-radius: 10px; }
.btn-mini { padding: 4px 10px; font-size: .75rem; border-radius: 8px; background: rgba(139, 92, 246, .15); color: #cdbcff; }
.btn-mini:hover { background: rgba(139, 92, 246, .3); }
.btn-icon { width: 36px; height: 36px; padding: 0; background: rgba(255, 255, 255, .05); border-radius: 10px; }
.btn-icon:hover { background: rgba(244, 63, 94, .2); }
.btn-block { width: 100%; padding: 13px; }

/* ---------- dropzone ---------- */
.dropzone {
    margin-bottom: 14px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 12px 16px;
    display: flex; align-items: center; gap: 12px; cursor: pointer; color: var(--muted); font-size: .9rem;
    transition: border-color .25s, background .25s, transform .25s var(--ease); min-height: 47px;
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent-2); background: rgba(34, 211, 238, .06); color: var(--text); }
.dropzone.drag { transform: scale(1.015); }
.dz-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(34, 211, 238, .14); color: var(--accent-2); font-weight: 800; }

.template-info { margin-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: .8rem; padding: 5px 11px; border-radius: 99px; background: rgba(255, 255, 255, .05); box-shadow: 0 0 0 1px var(--border) inset; color: var(--muted); }
.chip b { color: var(--text); font-family: 'Inter'; }
.chip.ok { color: var(--ok); box-shadow: 0 0 0 1px rgba(52, 211, 153, .3) inset; }
.chip.warn { color: var(--warn); box-shadow: 0 0 0 1px rgba(251, 191, 36, .3) inset; }
.dates-box { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.dates-box code { direction: ltr; }

/* ---------- list boxes ---------- */
.list-box { display: flex; flex-direction: column; gap: 8px; }
.list-head { display: flex; align-items: center; gap: 8px; }
.list-head b { font-size: .92rem; }
.list-head .btn-mini { margin-inline-start: auto; }
.badge { font-family: 'Inter'; font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--grad); color: #fff; min-width: 26px; text-align: center; transition: transform .25s var(--ease); }
.badge.bump { transform: scale(1.25); }
.badge.zero { background: rgba(255, 255, 255, .08); color: var(--muted); }

.token-row { display: flex; gap: 8px; margin: -6px 0 16px; flex-wrap: wrap; direction: ltr; justify-content: flex-end; }
.token { font-family: var(--mono); font-size: .78rem; cursor: pointer; border: 0; padding: 4px 10px; border-radius: 8px; background: rgba(34, 211, 238, .12); color: #8ae9fb; transition: background .2s, transform .2s var(--ease); }
.token:hover { background: rgba(34, 211, 238, .25); transform: translateY(-2px); }

/* ---------- replacement rows ---------- */
.replace-table { display: flex; flex-direction: column; gap: 10px; }
.replace-row { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr .8fr auto auto; gap: 10px; align-items: center; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, .025); box-shadow: 0 0 0 1px var(--border) inset; animation: viewIn .35s var(--ease); }
.replace-row input, .replace-row select { padding: 9px 12px; font-size: .88rem; }
.replace-row .occ { font-family: 'Inter'; font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.occ.found { background: rgba(52, 211, 153, .14); color: var(--ok); }
.occ.missing { background: rgba(244, 63, 94, .14); color: var(--err); }
.occ.unknown { background: rgba(255, 255, 255, .06); color: var(--muted); }
.replace-head { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr .8fr auto auto; gap: 10px; padding: 0 10px; font-size: .76rem; color: var(--muted); font-weight: 700; }
.row-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
.empty-rows { text-align: center; color: var(--muted); padding: 18px; border: 1.5px dashed var(--border); border-radius: 14px; font-size: .9rem; }

.link-example { font-family: var(--mono); font-size: 12.5px; padding: 12px 14px; border-radius: var(--radius-sm); background: rgba(34, 211, 238, .06); box-shadow: 0 0 0 1px rgba(34, 211, 238, .18) inset; color: #9beefc; word-break: break-all; }
.link-example mark { background: rgba(244, 114, 182, .22); color: #ffb3dc; border-radius: 4px; padding: 0 3px; }

/* ---------- action bar ---------- */
.action-bar {
    position: sticky; bottom: 18px; z-index: 20; border-radius: 18px; padding: 14px 18px;
    display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    background: rgba(18, 20, 42, .82);
}
.action-summary { font-size: .88rem; color: var(--muted); }
.action-summary b { color: var(--text); font-family: 'Inter'; }
.action-btns { display: flex; gap: 10px; }

/* ---------- results ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .035); box-shadow: 0 0 0 1px var(--border) inset; }
.stat small { display: block; color: var(--muted); font-size: .76rem; font-weight: 600; }
.stat strong { font-size: 1.35rem; font-family: 'Inter'; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; word-break: break-all; }
.stat strong.sm { font-size: .95rem; }
.chunk { margin-bottom: 16px; border-radius: 14px; padding: 14px; background: rgba(255, 255, 255, .025); box-shadow: 0 0 0 1px var(--border) inset; }
.chunk-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.chunk-head b { margin-inline-end: auto; }
.chunk textarea { font-family: var(--mono); font-size: 12px; direction: ltr; text-align: left; min-height: 170px; white-space: pre; overflow-x: auto; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 18px; }
.alert { padding: 12px 16px; border-radius: 12px; font-size: .9rem; margin-bottom: 14px; }
.alert-error { background: rgba(244, 63, 94, .12); color: #ffb0bf; box-shadow: 0 0 0 1px rgba(244, 63, 94, .3) inset; }
.alert-warn { background: rgba(251, 191, 36, .1); color: #fde19a; box-shadow: 0 0 0 1px rgba(251, 191, 36, .28) inset; }
.alert-ok { background: rgba(52, 211, 153, .1); color: #a7f3d0; box-shadow: 0 0 0 1px rgba(52, 211, 153, .28) inset; }

/* ---------- preview cards ---------- */
.preview-list { display: flex; flex-direction: column; gap: 10px; }
.preview-item { padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .03); box-shadow: 0 0 0 1px var(--border) inset; animation: viewIn .4s var(--ease) both; }
.preview-item .p-title { font-weight: 700; font-size: 1rem; margin-bottom: 4px; word-break: break-word; }
.preview-item .p-desc { font-size: .86rem; color: var(--muted); margin-bottom: 8px; }
.preview-item .p-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .78rem; font-family: var(--mono); color: #9aa0d0; direction: ltr; justify-content: flex-end; }
.preview-item .p-meta span b { color: #c9b8ff; font-weight: 600; }
.code-view { max-height: 380px; overflow: auto; font-family: var(--mono); font-size: 12px; line-height: 1.6; padding: 14px; border-radius: 12px; background: #05060d; box-shadow: 0 0 0 1px var(--border) inset; direction: ltr; text-align: left; white-space: pre-wrap; word-break: break-all; color: #b8bde6; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th { text-align: start; color: var(--muted); font-weight: 700; font-size: .78rem; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.table td { padding: 11px 12px; border-bottom: 1px solid rgba(148, 163, 255, .06); vertical-align: middle; }
.table tr { transition: background .2s; }
.table tbody tr:hover { background: rgba(255, 255, 255, .025); }
.table td.ltr { direction: ltr; text-align: left; font-family: var(--mono); font-size: .8rem; }
.table .empty { text-align: center; color: var(--muted); padding: 30px; }

/* ---------- projects ---------- */
.search { max-width: 280px; }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.project-card { border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px; transition: transform .3s var(--ease), border-color .3s; animation: viewIn .4s var(--ease) both; }
.project-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.project-card h3 { font-size: 1.05rem; word-break: break-word; }
.project-card .meta { display: flex; flex-wrap: wrap; gap: 6px; }
.project-card .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.empty-state { grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: var(--muted); border: 1.5px dashed var(--border); border-radius: var(--radius); }
.empty-state .big { font-size: 2.4rem; display: block; margin-bottom: 8px; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0; font-size: .88rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-family: var(--mono); font-size: .8rem; direction: ltr; text-align: left; word-break: break-all; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(3, 4, 12, .72); backdrop-filter: blur(6px); animation: fadeIn .25s; }
.modal-panel { position: relative; width: min(1000px, 100%); max-height: calc(100vh - 40px); overflow: auto; border-radius: 22px; padding: 22px 24px; background: rgba(16, 18, 38, .94); animation: pop .35s var(--ease); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; position: sticky; top: -22px; padding: 6px 0; background: inherit; z-index: 2; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.97); } }

/* ---------- busy overlay ---------- */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(5, 6, 15, .78); backdrop-filter: blur(8px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; animation: fadeIn .2s; }
.overlay p { color: var(--muted); font-weight: 600; }
.loader { display: flex; gap: 10px; }
.loader span { width: 14px; height: 14px; border-radius: 50%; background: var(--grad); animation: bounce 1s var(--ease) infinite; }
.loader span:nth-child(2) { animation-delay: .15s; } .loader span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 50% { transform: translateY(-16px); opacity: .5; } }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 22px; bottom: 22px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast { min-width: 260px; max-width: 420px; padding: 12px 16px; border-radius: 13px; font-size: .9rem; font-weight: 600; background: rgba(20, 22, 46, .95); box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .7), 0 0 0 1px var(--border-strong) inset; border-inline-start: 4px solid var(--accent); animation: toastIn .4s var(--ease); }
.toast.ok { border-color: var(--ok); } .toast.err { border-color: var(--err); } .toast.warn { border-color: var(--warn); }
.toast.out { opacity: 0; transform: translateX(-20px); transition: all .3s; }
@keyframes toastIn { from { opacity: 0; transform: translateX(-30px); } }

/* ---------- auth page ---------- */
.auth-body { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.auth-card { width: min(430px, 100%); border-radius: 24px; padding: 34px 30px; animation: pop .5s var(--ease); }
.auth-card .brand { margin-bottom: 26px; }
.auth-card .brand p { margin: 2px 0 0; font-size: .88rem; }
.auth-form .btn { margin-top: 8px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
    .replace-row, .replace-head { grid-template-columns: 1fr 1fr; }
    .replace-head { display: none; }
}
@media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; padding: 12px; gap: 12px; }
    .sidebar { position: relative; top: 0; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 14px; gap: 12px; }
    .nav { flex-direction: row; flex-wrap: wrap; }
    .nav-item { padding: 8px 12px; }
    .sidebar-foot { margin: 0; margin-inline-start: auto; }
    .g-2, .g-3 { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
}
