/* ── Variables & Reset ──────────────────────────────── */
:root {
    --bg-0: #06060b;
    --bg-1: #0c0c14;
    --bg-2: #12121c;
    --bg-3: #1a1a27;
    --bg-4: #222233;
    --border: rgba(255, 255, 255, 0.06);
    --border-h: rgba(255, 255, 255, 0.12);
    --text-1: #eeeef5;
    --text-2: #9898aa;
    --text-3: #55556a;
    --accent: #7c5cfc;
    --accent-dim: rgba(124, 92, 252, 0.12);
    --accent-hover: #6a4ae8;
    --green: #00d68f;
    --green-dim: rgba(0, 214, 143, 0.12);
    --red: #ff4757;
    --red-dim: rgba(255, 71, 87, 0.1);
    --yellow: #feca57;
    --radius: 10px;
    --font: 'DM Sans', -apple-system, sans-serif;
    --mono: 'JetBrains Mono', monospace;
}

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

body {
    background: var(--bg-0);
    color: var(--text-1);
    font-family: var(--font);
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at 15% 10%, rgba(124, 92, 252, 0.06) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 80%, rgba(0, 214, 143, 0.04) 0%, transparent 55%);
    pointer-events: none;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ── Nav ─────────────────────────────────────────────── */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(6, 6, 11, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
}

.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
    color: var(--text-1);
}

.nav-logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent), #a78bfa);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .85rem;
}

.nav-logo span {
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: -.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: .25rem;
}

.nav-link {
    padding: .45rem .9rem;
    border-radius: 7px;
    font-size: .8rem;
    font-weight: 500;
    color: var(--text-2);
    text-decoration: none;
    transition: all .15s;
}

.nav-link:hover {
    background: var(--bg-3);
    color: var(--text-1);
    text-decoration: none;
}

.nav-link.active {
    background: var(--accent-dim);
    color: var(--accent);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-username {
    font-size: .8rem;
    font-weight: 500;
    color: var(--text-2);
    font-family: var(--mono);
}

.nav-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

/* ── Notification Bell ───────────────────────────────── */
.nb-wrap {
    position: relative;
}

.nb-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-2);
    color: var(--text-2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
    position: relative;
    padding: 0;
}
.nb-btn:hover { background: var(--bg-3); border-color: var(--border-h); color: var(--text-1); }

.nb-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--red);
    color: #fff;
    font-size: .62rem;
    font-weight: 700;
    font-family: var(--mono);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid var(--bg-0);
}

.nb-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: var(--bg-1);
    border: 1px solid var(--border-h);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity .18s, transform .18s;
}
.nb-panel--open { opacity: 1; pointer-events: all; transform: translateY(0); }

.nb-panel-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .8rem 1rem .6rem;
    border-bottom: 1px solid var(--border);
}

.nb-panel-title {
    font-size: .8rem;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: -.01em;
}

.nb-read-all {
    font-size: .72rem;
    color: var(--accent);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: var(--font);
    transition: opacity .15s;
}
.nb-read-all:hover { opacity: .75; }

.nb-list {
    max-height: 360px;
    overflow-y: auto;
    padding: .4rem 0;
}
.nb-list::-webkit-scrollbar { width: 4px; }
.nb-list::-webkit-scrollbar-track { background: transparent; }
.nb-list::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 2px; }

.nb-empty {
    padding: 1.5rem 1rem;
    text-align: center;
    font-size: .78rem;
    color: var(--text-3);
}

.nb-item {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    padding: .65rem 1rem;
    cursor: pointer;
    transition: background .12s;
    position: relative;
    border-bottom: 1px solid var(--border);
}
.nb-item:last-child { border-bottom: none; }
.nb-item:hover { background: var(--bg-2); }
.nb-item--read { opacity: .6; }

.nb-item-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}
.nb-icon--info    { background: var(--accent-dim); color: var(--accent); }
.nb-icon--success { background: var(--green-dim);  color: var(--green);  }
.nb-icon--warning { background: rgba(254,202,87,.12); color: var(--yellow); }
.nb-icon--danger  { background: var(--red-dim);    color: var(--red);    }

.nb-item-body { flex: 1; min-width: 0; }
.nb-item-title { font-size: .78rem; font-weight: 600; color: var(--text-1); margin-bottom: .2rem; }
.nb-item-msg   { font-size: .73rem; color: var(--text-2); line-height: 1.5; }
.nb-item-time  { font-size: .68rem; color: var(--text-3); margin-top: .25rem; }

.nb-item-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    margin-top: 6px;
}

/* ── Layout ──────────────────────────────────────────── */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* ── Forms ───────────────────────────────────────────── */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: .5rem;
}

.form-input {
    width: 100%;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .7rem 1rem;
    color: var(--text-1);
    font-family: var(--font);
    font-size: .85rem;
    outline: none;
    transition: border-color .2s;
}

.form-input:focus {
    border-color: var(--accent);
}

