* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #f4f6fb;
    --card: #ffffff;
    --border: #e2e6ef;
    --text: #1f2430;
    --muted: #6b7280;
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --danger: #dc2626;
    --ok: #16a34a;
    --warn: #d97706;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(31, 36, 48, 0.08);
}

body {
    font-family: "Segoe UI", "Heebo", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.hidden { display: none !important; }

.topbar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.auth-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-email {
    font-size: 14px;
    color: var(--muted);
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 32px 20px 60px;
    width: 100%;
    flex: 1;
}

.hero {
    text-align: center;
    margin-bottom: 28px;
}

.hero h2 { font-size: 30px; margin-bottom: 8px; }
.hero .muted { font-size: 15px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }

.upload-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 32px;
}

.dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 48px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--primary);
    background: #eef2ff;
}

.dropzone.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.dropzone-icon {
    font-size: 36px;
    margin-bottom: 10px;
    color: var(--primary);
}

.dropzone-inner p { font-size: 16px; }
.dropzone-inner .muted { margin-top: 6px; }

.progress-wrap { margin-top: 16px; }

.progress-bar {
    height: 10px;
    background: var(--border);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary), #818cf8);
    border-radius: 999px;
    transition: width 0.15s;
}

#progressText { margin-top: 8px; }

.upload-queue {
    margin-top: 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.queue-head,
.queue-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #fafbfe;
}

.queue-head > div {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.queue-list {
    list-style: none;
    max-height: 260px;
    overflow-y: auto;
}

.queue-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-top: 1px solid var(--border);
}

.queue-remove {
    flex-shrink: 0;
    padding: 5px 8px;
    border: 0;
    background: transparent;
    color: var(--danger);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.queue-remove:disabled { opacity: 0.5; cursor: not-allowed; }

.queue-actions {
    justify-content: flex-start;
    border-top: 1px solid var(--border);
}

.files-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

.files-section + .files-section { margin-top: 24px; }

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.section-head h3 { font-size: 18px; }

.storage-wrap {
    margin-bottom: 16px;
    padding: 12px 14px;
    background: #fafbfe;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.storage-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.storage-bar {
    height: 7px;
    overflow: hidden;
    background: var(--border);
    border-radius: 999px;
}

.storage-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #818cf8);
    border-radius: inherit;
    transition: width 0.2s;
}

.badge {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
}

