/* =========================================================
   Amrr Nest — Admin Portal Styles
   ========================================================= */

:root {
    --bg-body: #0b0b0b;
    --bg-sidebar: #111111;
    --bg-panel: #161616;
    --bg-card: #1a1a1a;
    --bg-input: #101010;
    --border: #2a2a2a;
    --border-soft: #222222;

    --gold: #c5a059;
    --gold-soft: #d4af37;
    --gold-dim: rgba(197, 160, 89, 0.14);

    --text: #ffffff;
    --text-muted: #9a9a9a;
    --text-dim: #6a6a6a;

    --success: #2ecc71;
    --warning: #f0b429;
    --danger: #e74c3c;
    --info: #5dade2;

    --sidebar-w: 260px;
    --radius: 12px;
    --radius-sm: 8px;
    --font: "Montserrat", sans-serif;
    --transition: 0.22s ease;
}

*,
*::before,
*::after { box-sizing: border-box; }

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

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-soft); }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }

/* Layout shell */
.admin-app {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 200;
    transition: transform var(--transition);
}

.admin-sidebar__brand {
    padding: 18px 18px 12px;
    border-bottom: 1px solid var(--border);
}

.admin-sidebar__logo {
    display: inline-flex;
    line-height: 0;
}

.admin-sidebar__tag {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--gold-dim);
    color: var(--gold);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-sidebar__nav {
    flex: 1;
    overflow-y: auto;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-sidebar__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.86rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
}

.admin-sidebar__link i {
    width: 18px;
    text-align: center;
    color: var(--text-dim);
}

.admin-sidebar__link:hover,
.admin-sidebar__link.is-active {
    background: var(--gold-dim);
    color: var(--gold);
}

.admin-sidebar__link:hover i,
.admin-sidebar__link.is-active i {
    color: var(--gold);
}

.admin-sidebar__foot {
    padding: 12px 10px 16px;
    border-top: 1px solid var(--border);
}

.admin-content {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 22px;
    background: rgba(11, 11, 11, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.admin-topbar__left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-topbar__title {
    font-size: 1.15rem;
    font-weight: 700;
}

.admin-topbar__sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.admin-topbar__right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-main {
    padding: 22px 0 40px;
    flex: 1;
}

.sidebar-overlay {
    display: none;
}

/* Brand logo */
.brand-logo {
    display: inline-flex;
    height: 44px;
}

.brand-logo__svg {
    height: 100%;
    width: auto;
}

.brand-logo__amrr {
    font-family: "Alex Brush", cursive;
    font-size: 128px;
    fill: #fff;
}

.brand-logo__nest {
    font-family: "Dancing Script", cursive;
    font-size: 58px;
    font-weight: 600;
    fill: #fff;
}

.brand-logo--auth {
    height: 88px;
}

/* Buttons & chips */
.icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-panel);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.icon-btn:hover { color: var(--gold); border-color: var(--gold); }

.dot-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
}

.admin-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    border-radius: 999px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 500;
}

.admin-user-chip img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.btn-gold,
.btn-outline,
.btn-ghost,
.btn-danger,
.btn-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.btn-gold {
    background: var(--gold);
    color: #111;
}

.btn-gold:hover { background: var(--gold-soft); color: #111; }

.btn-outline {
    background: transparent;
    border-color: var(--gold);
    color: var(--gold);
}

.btn-outline:hover { background: var(--gold-dim); color: var(--gold-soft); }

.btn-ghost {
    background: var(--bg-panel);
    border-color: var(--border);
    color: var(--text-muted);
}

.btn-ghost:hover { color: var(--gold); border-color: var(--gold); }

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

.btn-soft {
    background: var(--gold-dim);
    color: var(--gold);
}

.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 0.76rem; }

/* Cards & panels */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
}

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

.panel-title {
    font-size: 0.95rem;
    font-weight: 700;
}

.section-gap { margin-top: 20px; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

.stat-card__icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gold-dim);
    color: var(--gold);
    margin-bottom: 12px;
}

.stat-card__label {
    font-size: 0.72rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-card__value {
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: 4px;
}

.stat-card__meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Tables */
.table-wrap { overflow-x: auto; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-soft);
    font-size: 0.84rem;
    vertical-align: middle;
}

.admin-table th {
    color: var(--text-dim);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover td { background: rgba(255,255,255,0.02); }

.table-actions {
    display: inline-flex;
    gap: 6px;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-success { background: rgba(46, 204, 113, 0.15); color: var(--success); }
.badge-warning { background: rgba(240, 180, 41, 0.15); color: var(--warning); }
.badge-danger { background: rgba(231, 76, 60, 0.15); color: var(--danger); }
.badge-muted { background: rgba(154, 154, 154, 0.15); color: var(--text-muted); }
.badge-info { background: rgba(93, 173, 226, 0.15); color: var(--info); }

/* Forms */
.form-group { margin-bottom: 14px; }

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text);
    font-size: 0.88rem;
    outline: none;
}

.form-control:focus { border-color: var(--gold); }

.form-control.error { border-color: var(--danger); }

textarea.form-control {
    min-height: 110px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23c5a059' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
}

.form-error {
    display: block;
    margin-top: 4px;
    color: var(--danger);
    font-size: 0.72rem;
}

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

.toolbar__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-input {
    min-width: 220px;
}

/* Auth */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at top, rgba(197, 160, 89, 0.12), transparent 50%),
        var(--bg-body);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 24px;
}

.auth-card__sub {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 8px 0 22px;
}

.auth-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* Misc */
.product-thumb {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
}

.empty-state {
    text-align: center;
    padding: 40px 16px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 1.8rem;
    color: var(--gold);
    margin-bottom: 10px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.info-tile {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.info-tile__label {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.info-tile__value {
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 4px;
}

.list-feed {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feed-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.feed-item__icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gold-dim);
    color: var(--gold);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feed-item__title { font-weight: 600; font-size: 0.86rem; }
.feed-item__meta { color: var(--text-muted); font-size: 0.75rem; margin-top: 2px; }

.app-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%) translateY(16px);
    background: var(--bg-card);
    border: 1px solid var(--gold);
    color: var(--text);
    padding: 12px 18px;
    border-radius: 999px;
    font-size: 0.82rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition);
    z-index: 400;
}

.app-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.priority-high { color: var(--danger); font-weight: 600; }
.priority-medium { color: var(--warning); font-weight: 600; }
.priority-low { color: var(--text-muted); }