.form-hint {
    font-size: .7rem;
    color: var(--text-3);
    margin-top: .3rem;
}

/* ── Buttons ─────────────────────────────────────────── */
.btn {
    font-family: var(--font);
    font-size: .8rem;
    font-weight: 600;
    padding: .6rem 1.3rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-2);
    color: var(--text-1);
    cursor: pointer;
    transition: all .15s;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    background: var(--bg-3);
    border-color: var(--border-h);
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 25px var(--accent-dim);
}

.btn-danger {
    border-color: rgba(255, 71, 87, 0.3);
    color: var(--red);
}

.btn-danger:hover {
    background: var(--red-dim);
}

.btn-success {
    border-color: rgba(0, 214, 143, 0.3);
    color: var(--green);
}

.btn-success:hover {
    background: var(--green-dim);
}

.btn-sm {
    padding: .35rem .75rem;
    font-size: .72rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-secondary {
    background: var(--bg-2);
    border: 1px solid var(--border);
    color: var(--text-2);
    padding: .5rem 1rem;
    border-radius: 7px;
    font-size: .75rem;
    cursor: pointer;
    font-family: var(--font);
    transition: all .15s;
}

.btn-secondary:hover {
    border-color: var(--border-h);
    color: var(--text-1);
}

/* ── Card ────────────────────────────────────────────── */
.card {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.card-title {
    font-size: .95rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* ── Alerts ──────────────────────────────────────────── */
.alert {
    padding: .75rem 1rem;
    border-radius: 8px;
    font-size: .8rem;
    margin-bottom: 1.25rem;
}

.alert-error {
    background: var(--red-dim);
    border: 1px solid rgba(255, 71, 87, 0.2);
    color: var(--red);
}

.alert-success {
    background: var(--green-dim);
    border: 1px solid rgba(0, 214, 143, 0.2);
    color: var(--green);
}

/* ── Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-0);
}

::-webkit-scrollbar-thumb {
    background: var(--text-3);
    border-radius: 3px;
}

/* ── Auth pages ──────────────────────────────────────── */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 2.5rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header .logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent), #a78bfa);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.auth-header h1 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -.02em;
}

.auth-header p {
    color: var(--text-2);
    font-size: .82rem;
    margin-top: .4rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: .8rem;
    color: var(--text-2);
}

.remember-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.25rem;
    font-size: .8rem;
    color: var(--text-2);
}

.remember-row input[type="checkbox"] {
    accent-color: var(--accent);
}

