/* /admin/assets/admin.css */
:root{
    --bg: #151826;
    --panel: #1c2133;
    --panel2: #202844;
    --stroke: rgba(255,255,255,.08);
    --text: #e9eef7;
    --muted: rgba(233,238,247,.72);

    --accent: #35cf98;
    --accent2: #2f8f76;

    --warn: #f59e0b;
    --info: #60a5fa;
    --danger: #f87171;
    --ok: #22c55e;

    --r12: 12px;
    --r16: 16px;
    --r20: 20px;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(1200px 600px at 70% -10%, rgba(53,207,152,.14), transparent 55%),
                radial-gradient(900px 500px at 10% 10%, rgba(96,165,250,.12), transparent 55%),
                var(--bg);
    color: var(--text);
}

.layout{
    min-height: 100vh;
    display: flex;
}

/* SIDEBAR */
.sidebar{
    width: 300px;
    padding: 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: auto;
    box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset;
}

.sb-card{
    background: rgba(0,0,0,.20);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--r20);
    padding: 14px;
    backdrop-filter: blur(6px);
}

.sb-top{
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.avatar{
    width: 62px;
    height: 62px;
    border-radius: 999px;
    border: 2px solid rgba(255,255,255,.35);
    box-shadow: 0 10px 24px rgba(0,0,0,.28);
    overflow: hidden;
    flex: 0 0 auto;
    background: rgba(255,255,255,.12);
}
.avatar img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sb-name{ line-height: 1.1; }
.sb-name .who{
    font-weight: 800;
    font-size: 16px;
    letter-spacing: .2px;
}
.sb-name .role{
    margin-top: 4px;
    font-size: 12px;
    opacity: .9;
}
.pill-adm{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(0,0,0,.22);
    border: 1px solid rgba(255,255,255,.18);
}

.sb-balance{
    margin-top: 10px;
    display: grid;
    gap: 10px;
}

.metric{
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(0,0,0,.18);
    padding: 10px 12px;
}
.metric .label{
    font-size: 12px;
    opacity: .9;
    font-weight: 700;
    letter-spacing: .15px;
}
.metric .value{
    margin-top: 6px;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: .2px;
}

.btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.18);
    cursor: pointer;
    font-weight: 800;
    font-size: 14px;
    text-decoration: none;
    color: #071013;
    background: linear-gradient(90deg, rgba(255,255,255,.95), rgba(255,255,255,.82));
    box-shadow: 0 14px 30px rgba(0,0,0,.22);
}
.btn:hover{ filter: brightness(1.02); }
.btn:active{ transform: translateY(1px); }

.btn-accent{
    color: #06110c;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border-color: rgba(0,0,0,.12);
}
.btn-accent[disabled]{
    opacity: .55;
    cursor: not-allowed;
    filter: grayscale(.2);
}

.sb-menu{
    margin-top: 14px;
    display: grid;
    gap: 10px;
}

.sb-section{
    border-radius: var(--r20);
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(0,0,0,.16);
    overflow: hidden;
}
.sb-section .title{
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .35px;
    text-transform: uppercase;
    background: rgba(0,0,0,.14);
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.sb-links{
    padding: 8px;
    display: grid;
    gap: 6px;
}
.sb-links a{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 10px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.12);
    color: rgba(255,255,255,.95);
    text-decoration: none;
    background: rgba(0,0,0,.12);
    font-size: 13px;
    font-weight: 700;
}
.sb-links a:hover{ background: rgba(255,255,255,.10); }
.sb-links a.is-active{
    background: rgba(53,207,152,.16);
    border-color: rgba(53,207,152,.24);
}

/* MAIN */
.main{
    flex: 1;
    padding: 18px 18px 28px;
}

.topbar{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--r20);
    background: linear-gradient(180deg, rgba(32,40,68,.92), rgba(28,33,51,.92));
    border: 1px solid var(--stroke);
    box-shadow: 0 18px 50px rgba(0,0,0,.25);
}

.topbar h1{
    margin: 0;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: .2px;
}

.btn-small{
    width: auto;
    padding: 9px 12px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 900;
    color: #06110c;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border: 1px solid rgba(0,0,0,.12);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 14px 30px rgba(0,0,0,.20);
}

.content, .payroll{
    margin-top: 14px;
    border-radius: var(--r20);
    background: linear-gradient(180deg, rgba(32,40,68,.92), rgba(28,33,51,.92));
    border: 1px solid var(--stroke);
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(0,0,0,.20);
}