.badge.warn { background: #fef3c7; color: var(--warn); }
.badge.ok { background: #dcfce7; color: var(--ok); }

.file-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-list:empty::after {
    content: "אין קבצים עדיין.";
    display: block;
    color: var(--muted);
    font-size: 14px;
    padding: 12px 0;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #fafbfe;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.file-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 600;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-meta { font-size: 12px; color: var(--muted); }

.visibility {
    display: inline-block;
    font-weight: 700;
}

.visibility.public { color: var(--ok); }
.visibility.private { color: var(--muted); }

.file-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.link-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 6px;
}

.link-input {
    flex: 1;
    font-size: 12px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    direction: ltr;
    text-align: left;
}

.expiry-tag {
    font-size: 12px;
    font-weight: 600;
    color: var(--warn);
}

.btn {
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover { background: var(--primary-dark); }

.btn-share {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}

.btn-share:hover { background: #d1fae5; }

.btn-ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text);
}

.btn-ghost:hover { background: var(--bg); }

.btn-danger {
    background: #fef2f2;
    color: var(--danger);
    border-color: #fecaca;
}

.btn-danger:hover { background: #fee2e2; }

.btn-small { padding: 5px 10px; font-size: 13px; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 700px) {
    .file-item { align-items: flex-start; flex-wrap: wrap; }
    .file-actions { width: 100%; flex-wrap: wrap; }
    .file-actions .btn { flex: 1 1 auto; }
    .queue-head { align-items: flex-start; }
    .queue-head > div { align-items: flex-start; flex-direction: column; gap: 2px; }
    .queue-actions .btn { flex: 1; }
}

.footer {
    text-align: center;
    padding: 24px 20px;
    border-top: 1px solid var(--border);
    background: var(--card);
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 18, 25, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 20px;
}

.modal-box {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 420px;
    padding: 28px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 12px;
    left: 12px;
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--muted);
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.modal-close:hover { background: var(--bg); color: var(--text); }

.modal-box h3 {
    font-size: 20px;
    margin-bottom: 6px;
}

.modal-box .muted { font-size: 13px; margin-bottom: 18px; }

.field { margin-bottom: 14px; }

.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.field input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
}

.field input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.form-msg {
    font-size: 13px;
    margin-top: 10px;
    padding: 10px;
    border-radius: 8px;
}

.form-msg.err { background: #fef2f2; color: var(--danger); }
.form-msg.ok { background: #f0fdf4; color: var(--ok); }

.otp-input {
    letter-spacing: 8px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
}

.switch-line {
    font-size: 13px;
    color: var(--muted);
    text-align: center;
    margin-top: 14px;
}

.switch-line button {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
}

.countdown { font-weight: 700; color: var(--warn); }

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    right: 50%;
    transform: translateX(50%);
    background: #111827;
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    z-index: 100;
    max-width: 90vw;
}

.toast.ok { background: #14532d; }
.toast.err { background: #7f1d1d; }

/* Dev email box */
.dev-box {
    margin-top: 12px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 12px;
    padding: 10px;
    border-radius: 8px;
    word-break: break-all;
    direction: ltr;
    text-align: left;
}

/* v1.08 visual system */
:root {
    --bg: #f1eee5;
    --card: #fffdf7;
    --border: #d8d2c4;
    --text: #182827;
    --muted: #687472;
    --primary: #e45b2b;
    --primary-dark: #b93f18;
    --accent: #0d756d;
    --danger: #b42318;
    --ok: #167557;
    --warn: #a65d08;
    --radius: 16px;
    --shadow: 0 8px 0 rgba(24, 40, 39, 0.08), 0 18px 50px rgba(24, 40, 39, 0.08);
}

html { scroll-behavior: smooth; }

body {
    background:
        radial-gradient(circle at 12% 8%, rgba(228, 91, 43, 0.10), transparent 26rem),
        radial-gradient(circle at 88% 34%, rgba(13, 117, 109, 0.09), transparent 24rem),
        var(--bg);
    font-family: "Segoe UI", "Arial Hebrew", Arial, sans-serif;
    line-height: 1.5;
}

button, input, a { -webkit-tap-highlight-color: transparent; }

:focus-visible {
    outline: 3px solid rgba(228, 91, 43, 0.42);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    top: 8px;
    right: 8px;
    z-index: 200;
    padding: 9px 14px;
    color: #fff;
    background: var(--text);
    border-radius: 8px;
    transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.topbar {
    padding: 12px 0;
    background: rgba(255, 253, 247, 0.88);
    border-color: rgba(24, 40, 39, 0.14);
    backdrop-filter: blur(14px);
}

.topbar-inner,
.container { max-width: 1060px; }

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #fff;
    background: var(--text);
    border-radius: 12px 12px 4px 12px;
    font-size: 22px;
    font-weight: 900;
    transform: rotate(-3deg);
}

.brand {
    color: var(--text);
    font-size: 21px;
    line-height: 1;
    letter-spacing: 0.04em;
}

.brand-subtitle {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.container { padding-top: 52px; }

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
    align-items: end;
    gap: 52px;
    margin-bottom: 42px;
    text-align: right;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero h2 {
    margin: 0 0 16px;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 0.96;
    letter-spacing: -0.055em;
}

.hero h2 span { color: var(--primary); }

.hero-copy > p {
    max-width: 640px;
    color: var(--muted);
    font-size: 17px;
}

.hero-notes {
    border-top: 2px solid var(--text);
}

.hero-notes > div {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.hero-notes strong {
    color: var(--primary);
    font-size: 12px;
}

.hero-notes span {
    font-size: 13px;
    font-weight: 650;
    line-height: 1.35;
}

.upload-card,
.files-section {
    border: 1px solid rgba(24, 40, 39, 0.22);
    box-shadow: var(--shadow);
}

.upload-card { padding: 24px; }

.upload-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.upload-card-head > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload-card-head h3 { font-size: 19px; }

.step-number,
.limit-note {
    padding: 5px 9px;
    color: var(--accent);
    background: #e5f2ef;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.limit-note {
    color: var(--muted);
    background: #f0ece2;
}

.dropzone {
    position: relative;
    overflow: hidden;
    padding: 58px 20px;
    background: #f8f4ea;
    border: 2px dashed #aaa394;
}

.dropzone::before {
    content: "";
    position: absolute;
    top: -42px;
    left: -30px;
    width: 130px;
    height: 130px;
    background: rgba(228, 91, 43, 0.10);
    border-radius: 50%;
}

.dropzone:hover,
.dropzone.dragover {
    background: #fff8ed;
    border-color: var(--primary);
}

.dropzone-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin: 0 auto 14px;
    color: #fff;
    background: var(--primary);
    border-radius: 50% 50% 14px 50%;
    font-size: 34px;
    line-height: 1;
}

.dropzone-inner > p:first-of-type { font-size: 18px; font-weight: 750; }

.queue-head,
.queue-actions,
.storage-wrap,
.file-item { background: #f8f5ed; }

.queue-item { background: var(--card); }

.progress-bar span,
.storage-bar span { background: var(--primary); }

.files-section { margin-top: 38px; padding: 24px; }

.section-head h3 { font-size: 22px; }

.file-item {
    border-color: rgba(24, 40, 39, 0.13);
    transition: transform 0.16s, border-color 0.16s, background 0.16s;
}

.file-item:hover {
    background: #fffaf0;
    border-color: rgba(228, 91, 43, 0.5);
    transform: translateX(-2px);
}

.btn {
    min-height: 38px;
    border-radius: 10px;
    transition: transform 0.14s, background 0.14s, border-color 0.14s;
}

.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn-primary { box-shadow: 0 3px 0 var(--primary-dark); }
.btn-share { background: #e7f3ef; border-color: #a4cec4; color: var(--accent); }
.btn-ghost { background: rgba(255, 253, 247, 0.55); }

.footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    background: transparent;
    border-color: rgba(24, 40, 39, 0.12);
}

.footer-link { color: var(--accent); font-size: 12px; font-weight: 700; }

.modal { background: rgba(24, 40, 39, 0.68); backdrop-filter: blur(5px); }
.modal-box { border: 1px solid rgba(24, 40, 39, 0.2); box-shadow: 0 12px 0 rgba(24, 40, 39, 0.18); }
.field input { background: #fffefb; min-height: 44px; }
.field input:focus { box-shadow: 0 0 0 3px rgba(228, 91, 43, 0.16); }

.auth-body {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
}

.auth-card {
    width: min(100%, 520px);
    padding: 52px 42px;
    text-align: center;
    background: var(--card);
    border: 1px solid rgba(24, 40, 39, 0.22);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.auth-icon {
    display: grid;
    place-items: center;
    width: 74px;
    height: 74px;
    margin: 0 auto 22px;
    color: #fff;
    background: var(--ok);
    border-radius: 50% 50% 16px 50%;
    font-size: 38px;
    font-weight: 900;
}

.auth-error .auth-icon { background: var(--danger); }
.auth-card h1 { margin-bottom: 10px; font-size: 30px; }
.auth-card p { margin-bottom: 26px; color: var(--muted); }

.check-page { width: min(100%, 900px); margin: 0 auto; padding: 48px 20px 70px; }
.check-header { margin-bottom: 28px; }
.check-header h1 { margin: 10px 0 8px; font-size: clamp(34px, 6vw, 54px); letter-spacing: -0.04em; }
.check-summary { display: inline-flex; padding: 7px 12px; border-radius: 999px; font-weight: 800; }
.check-summary.pass { color: var(--ok); background: #e2f2e9; }
.check-summary.fail { color: var(--danger); background: #fce7e5; }
.check-list { display: grid; gap: 10px; list-style: none; }
.check-item { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 16px; background: var(--card); border: 1px solid var(--border); border-radius: 13px; }
.check-status { display: grid; place-items: center; width: 28px; height: 28px; color: #fff; background: var(--ok); border-radius: 50%; font-weight: 900; }
.check-item.fail .check-status { background: var(--danger); }
.check-item.warn .check-status { background: var(--warn); }
.check-item strong { display: block; margin-bottom: 2px; }
.check-item p { color: var(--muted); font-size: 13px; }
.check-actions { display: flex; gap: 10px; margin-top: 24px; }

@media (max-width: 760px) {
    .topbar-inner { padding: 0 14px; }
    .brand-subtitle, .user-email { display: none; }
    .auth-actions { gap: 6px; }
    .auth-actions .btn { padding: 7px 10px; font-size: 12px; }
    .container { padding: 34px 14px 48px; }
    .hero { grid-template-columns: 1fr; gap: 26px; margin-bottom: 30px; }
    .hero h2 { font-size: clamp(40px, 13vw, 58px); }
    .hero-notes { display: grid; grid-template-columns: repeat(3, 1fr); }
    .hero-notes > div { display: block; padding: 10px 6px; border-bottom: 0; border-left: 1px solid var(--border); }
    .hero-notes > div:last-child { border-left: 0; }
    .hero-notes strong, .hero-notes span { display: block; }
    .hero-notes span { margin-top: 5px; font-size: 11px; }
    .upload-card, .files-section { padding: 15px; border-radius: 14px; }
    .upload-card-head { align-items: flex-start; }
    .upload-card-head > div { align-items: flex-start; flex-direction: column; gap: 5px; }
    .dropzone { padding: 42px 12px; }
    .file-actions { display: grid; grid-template-columns: repeat(2, 1fr); }
    .file-actions .btn { width: 100%; }
    .auth-card { padding: 38px 22px; }
    .check-page { padding-top: 30px; }
    .check-actions { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

.hero.hero-simple {
    display: block;
    margin-bottom: 28px;
    text-align: center;
}

.hero-simple h2 {
    margin: 0;
    font-size: clamp(32px, 6vw, 48px);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

/* Header restored to the v1.07 layout. */
.topbar {
    padding: 14px 0;
    background: #ffffff;
    border-bottom: 1px solid #e2e6ef;
    backdrop-filter: none;
}

.topbar-inner {
    max-width: 860px;
    padding: 0 20px;
}

.topbar .brand {
    color: #4f46e5;
    font-size: 24px;
    font-weight: 800;
    line-height: normal;
    letter-spacing: -0.5px;
}

.topbar .btn {
    min-height: 0;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: none;
}

.topbar .btn:hover:not(:disabled) { transform: none; }
.topbar .btn-primary { background: #4f46e5; }
.topbar .btn-primary:hover { background: #4338ca; }
.topbar .btn-ghost { color: #1f2430; background: transparent; border-color: #e2e6ef; }
.topbar .btn-ghost:hover { background: #f4f6fb; }

@media (max-width: 760px) {
    .topbar-inner { padding: 0 14px; }
    .topbar .btn { padding: 7px 10px; font-size: 12px; }
}

/* Admin dashboard */
.admin-body { background: #f5f6fa; }
.admin-topbar .topbar-inner { max-width: 1180px; }

.admin-page {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: 36px 20px 70px;
}

.admin-heading {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(520px, 1.35fr);
    align-items: center;
    justify-content: space-between;
    gap: 36px;
    margin-bottom: 26px;
}

.admin-heading h2 { margin: 4px 0 7px; font-size: clamp(30px, 4vw, 42px); line-height: 1.1; letter-spacing: -0.04em; }
.admin-heading .muted { max-width: 440px; font-size: 14px; }

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.admin-stats > div { min-width: 0; padding: 15px 16px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 2px 8px rgba(31,36,48,.04); }
.admin-stats strong, .admin-stats span { display: block; }
.admin-stats strong { overflow: hidden; color: var(--text); font-size: 19px; text-overflow: ellipsis; white-space: nowrap; }
.admin-stats span { margin-top: 2px; color: var(--muted); font-size: 11px; }

.admin-tabs {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.admin-tab {
    position: relative;
    padding: 11px 2px 13px;
    color: var(--muted);
    background: transparent;
    border: 0;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.admin-tab span { display: inline-grid; min-width: 22px; height: 22px; margin-inline-start: 5px; padding: 0 6px; place-items: center; background: #e9ecf4; border-radius: 99px; color: var(--muted); font-size: 11px; }
.admin-tab.active { color: var(--primary); }
.admin-tab.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; background: var(--primary); border-radius: 3px 3px 0 0; content: ""; }
.admin-tab.active span { color: var(--primary); background: #eef2ff; }
.admin-panel { min-height: 300px; }
.admin-toolbar { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 14px; }

.admin-search { position: relative; width: min(100%, 430px); }
.admin-search > span { position: absolute; top: 50%; right: 13px; color: var(--muted); font-size: 22px; line-height: 1; transform: translateY(-53%); pointer-events: none; }
.admin-search input {
    width: 100%;
    min-height: 42px;
    padding: 8px 40px 8px 13px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
}
.admin-search input:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.1); }

.admin-user-list { display: grid; gap: 10px; }
.admin-user-card { overflow: hidden; background: var(--card); border: 1px solid var(--border); border-radius: 13px; box-shadow: 0 2px 7px rgba(31,36,48,.035); }
.admin-user-card[open] { border-color: #cbd1df; box-shadow: 0 8px 24px rgba(31,36,48,.07); }
.admin-user-summary { display: grid; grid-template-columns: minmax(250px, 1fr) 175px auto 18px; align-items: center; gap: 22px; padding: 15px 18px; cursor: pointer; list-style: none; }
.admin-user-summary::-webkit-details-marker { display: none; }
.admin-user-summary::after { color: var(--muted); font-size: 18px; content: "⌄"; transition: transform .16s; }
.admin-user-card[open] .admin-user-summary::after { transform: rotate(180deg); }
.admin-user-summary:hover { background: #fafbfe; }
.admin-user-identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.admin-avatar { display: grid; flex: 0 0 38px; height: 38px; place-items: center; color: var(--primary); background: #eef2ff; border-radius: 10px; font-weight: 800; }
.admin-user-card h3 { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-card h3 .badge { margin-inline-start: 5px; vertical-align: 1px; }
.admin-user-card p { margin-top: 3px; color: var(--muted); font-size: 11px; }
.admin-user-usage { min-width: 0; }
.admin-user-usage strong, .admin-user-usage span { display: block; }
.admin-user-usage strong { font-size: 14px; }
.admin-user-usage span { overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.account-state { padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.account-state.active { color: var(--ok); background: #e2f2e9; }
.account-state.pending { color: var(--warn); background: #fff1d7; }
.account-state.blocked { color: var(--danger); background: #fce7e5; }

.admin-user-body { padding: 18px; border-top: 1px solid var(--border); background: #fcfcfe; }
.admin-storage { margin-bottom: 17px; }
.admin-storage > div { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; color: var(--muted); font-size: 11px; }
.admin-storage > div strong { color: var(--text); font-size: 11px; }
.admin-storage i { display: block; height: 7px; overflow: hidden; background: var(--border); border-radius: 99px; }
.admin-storage b { display: block; height: 100%; background: var(--primary); border-radius: inherit; }

.admin-settings-grid {
    display: grid;
    grid-template-columns: minmax(220px, .72fr) minmax(420px, 1.5fr);
    gap: 12px;
}
.admin-setting-group { padding: 15px; background: var(--card); border: 1px solid var(--border); border-radius: 11px; }
.admin-setting-group h4 { font-size: 13px; }
.admin-setting-group > p, .admin-setting-title p { margin-top: 2px; color: var(--muted); font-size: 11px; }
.admin-checks { display: grid; gap: 9px; margin-top: 13px; }
.admin-checks .check-control { display: flex; align-items: center; gap: 9px; padding: 8px 9px; background: #f8f9fc; border-radius: 8px; color: var(--text); }
.admin-checks .check-control span { min-width: 0; }
.admin-checks .check-control strong, .admin-checks .check-control small { display: block; }
.admin-checks .check-control strong { font-size: 12px; }
.admin-checks .check-control small { margin-top: 1px; color: var(--muted); font-size: 10px; }
.check-control input { width: 17px; height: 17px; accent-color: var(--primary); }
.admin-setting-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.default-toggle { display: flex; align-items: center; gap: 7px; color: var(--text); font-size: 11px; font-weight: 700; white-space: nowrap; }
.default-toggle input { width: 16px; height: 16px; accent-color: var(--primary); }
.admin-limit-fields { display: grid; grid-template-columns: repeat(3, minmax(110px, 1fr)); gap: 9px; margin-top: 13px; }
.admin-limit-fields label { color: var(--text); font-size: 11px; font-weight: 700; }
.admin-limit-fields label > span { color: var(--muted); font-size: 10px; font-weight: 500; }
.admin-limit-fields input { width: 100%; margin-top: 5px; padding: 8px 9px; background: #fff; border: 1px solid var(--border); border-radius: 7px; font-family: inherit; }
.admin-limit-fields input:focus { outline: 0; border-color: var(--primary); }
.admin-limit-fields input:disabled { color: #9298a6; background: #f2f3f6; cursor: not-allowed; }
.admin-password-group { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(210px, .7fr) minmax(440px, 1.5fr); align-items: end; gap: 22px; }
.admin-password-fields { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 9px; }
.admin-password-fields label { color: var(--text); font-size: 11px; font-weight: 700; }
.admin-password-fields input { width: 100%; margin-top: 5px; padding: 8px 9px; background: #fff; border: 1px solid var(--border); border-radius: 7px; font-family: inherit; }
.admin-password-fields input:focus { outline: 0; border-color: var(--primary); }
.admin-password-fields .btn { min-height: 34px; white-space: nowrap; }
.admin-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.admin-card-actions > div { display: flex; flex-wrap: wrap; gap: 7px; }

.admin-file-list, .audit-list { display: grid; gap: 8px; }
.admin-file-row { display: grid; grid-template-columns: 38px minmax(180px, 1fr) 145px auto; align-items: center; gap: 13px; padding: 13px 15px; background: var(--card); border: 1px solid var(--border); border-radius: 11px; }
.admin-file-icon { display: grid; width: 36px; height: 36px; place-items: center; color: var(--primary); background: #eef2ff; border-radius: 9px; font-size: 18px; }
.admin-file-info, .admin-file-meta { min-width: 0; }
.admin-file-info strong, .admin-file-info span, .admin-file-meta strong, .admin-file-meta span { display: block; }
.admin-file-info strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.admin-file-info span, .admin-file-meta span { overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.admin-file-meta { text-align: right; }
.admin-file-meta strong { font-size: 12px; }
.admin-file-actions { display: flex; gap: 6px; }
.audit-row { display: grid; grid-template-columns: 8px minmax(180px, 1fr) auto; align-items: center; gap: 13px; padding: 13px 15px; background: var(--card); border: 1px solid var(--border); border-radius: 11px; }
.audit-mark { width: 7px; height: 7px; background: var(--primary); border-radius: 50%; }
.audit-row strong, .audit-row span { display: block; }
.audit-row strong { font-size: 13px; }
.audit-row span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.audit-row time { color: var(--muted); font-size: 11px; white-space: nowrap; }
.admin-empty { padding: 38px; color: var(--muted); text-align: center; background: var(--card); border: 1px dashed var(--border); border-radius: 12px; }

.auth-card form { text-align: right; }
.auth-card form > .btn { width: 100%; }

@media (max-width: 920px) {
    .admin-page { padding: 28px 12px 50px; }
    .admin-heading { grid-template-columns: 1fr; gap: 20px; }
    .admin-user-summary { grid-template-columns: minmax(220px, 1fr) 150px auto 18px; gap: 14px; }
    .admin-settings-grid { grid-template-columns: 1fr; }
    .admin-password-group { grid-template-columns: 1fr; gap: 12px; }
}

@media (max-width: 640px) {
    .admin-body .topbar .user-email { display: none; }
    .admin-body .topbar-inner { align-items: flex-start; }
    .admin-body .auth-actions { flex-wrap: wrap; justify-content: flex-end; }
    .admin-heading h2 { font-size: 31px; }
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
    .admin-tabs { overflow-x: auto; }
    .admin-tab { flex: 0 0 auto; min-width: 108px; }
    .admin-toolbar { align-items: stretch; flex-direction: column; }
    .admin-search { width: 100%; }
    .admin-user-summary { grid-template-columns: minmax(0, 1fr) auto 16px; padding: 13px; }
    .admin-user-usage { display: none; }
    .admin-avatar { flex-basis: 34px; height: 34px; }
    .admin-user-body { padding: 12px; }
    .admin-storage > div { align-items: flex-start; flex-direction: column; gap: 2px; }
    .admin-setting-title { align-items: flex-start; flex-direction: column; }
    .admin-limit-fields { grid-template-columns: 1fr; }
    .admin-password-fields { grid-template-columns: 1fr; }
    .admin-card-actions { align-items: stretch; flex-direction: column; }
    .admin-card-actions > div { display: grid; grid-template-columns: 1fr 1fr; }
    .admin-card-actions > .btn { width: 100%; }
    .admin-file-row { grid-template-columns: 36px minmax(0, 1fr); }
    .admin-file-meta { grid-column: 2; text-align: right; }
    .admin-file-actions { grid-column: 1 / -1; }
    .admin-file-actions .btn { flex: 1; }
    .audit-row { grid-template-columns: 8px minmax(0, 1fr); }
    .audit-row time { grid-column: 2; }
}