/* ── Dashboard ───────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .75rem;
    margin-bottom: 1.5rem;
}

.stat {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
}

.stat .label {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-3);
    margin-bottom: .4rem;
}

.stat .val {
    font-size: 1.35rem;
    font-weight: 700;
    font-family: var(--mono);
}

.stat .val.purple {
    color: var(--accent);
}

.stat .val.green {
    color: var(--green);
}

.storage-bar {
    margin-top: .5rem;
    height: 4px;
    background: var(--bg-3);
    border-radius: 2px;
    overflow: hidden;
}

.storage-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width .3s;
}

.storage-text {
    font-size: .65rem;
    color: var(--text-3);
    margin-top: .3rem;
    font-family: var(--mono);
}

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: all .2s;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.upload-zone h3 {
    font-size: .95rem;
    font-weight: 600;
    margin-bottom: .3rem;
}

.upload-zone p {
    color: var(--text-2);
    font-size: .78rem;
}

.upload-zone .fmts {
    font-family: var(--mono);
    font-size: .6rem;
    color: var(--text-3);
    margin-top: .5rem;
}

.upload-zone.uploading {
    pointer-events: none;
    opacity: .6;
}

.upload-progress {
    display: none;
    margin-top: 1rem;
}

.progress-track {
    height: 4px;
    background: var(--bg-0);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width .3s;
    width: 0%;
}

.upload-results {
    display: none;
    background: var(--bg-2);
    border: 1px solid rgba(0, 214, 143, 0.15);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    text-align: left;
}

.url-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .4rem;
}

.url-row label {
    font-size: .6rem;
    color: var(--text-3);
    min-width: 55px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.url-row code {
    flex: 1;
    font-family: var(--mono);
    font-size: .68rem;
    background: var(--bg-0);
    padding: .3rem .6rem;
    border-radius: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--green);
}

.toolbar {
    display: flex;
    gap: .75rem;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-box input {
    width: 100%;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .6rem 1rem .6rem 2.3rem;
    color: var(--text-1);
    font-family: var(--font);
    font-size: .8rem;
    outline: none;
    transition: border-color .2s;
}

.search-box input:focus {
    border-color: var(--accent);
}

.search-box::before {
    content: '⌕';
    position: absolute;
    left: .85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
}

.filter-pills {
    display: flex;
    gap: 2px;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3px;
}

.pill {
    font-family: var(--font);
    font-size: .72rem;
    font-weight: 500;
    padding: .35rem .85rem;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-2);
    cursor: pointer;
    transition: all .15s;
}

.pill.active {
    background: var(--accent);
    color: #fff;
}

.pill:hover:not(.active) {
    color: var(--text-1);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: .75rem;
    margin-bottom: 1.5rem;
}

.g-item {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all .2s;
    position: relative;
}

.g-item:hover {
    border-color: var(--border-h);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.g-item .thumb {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    background: var(--bg-2);
    cursor: pointer;
}

.g-item .info {
    padding: .6rem .75rem;
}

.g-item .name {
    font-size: .68rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: .2rem;
}

.g-item .meta-row {
    display: flex;
    justify-content: space-between;
    font-size: .58rem;
    color: var(--text-3);
    font-family: var(--mono);
}

.g-item .badge {
    position: absolute;
    top: .4rem;
    right: .4rem;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    font-size: .55rem;
    padding: .15rem .4rem;
    border-radius: 4px;
    font-family: var(--mono);
    font-weight: 600;
    color: var(--yellow);
}

.g-item .overlay {
    position: absolute;
    inset: 0;
    background: rgba(6, 6, 11, 0.88);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    opacity: 0;
    transition: opacity .15s;
}

.g-item:hover .overlay {
    opacity: 1;
}

.modal-bg {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(12px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-bg.open {
    display: flex;
}

.modal-bg img {
    max-width: 90vw;
    max-height: 88vh;
    min-width: 120px;
    min-height: 120px;
    object-fit: contain;
    border-radius: var(--radius);
    background: var(--bg-2);
}

.modal-close {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--bg-3);
    border: 1px solid var(--border);
    color: var(--text-1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .3rem;
    margin: 1.5rem 0;
}

.pg-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 .6rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-2);
    color: var(--text-2);
    font-family: var(--font);
    font-size: .8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pg-btn:hover:not(:disabled) {
    background: var(--bg-3);
    border-color: var(--border-h);
    color: var(--text-1);
}

.pg-btn--active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 0 18px var(--accent-dim);
}

.pg-btn--active:hover {
    background: var(--accent-hover);
}

.pg-btn--nav {
    font-size: 1rem;
    color: var(--text-3);
}

.pg-btn:disabled {
    opacity: .3;
    cursor: default;
}

.pg-dots {
    min-width: 28px;
    text-align: center;
    color: var(--text-3);
    font-size: .8rem;
    line-height: 36px;
    user-select: none;
}

.empty {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-3);
}

.empty .icon {
    font-size: 2.5rem;
    margin-bottom: .75rem;
    opacity: .25;
}

.empty h3 {
    color: var(--text-2);
    margin-bottom: .3rem;
    font-size: 1rem;
}

.empty p {
    font-size: .8rem;
}

.toast-wrap {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    pointer-events: none;
}

.toast {
    background: var(--bg-3);
    border: 1px solid var(--border-h);
    border-radius: 10px;
    padding: .65rem 1rem;
    font-size: .8rem;
    display: flex;
    align-items: center;
    gap: .55rem;
    max-width: 22rem;
    box-shadow: 0 4px 20px rgba(0,0,0,.45);
    animation: toast-in .22s ease;
    pointer-events: all;
    cursor: default;
}

.toast-icon {
    font-size: .75rem;
    font-weight: 700;
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--border-h);
}

.toast-msg {
    flex: 1;
    line-height: 1.4;
    color: var(--text-1);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-3);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 .1rem;
    flex-shrink: 0;
    opacity: .6;
    transition: opacity .15s;
}
.toast-close:hover { opacity: 1; }

.toast.ok { border-color: rgba(0, 214, 143, 0.3); }
.toast.ok .toast-icon { background: rgba(0, 214, 143, 0.18); color: var(--green); }

.toast.err { border-color: rgba(255, 71, 87, 0.3); }
.toast.err .toast-icon { background: rgba(255, 71, 87, 0.15); color: var(--red); }

.toast.warn { border-color: rgba(254, 202, 87, 0.3); }
.toast.warn .toast-icon { background: rgba(254, 202, 87, 0.15); color: var(--yellow); }

.toast.info { border-color: rgba(124, 92, 252, 0.3); }
.toast.info .toast-icon { background: var(--accent-dim); color: var(--accent); }

.toast.out {
    animation: toast-out .24s ease forwards;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateX(1rem); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes toast-out {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(1rem); }
}

.embed-modal-bg {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 1100;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.embed-modal-bg.open {
    display: flex;
}

.embed-modal {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem;
    width: 100%;
    max-width: 420px;
}

.embed-modal h3 {
    font-size: .9rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.embed-modal label {
    display: block;
    font-size: .68rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: .3rem;
}

.embed-modal input,
.embed-modal textarea {
    width: 100%;
    background: var(--bg-0);
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: .55rem .75rem;
    color: var(--text-1);
    font-family: var(--font);
    font-size: .8rem;
    outline: none;
    transition: border-color .2s;
    margin-bottom: 1rem;
}

.embed-modal input:focus,
.embed-modal textarea:focus {
    border-color: var(--accent);
}

.embed-modal textarea {
    resize: vertical;
    min-height: 60px;
}

.embed-modal .actions {
    display: flex;
    gap: .5rem;
    justify-content: flex-end;
    margin-top: .25rem;
}

#file-input {
    display: none;
}

/* ── Settings ────────────────────────────────────────── */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.settings-grid .card.full {
    grid-column: 1/-1;
}