.content-head, .payroll-head{
    padding: 12px 16px;
    border-bottom: 1px solid var(--stroke);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.hint{
    font-size: 12px;
    color: var(--muted);
    line-height: 1.2;
}

.empty{
    padding: 16px;
    color: var(--muted);
}

table{
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
thead{ background: rgba(255,255,255,.04); }
th, td{
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    vertical-align: middle;
}
th{
    text-align: left;
    font-weight: 800;
    letter-spacing: .15px;
    color: rgba(233,238,247,.9);
    white-space: nowrap;
}
tbody tr:hover{ background: rgba(255,255,255,.035); }

a{ color: #5fffc6; text-decoration: none; }
a:hover{ text-decoration: underline; }

.mono{
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

.media-pill{
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    background: rgba(148,163,184,.12);
    color: #e5e7eb;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,.08);
}
.media-pill .dot{
    width: 7px;
    height: 7px;
    border-radius: 999px;
    display: inline-block;
}
.dot-photo{ background: var(--warn); }
.dot-video{ background: var(--info); }

.status-badge{
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,.10);
}
.status-active{ background: rgba(34,197,94,.14); color: #bbf7d0; }
.status-banned{ background: rgba(248,113,113,.14); color: #fecaca; }
.status-hidden{ background: rgba(148,163,184,.14); color: #e5e7eb; }

/* buttons in tables */
.pay-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.06);
    color: rgba(233,238,247,.92);
    cursor: pointer;
    font-weight: 900;
    font-size: 12px;
}
.pay-btn:hover{ background: rgba(255,255,255,.09); }
.pay-btn-green{
    background: rgba(34,197,94,.16);
    border-color: rgba(34,197,94,.22);
}
.pay-btn-green:hover{ background: rgba(34,197,94,.22); }

/* -------- Media grid -------- */
.media-section{ margin-top: 12px; }
.media-title{ font-weight: 900; font-size: 14px; margin: 6px 0 10px; }
.media-grid{
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}
@media (max-width: 1200px){
    .media-grid{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 820px){
    .media-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.media-item{
    position: relative;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(0,0,0,.16);
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0,0,0,.18);
}
.media-open{ display:block; color: inherit; text-decoration: none; }
.media-thumb{
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    background: rgba(255,255,255,.06);
}
.media-item video.media-thumb{ object-fit: cover; }
.media-meta{ padding: 8px 10px; display:flex; align-items:center; justify-content:space-between; gap: 8px; }
.media-seq{
    font-size: 12px;
    font-weight: 900;
    color: rgba(233,238,247,.92);
}
.media-checkbox{ display:flex; align-items:center; gap:8px; font-size: 12px; font-weight: 800; color: rgba(233,238,247,.92); }
.media-checkbox input{ width: 16px; height: 16px; }

/* -------- Lightbox -------- */
.media-modal{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.74);
    display:none;
    align-items:center;
    justify-content:center;
    padding: 18px;
    z-index: 9999;
}
.media-modal.is-open{ display:flex; }
.media-modal__panel{
    width: min(1100px, 100%);
    max-height: 90vh;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(20,24,38,.92);
    box-shadow: 0 30px 90px rgba(0,0,0,.55);
    overflow:hidden;
}
.media-modal__top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,.10);
}
.media-modal__title{ font-weight: 900; font-size: 13px; color: rgba(233,238,247,.92); }
.media-modal__close{
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.06);
    color: rgba(233,238,247,.92);
    font-weight: 900;
    border-radius: 12px;
    padding: 8px 10px;
    cursor: pointer;
}
.media-modal__body{
    padding: 14px;
    display:flex;
    align-items:center;
    justify-content:center;
}
.media-modal__body img,
.media-modal__body video{
    max-width: 100%;
    max-height: 78vh;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(0,0,0,.28);
}

/* forms */
.form{
    padding: 16px;
    display: grid;
    gap: 12px;
}
.field{
    display: grid;
    gap: 6px;
}
.field label{
    font-size: 12px;
    font-weight: 900;
    color: rgba(233,238,247,.92);
}
.input, textarea, select{
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(0,0,0,.18);
    color: rgba(233,238,247,.96);
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
}

select{
    background: #171c31 !important;
}

textarea{ min-height: 270px; resize: vertical; }
.input:focus, textarea:focus, select:focus{
    border-color: rgba(53,207,152,.35);
    box-shadow: 0 0 0 3px rgba(53,207,152,.12);
}

.actions{
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.actions .btn{
    width: auto;
    padding: 10px 14px;
}

.notice{
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(0,0,0,.16);
}
.notice.is-ok{ border-color: rgba(34,197,94,.22); background: rgba(34,197,94,.10); }
.notice.is-bad{ border-color: rgba(248,113,113,.22); background: rgba(248,113,113,.10); }

.grid2{ display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

@media (max-width: 1080px){ .sidebar{ width: 280px; } }
@media (max-width: 920px){
    .layout{ flex-direction: column; }
    .sidebar{ width: 100%; height: auto; position: relative; }
}