.api-key-box {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1rem;
}

.api-key-box code {
    flex: 1;
    font-family: var(--mono);
    font-size: .75rem;
    background: var(--bg-0);
    padding: .65rem 1rem;
    border-radius: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--accent);
    border: 1px solid var(--border);
    user-select: all;
}

.api-key-box .hidden-key {
    color: var(--text-3);
}

.inline-form {
    display: flex;
    gap: .75rem;
    align-items: flex-end;
}

.inline-form .form-group {
    flex: 1;
    margin-bottom: 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.info-item .info-label {
    font-size: .65rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: .3rem;
}

.info-item .info-val {
    font-family: var(--mono);
    font-size: .85rem;
}

.embed-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    align-items: start;
}

.color-swatches {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-top: .5rem;
}

.color-swatch {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform .1s, border-color .1s;
}

.color-swatch:hover {
    transform: scale(1.15);
}

.color-swatch.active {
    border-color: #fff;
}

.dc-preview-wrap {
    position: sticky;
    top: 1.5rem;
}

.dc-preview-label {
    font-size: .65rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: .6rem;
}

.dc-embed {
    background: #2b2d31;
    border-radius: 4px;
    overflow: hidden;
    max-width: 320px;
    border-left: 4px solid #5865F2;
    font-family: 'gg sans', 'Noto Sans', sans-serif;
}

.dc-embed-inner {
    padding: .75rem 1rem .75rem .75rem;
}

.dc-author {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: .35rem;
}

.dc-author-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    background: #5865f2;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #fff;
    overflow: hidden;
}

.dc-author-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dc-author-name {
    font-size: .78rem;
    font-weight: 600;
    color: #fff;
}

.dc-title {
    font-size: .9rem;
    font-weight: 600;
    color: #00aff4;
    margin-bottom: .3rem;
    word-break: break-word;
}

.dc-desc {
    font-size: .78rem;
    color: #dbdee1;
    line-height: 1.4;
    margin-bottom: .5rem;
    word-break: break-word;
}

.dc-image {
    width: 100%;
    border-radius: 4px;
    display: block;
    max-height: 160px;
    object-fit: cover;
    background: #1e1f22;
}

.dc-footer {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-top: .6rem;
}

.dc-footer-txt {
    font-size: .68rem;
    color: #87898c;
}

/* ── Profile Page ────────────────────────────────────── */
.pf-hero-card {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.pf-cover {
    height: 130px;
    background: linear-gradient(135deg,
        rgba(124,92,252,.55) 0%,
        rgba(124,92,252,.2) 40%,
        rgba(0,214,143,.12) 100%);
    position: relative;
}

.pf-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.pf-av-row {
    padding: 0 2rem;
    margin-top: -54px;
    position: relative;
    z-index: 2;
}

.pf-av {
    width: 108px;
    height: 108px;
    border-radius: 50%;
    background: var(--bg-3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--accent);
    overflow: hidden;
    border: 4px solid var(--bg-1);
    flex-shrink: 0;
}

.pf-av img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pf-info {
    padding: .75rem 2rem 1.75rem;
}

.pf-name {
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -.03em;
    display: flex;
    align-items: center;
    gap: .65rem;
    flex-wrap: wrap;
    margin-bottom: .25rem;
    margin-top: .5rem;
}

.pf-email {
    font-size: .75rem;
    color: var(--text-3);
    font-family: var(--mono);
    margin-bottom: 1.2rem;
}

.pf-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.pf-stat {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.pf-stat-val {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-1);
    font-family: var(--mono);
    line-height: 1.2;
}

.pf-stat-lbl {
    font-size: .65rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.pf-stat-div {
    width: 1px;
    height: 32px;
    background: var(--border);
    flex-shrink: 0;
}

.pf-section {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1.75rem;
    margin-bottom: 1rem;
}

.pf-section-hd {
    font-size: .9rem;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: -.01em;
    margin-bottom: 1.5rem;
    padding-bottom: .9rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: .6rem;
}

.pf-section-icon {
    color: var(--accent);
    font-size: 1rem;
}

.pf-label {
    display: block;
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: .45rem;
    letter-spacing: .01em;
}

.pf-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.pf-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.pf-action-row {
    display: flex;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

@media (max-width: 600px) {
    .pf-av-row { padding: 0 1.25rem; }
    .pf-info { padding: .75rem 1.25rem 1.5rem; }
    .pf-name { font-size: 1.2rem; }
    .pf-av { width: 88px; height: 88px; font-size: 2rem; border-width: 3px; }
    .pf-cover { height: 100px; }
    .pf-2col { grid-template-columns: 1fr; }
    .pf-section { padding: 1.25rem; }
}

/* ── Settings redesign ───────────────────────────────── */

/* Hero */
.stg-hero {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 2.25rem;
    margin-bottom: 1.25rem;
    position: relative;
    overflow: hidden;
}

.stg-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 0% 50%, rgba(124,92,252,.07) 0%, transparent 55%),
                radial-gradient(ellipse at 100% 50%, rgba(0,214,143,.03) 0%, transparent 55%);
    pointer-events: none;
}

.stg-hero-av {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--bg-3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--accent);
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid transparent;
    position: relative;
    z-index: 1;
}

.stg-hero-av img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ring-owner {
    border-color: #f5c842;
    box-shadow: 0 0 28px rgba(245,200,66,.22), 0 0 0 1px rgba(245,200,66,.1);
}

.ring-admin {
    border-color: var(--accent);
    box-shadow: 0 0 28px rgba(124,92,252,.22), 0 0 0 1px rgba(124,92,252,.1);
}

.ring-user {
    border-color: var(--border-h);
}

.stg-hero-body {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.stg-hero-name {
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -.03em;
    display: flex;
    align-items: center;
    gap: .65rem;
    flex-wrap: wrap;
    margin-bottom: .2rem;
}

.stg-badge {
    font-size: .58rem;
    padding: .18rem .5rem;
    border-radius: 5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    vertical-align: middle;
    line-height: 1;
}

.stg-badge--owner {
    background: rgba(245,200,66,.15);
    color: #f5c842;
    border: 1px solid rgba(245,200,66,.4);
}

.stg-badge--admin {
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid rgba(124,92,252,.35);
}

.stg-badge--user {
    background: var(--bg-3);
    color: var(--text-3);
    border: 1px solid var(--border);
}

.stg-hero-email {
    font-size: .76rem;
    color: var(--text-3);
    font-family: var(--mono);
    margin-bottom: .9rem;
}

.stg-hero-stats {
    display: flex;
    align-items: center;
    gap: .85rem;
    flex-wrap: wrap;
}

.stg-stat {
    display: flex;
    align-items: baseline;
    gap: .28rem;
}

.stg-stat-val {
    font-family: var(--mono);
    font-size: .83rem;
    font-weight: 600;
    color: var(--text-1);
}

.stg-stat-sep {
    color: var(--text-3);
    font-size: .72rem;
}

.stg-stat-sub {
    font-size: .68rem;
    color: var(--text-3);
}

.stg-stat-pipe {
    width: 1px;
    height: 14px;
    background: var(--border);
}

/* Tab bar */
.stg-tabbar {
    display: flex;
    gap: .25rem;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .3rem;
    margin-bottom: 1.25rem;
}

.stg-tab {
    flex: 1;
    padding: .55rem 1rem;
    border-radius: 7px;
    font-size: .8rem;
    font-weight: 500;
    color: var(--text-2);
    background: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .15s;
    font-family: var(--font);
    white-space: nowrap;
}

.stg-tab:hover {
    background: var(--bg-3);
    color: var(--text-1);
}

.stg-tab.active {
    background: var(--bg-3);
    color: var(--accent);
    border-color: var(--border);
}

/* Panels */
.stg-panel {
    display: none;
}

.stg-panel.active {
    display: block;
    animation: stgFadeUp .18s ease;
}

@keyframes stgFadeUp {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Section heading */
.stg-section-hd {
    font-size: .62rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .12em;
    margin-bottom: 1.25rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--border);
}

/* Field group heading (inside embed form) */
.stg-field-group-hd {
    font-size: .62rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: .75rem;
    padding-bottom: .4rem;
    border-bottom: 1px solid var(--border);
}

/* Two-column form grid */
.stg-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Action row (flush-right submit button) */
.stg-action-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 900px) {
    .embed-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .nav {
        padding: 0 1rem;
    }

    .nav-links {
        gap: 0;
    }

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

    .inline-form {
        flex-direction: column;
        align-items: stretch;
    }

    .stg-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.5rem;
    }

    .stg-hero-av {
        width: 72px;
        height: 72px;
        font-size: 1.7rem;
    }

    .stg-hero-name {
        font-size: 1.2rem;
    }

    .stg-tabbar {
        flex-wrap: wrap;
    }

    .stg-2col {
        grid-template-columns: 1fr;
    }

    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .toolbar {
        flex-direction: column;
    }

    .search-box {
        min-width: 100%;
    }

    .pagination {
        gap: .2rem;
    }

    .pg-btn {
        min-width: 30px;
        height: 30px;
        padding: 0 .4rem;
        font-size: .75rem;
        border-radius: 6px;
    }

    .pg-btn--nav {
        font-size: .85rem;
    }

    .pg-dots {
        min-width: 20px;
        font-size: .75rem;
        line-height: 30px;
    }
}

/* ── Media thumbnails (video / audio) ───────────────── */
.media-thumb {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 4px;
}

.video-thumb {
    background: #0d0d1a;
}

.audio-thumb {
    background: linear-gradient(135deg, #0c1a12, #061008);
}

.media-icon {
    position: relative;
    z-index: 1;
    font-size: 2.2rem;
    pointer-events: none;
    line-height: 1;
}

.video-thumb .media-icon {
    color: var(--accent);
    text-shadow: 0 0 24px rgba(124, 92, 252, 0.7);
}

.audio-thumb .media-icon {
    color: var(--green);
    text-shadow: 0 0 24px rgba(0, 214, 143, 0.6);
}

/* ── Type badges ─────────────────────────────────────── */
.badge-video {
    color: var(--accent) !important;
}

.badge-audio {
    color: var(--green) !important;
}

.badge-archive {
    color: #fb923c !important;
}

/* ── Modal media players ─────────────────────────────── */
#modal-vid {
    display: block;
    border-radius: 8px;
    background: #000;
}

#modal-aud { display: none; }

/* ── Modal audio player ──────────────────────────────── */
.audio-art {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto;
    color: rgba(255,255,255,0.35);
}
.audio-seek-wrap {
    display: flex; align-items: center; gap: .75rem;
    margin-bottom: 1.25rem;
}
.audio-t {
    font-size: .68rem;
    font-family: 'JetBrains Mono', monospace;
    color: #55556a;
    min-width: 34px;
    flex-shrink: 0;
}
#m-dur { text-align: right; }
.audio-seek {
    flex: 1; height: 3px;
    background: rgba(255,255,255,0.1);
    border-radius: 999px;
    position: relative; cursor: pointer;
}
.audio-seek:hover { background: rgba(255,255,255,0.15); }
.audio-seek-fill {
    position: absolute; left: 0; top: 0; bottom: 0;
    background: #fff; border-radius: 999px; pointer-events: none;
}
.audio-seek-dot {
    position: absolute; top: 50%;
    transform: translate(-50%,-50%);
    width: 12px; height: 12px;
    background: #fff; border-radius: 50%;
    pointer-events: none; opacity: 0; transition: opacity .15s;
}
.audio-seek:hover .audio-seek-dot { opacity: 1; }
.audio-btns {
    display: flex; align-items: center;
    justify-content: center; gap: 1rem;
}
.audio-play {
    width: 52px; height: 52px; border-radius: 50%;
    background: #fff; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #06060b; flex-shrink: 0;
    transition: transform .15s, background .15s;
}
.audio-play:hover { transform: scale(1.07); background: #d8d8e0; }
.audio-mute {
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    cursor: pointer; display: flex; align-items: center;
    justify-content: center; color: #55556a; flex-shrink: 0;
    transition: background .15s, color .15s;
}
.audio-mute:hover { background: rgba(255,255,255,0.1); color: #fff; }
@media (max-width: 420px) {
    .pg-btn {
        min-width: 26px;
        height: 26px;
        font-size: .7rem;
        border-radius: 5px;
    }

    .pg-dots {
        min-width: 16px;
        line-height: 26px;
    }

    .pagination {
        gap: .15rem;
    }
}

/* ── Delete confirm dialog ───────────────────────────── */
.cdlg-bg {
    position: fixed; inset: 0; z-index: 9500;
    background: rgba(6, 6, 11, 0.8);
    backdrop-filter: blur(14px) saturate(0.75);
    -webkit-backdrop-filter: blur(14px) saturate(0.75);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .2s ease;
}
.cdlg-bg.cdlg-open { opacity: 1; }

.cdlg-card {
    position: relative;
    background: linear-gradient(160deg, var(--bg-2) 0%, var(--bg-1) 100%);
    border: 1px solid rgba(255, 71, 87, 0.18);
    border-radius: 20px;
    padding: 2.25rem 2.5rem 2rem;
    width: min(420px, 90vw);
    text-align: center;
    transform: scale(.88) translateY(24px);
    transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), opacity .2s, border-color .35s, box-shadow .35s;
    opacity: 0;
    box-shadow:
        0 0 0 1px rgba(255, 71, 87, 0.06),
        0 24px 64px rgba(0, 0, 0, 0.65),
        0 0 100px rgba(255, 71, 87, 0.07);
    overflow: hidden;
}
.cdlg-card::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 55%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 71, 87, 0.55), transparent);
    transition: background .35s;
}
.cdlg-card.cdlg-card-open { transform: scale(1) translateY(0); opacity: 1; }

.cdlg-card.cdlg-card--success {
    border-color: rgba(0, 214, 143, 0.2);
    box-shadow:
        0 0 0 1px rgba(0, 214, 143, 0.07),
        0 24px 64px rgba(0, 0, 0, 0.65),
        0 0 100px rgba(0, 214, 143, 0.09);
}
.cdlg-card.cdlg-card--success::before {
    background: linear-gradient(90deg, transparent, rgba(0, 214, 143, 0.55), transparent);
}

.cdlg-icon {
    width: 72px; height: 72px;
    background: radial-gradient(circle at center, rgba(255, 71, 87, 0.14) 0%, rgba(255, 71, 87, 0.04) 70%);
    border: 1px solid rgba(255, 71, 87, 0.22);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--red);
    box-shadow: 0 4px 20px rgba(255, 71, 87, 0.12);
    animation: cdlg-pulse-red 2.2s ease-in-out infinite;
}
@keyframes cdlg-pulse-red {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.2), 0 4px 20px rgba(255, 71, 87, 0.1); }
    50%       { box-shadow: 0 0 0 10px rgba(255, 71, 87, 0), 0 4px 20px rgba(255, 71, 87, 0.1); }
}

.cdlg-title {
    font-size: 1.18rem; font-weight: 700;
    color: var(--text-1);
    margin-bottom: .5rem;
    letter-spacing: -.015em;
    text-align: center;
}
.cdlg-desc {
    font-size: .81rem; color: var(--text-2);
    margin-bottom: 2rem; line-height: 1.65;
    text-align: center;
}

.cdlg-btns { display: flex; gap: .75rem; }
.cdlg-btns .btn {
    flex: 1; justify-content: center;
    padding: .65rem 1rem; font-size: .83rem; border-radius: 10px;
}
.cdlg-btns .btn-danger {
    background: rgba(255, 71, 87, 0.07);
    border-color: rgba(255, 71, 87, 0.3);
    color: var(--red); font-weight: 700; letter-spacing: .01em;
}
.cdlg-btns .btn-danger:hover:not(:disabled) {
    background: rgba(255, 71, 87, 0.15);
    border-color: rgba(255, 71, 87, 0.55);
    box-shadow: 0 0 22px rgba(255, 71, 87, 0.18);
}
.cdlg-btns .btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* Success state */
.cdlg-success { display: none; padding: .5rem 0 .25rem; }
.cdlg-success-icon {
    width: 76px; height: 76px;
    background: radial-gradient(circle at center, rgba(0, 214, 143, 0.15) 0%, rgba(0, 214, 143, 0.04) 70%);
    border: 1px solid rgba(0, 214, 143, 0.25);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.3rem; color: var(--green);
    box-shadow: 0 4px 24px rgba(0, 214, 143, 0.14);
    animation: cdlg-pulse-green 1.8s ease-in-out infinite;
}
@keyframes cdlg-pulse-green {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 214, 143, 0.24), 0 4px 24px rgba(0, 214, 143, 0.12); }
    50%       { box-shadow: 0 0 0 12px rgba(0, 214, 143, 0), 0 4px 24px rgba(0, 214, 143, 0.12); }
}
.cdlg-check { stroke-dasharray: 40; stroke-dashoffset: 40; }
.cdlg-check.animate { animation: cdlg-draw .35s cubic-bezier(.16, 1, .3, 1) forwards .08s; }
@keyframes cdlg-draw { to { stroke-dashoffset: 0; } }
.cdlg-success-text {
    font-size: 1.05rem; font-weight: 700;
    color: var(--green); text-align: center; letter-spacing: -.01em;
}

/* ── Notification overlay ────────────────────────────────── */
.notif-bg  { z-index: 9600; }
.notif-card { cursor: pointer; user-select: none; }
.notif-icon { margin-bottom: 1.25rem; }

/* ok — green */
.notif-card.notif-ok {
    border-color: rgba(0, 214, 143, 0.2);
    box-shadow: 0 0 0 1px rgba(0,214,143,.07), 0 24px 64px rgba(0,0,0,.65), 0 0 100px rgba(0,214,143,.09);
}
.notif-card.notif-ok::before {
    background: linear-gradient(90deg, transparent, rgba(0,214,143,.55), transparent);
}
.notif-card.notif-ok .notif-icon {
    background: radial-gradient(circle at center, rgba(0,214,143,.15) 0%, rgba(0,214,143,.04) 70%);
    border-color: rgba(0,214,143,.25);
    color: var(--green);
    box-shadow: 0 4px 20px rgba(0,214,143,.12);
    animation: notif-pulse-green 2s ease-in-out infinite;
}
@keyframes notif-pulse-green {
    0%,100% { box-shadow: 0 0 0 0 rgba(0,214,143,.25), 0 4px 20px rgba(0,214,143,.1); }
    50%      { box-shadow: 0 0 0 10px rgba(0,214,143,0), 0 4px 20px rgba(0,214,143,.1); }
}

/* warn — yellow */
.notif-card.notif-warn {
    border-color: rgba(254,202,87,.2);
    box-shadow: 0 0 0 1px rgba(254,202,87,.07), 0 24px 64px rgba(0,0,0,.65), 0 0 100px rgba(254,202,87,.08);
}
.notif-card.notif-warn::before {
    background: linear-gradient(90deg, transparent, rgba(254,202,87,.5), transparent);
}
.notif-card.notif-warn .notif-icon {
    background: radial-gradient(circle at center, rgba(254,202,87,.15) 0%, rgba(254,202,87,.04) 70%);
    border-color: rgba(254,202,87,.28);
    color: var(--yellow);
    box-shadow: 0 4px 20px rgba(254,202,87,.1);
    animation: notif-pulse-yellow 2s ease-in-out infinite;
}
@keyframes notif-pulse-yellow {
    0%,100% { box-shadow: 0 0 0 0 rgba(254,202,87,.25), 0 4px 20px rgba(254,202,87,.1); }
    50%      { box-shadow: 0 0 0 10px rgba(254,202,87,0), 0 4px 20px rgba(254,202,87,.1); }
}

/* info — accent/purple */
.notif-card.notif-info {
    border-color: rgba(124,92,252,.2);
    box-shadow: 0 0 0 1px rgba(124,92,252,.07), 0 24px 64px rgba(0,0,0,.65), 0 0 100px rgba(124,92,252,.09);
}
.notif-card.notif-info::before {
    background: linear-gradient(90deg, transparent, rgba(124,92,252,.5), transparent);
}
.notif-card.notif-info .notif-icon {
    background: radial-gradient(circle at center, rgba(124,92,252,.15) 0%, rgba(124,92,252,.04) 70%);
    border-color: rgba(124,92,252,.28);
    color: var(--accent);
    box-shadow: 0 4px 20px rgba(124,92,252,.12);
    animation: notif-pulse-accent 2s ease-in-out infinite;
}
@keyframes notif-pulse-accent {
    0%,100% { box-shadow: 0 0 0 0 rgba(124,92,252,.25), 0 4px 20px rgba(124,92,252,.1); }
    50%      { box-shadow: 0 0 0 10px rgba(124,92,252,0), 0 4px 20px rgba(124,92,252,.1); }
}

/* err — inherits existing .cdlg-icon red styles */
.notif-card.notif-err .notif-icon {
    animation: cdlg-pulse-red 2s ease-in-out infinite;
}

/* progress bar */
.notif-progress {
    width: 100%;
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-top: .25rem;
}
.notif-bar {
    height: 100%;
    width: 100%;
    border-radius: 2px;
    transform-origin: left;
    background: var(--border-h);
    transition: none;
}
.notif-card.notif-ok   .notif-bar { background: var(--green); }
.notif-card.notif-err  .notif-bar { background: var(--red); }
.notif-card.notif-warn .notif-bar { background: var(--yellow); }
.notif-card.notif-info .notif-bar { background: var(--accent); }

/* ── Settings embed preview ──────────────────────────────── */
.prev-bot-icon   { width: 100%; height: 100%; object-fit: cover; }
.prev-bot-letter { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 14px; color: #fff; font-weight: 600; }

/* ── Profile banner overlay ──────────────────────────────── */
.pf-cover { position: relative; }
.pf-cover-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: flex-end; justify-content: flex-end;
    padding: .65rem .85rem;
    opacity: 0; transition: opacity .2s;
    background: linear-gradient(to top, rgba(0,0,0,.35) 0%, transparent 60%);
    border-radius: 0;
}
.pf-cover:hover .pf-cover-overlay { opacity: 1; }
.pf-cover-edit-btn {
    display: inline-flex; align-items: center; gap: .4rem;
    background: rgba(0,0,0,.55); color: #fff;
    font-size: .72rem; font-weight: 600;
    padding: .3rem .7rem; border-radius: 99px; cursor: pointer;
    border: 1px solid rgba(255,255,255,.2);
    backdrop-filter: blur(4px);
    transition: background .15s;
    text-decoration: none;
}
.pf-cover-edit-btn:hover { background: rgba(0,0,0,.75); }

/* ── Profile custom badges ───────────────────────────────── */
.pf-badges {
    display: flex; flex-wrap: wrap; gap: .35rem;
    margin-bottom: .6rem;
}
.pf-custom-badge {
    display: inline-flex; align-items: center; gap: .25rem;
    padding: .15rem .55rem;
    border-radius: 99px;
    font-size: .68rem; font-weight: 700;
    letter-spacing: .03em;
}

/* ── Ticket custom & role badges ─────────────────────────── */
.tkt-custom-badge {
    display: inline-flex; align-items: center; gap: .2rem;
    padding: .1rem .45rem;
    border-radius: 99px;
    font-size: .6rem; font-weight: 700;
    letter-spacing: .03em;
}
.tkt-badge-role-owner {
    background: rgba(245,200,66,.2) !important;
    color: #f5c842 !important;
}
.tkt-badge-role-admin {
    background: rgba(124,92,252,.18) !important;
    color: #9b7ff7 !important;
}
