/* ═══════════════════════════════════════════════
   auth.css — Virexel Auth & Admin Styles
   Подключать в <head> после styles.css
   ═══════════════════════════════════════════════ */

/* ── GROUP BADGES ─────────────────────────────── */
.group-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 2px 6px;
    border-radius: 3px;
    vertical-align: middle;
    margin-left: 6px;
    font-family: 'JetBrains Mono', monospace;
}
.badge-member   { background: rgba(124,106,255,.18); color: #7c6aff; border: 1px solid #7c6aff55; }
.badge-pro      { background: rgba(255,193,0,.15);   color: #ffc100; border: 1px solid #ffc10055; }
.badge-platinum { background: rgba(180,90,255,.18);  color: #c97fff; border: 1px solid #c97fff55; }
.badge-admin    { background: rgba(255,60,80,.18);   color: #ff3c50; border: 1px solid #ff3c5055; }

/* ── USER DROPDOWN MENU ───────────────────────── */
#authUserArea { position: relative; }

.auth-user-menu {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0; right: 0;
    background: var(--bg-panel, #16161e);
    border: 1px solid var(--border, #2a2a38);
    border-radius: 6px;
    overflow: hidden;
    z-index: 200;
    box-shadow: 0 4px 20px #00000060;
}
.auth-user-menu.open { display: block; }
.auth-user-menu button {
    display: block; width: 100%;
    background: none; border: none;
    padding: 10px 14px;
    text-align: left;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text, #c8c8d4);
    cursor: pointer;
    transition: background .15s;
}
.auth-user-menu button:hover { background: rgba(124,106,255,.12); color: #fff; }

/* ── MODAL OVERLAY ────────────────────────────── */
.auth-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.auth-modal-overlay.active { display: flex; }

/* ── MODAL BOX ────────────────────────────────── */
.auth-modal {
    position: relative;
    background: #13131a;
    border: 1px solid #2a2a3a;
    border-radius: 10px;
    padding: 32px 28px;
    width: min(420px, 94vw);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px #00000090;
    animation: authSlideIn .2s ease;
}
@keyframes authSlideIn {
    from { opacity:0; transform:translateY(-16px); }
    to   { opacity:1; transform:translateY(0); }
}

.auth-modal-close {
    position: absolute; top: 14px; right: 16px;
    background: none; border: none;
    color: var(--text-dim, #5a5a70); font-size: 16px;
    cursor: pointer; padding: 4px;
    transition: color .15s;
}
.auth-modal-close:hover { color: #fff; }

.auth-logo {
    font-family: 'Unbounded', sans-serif;
    font-weight: 900;
    font-size: 16px;
    letter-spacing: 3px;
    color: #7c6aff;
    text-align: center;
    margin-bottom: 20px;
}

/* ── TABS ─────────────────────────────────────── */
.auth-tabs, .adm-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 1px solid #2a2a3a;
    padding-bottom: 0;
}
.auth-tab-btn, .adm-tab-btn {
    background: none; border: none;
    padding: 8px 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--text-dim, #5a5a70);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color .15s, border-color .15s;
}
.auth-tab-btn.active, .adm-tab-btn.active {
    color: #7c6aff;
    border-bottom-color: #7c6aff;
}
.auth-tab-pane, .adm-tab-pane { display: none; }
.auth-tab-pane.active, .adm-tab-pane.active { display: block; }

/* ── FIELDS ───────────────────────────────────── */
.auth-field { margin-bottom: 14px; }
.auth-field label {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--text-dim, #5a5a70);
    letter-spacing: 1px;
    margin-bottom: 6px;
    text-transform: uppercase;
}
.auth-field label small { text-transform: none; font-size: 9px; }
.auth-field input {
    width: 100%; box-sizing: border-box;
    background: #0d0d12;
    border: 1px solid #2a2a3a;
    border-radius: 5px;
    padding: 10px 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: #c8c8d4;
    outline: none;
    transition: border-color .15s;
}
.auth-field input:focus { border-color: #7c6aff; }

/* ── BUTTON ───────────────────────────────────── */
.auth-btn {
    width: 100%;
    background: #7c6aff;
    border: none;
    border-radius: 5px;
    padding: 11px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
    cursor: pointer;
    margin-top: 6px;
    transition: background .15s, opacity .15s;
}
.auth-btn:hover   { background: #6a58ee; }
.auth-btn:disabled{ opacity: .5; cursor: not-allowed; }

/* ── ERROR / NOTICE ───────────────────────────── */
.auth-error {
    font-size: 11px;
    color: #ff3c50;
    font-family: 'JetBrains Mono', monospace;
    margin: 8px 0;
    padding: 8px 10px;
    background: rgba(255,60,80,.08);
    border-left: 2px solid #ff3c50;
    border-radius: 3px;
}
.auth-notice {
    margin-top: 12px;
    font-size: 10px;
    color: var(--text-dim, #5a5a70);
    font-family: 'JetBrains Mono', monospace;
    text-align: center;
    line-height: 1.6;
}
.auth-switch {
    margin-top: 14px;
    font-size: 11px;
    color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
    text-align: center;
}
.auth-switch a { color: #7c6aff; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* ── SUCCESS STATE ────────────────────────────── */
.auth-success { text-align: center; padding: 20px 0; }
.auth-success-icon {
    font-size: 36px;
    color: var(--green, #39d35c);
    margin-bottom: 12px;
}
.auth-success-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 14px;
    color: #c8c8d4;
    margin-bottom: 10px;
}
.auth-success-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-dim);
    line-height: 1.7;
    margin-bottom: 20px;
}

/* ── ADMIN MODAL ──────────────────────────────── */
.admin-modal { width: min(460px, 94vw); padding: 24px 20px; }

.adm-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.astat {
    background: #0d0d12;
    border: 1px solid #2a2a3a;
    border-radius: 6px;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-dim);
}
.astat strong { color: #c8c8d4; font-size: 18px; }
.astat-groups {
    grid-column: span 2;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--text-dim);
    text-align: center;
}

/* ── PENDING LIST ─────────────────────────────── */
.adm-list { display: flex; flex-direction: column; gap: 8px; max-height: 380px; overflow-y: auto; }

.apend-row, .auser-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    background: #0d0d12;
    border: 1px solid #2a2a3a;
    border-radius: 6px;
    padding: 10px 12px;
}
.apend-info, .auser-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #c8c8d4;
    min-width: 0;
    flex: 1;
}
.apend-info span, .auser-info span {
    color: var(--text-dim);
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.apend-btns { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; align-items: center; }

.adm-btn {
    background: none;
    border: 1px solid #2a2a3a;
    border-radius: 4px;
    padding: 5px 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    cursor: pointer;
    transition: background .15s, color .15s;
    white-space: nowrap;
    color: var(--text-dim);
}
.adm-approve { border-color: #39d35c44; color: #39d35c; }
.adm-approve:hover { background: rgba(57,211,92,.12); }
.adm-reject  { border-color: #ff3c5044; color: #ff3c50; }
.adm-reject:hover  { background: rgba(255,60,80,.12); }

.adm-select {
    background: #0d0d12;
    border: 1px solid #2a2a3a;
    border-radius: 4px;
    padding: 5px 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #c8c8d4;
    cursor: pointer;
}

.adm-search {
    width: 100%; box-sizing: border-box;
    background: #0d0d12;
    border: 1px solid #2a2a3a;
    border-radius: 5px;
    padding: 9px 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #c8c8d4;
    outline: none;
    margin-bottom: 12px;
}
.adm-search:focus { border-color: #7c6aff; }

/* ── PASSWORD TOGGLE ──────────────────────────── */
.auth-password-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.auth-password-wrap input {
    width: 100%;
    padding-right: 38px !important;
}
.auth-eye-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--text-dim, #5a5a70);
    display: flex;
    align-items: center;
    transition: color .15s;
    line-height: 0;
}
.auth-eye-btn:hover { color: #c8c8d4; }
.auth-eye-btn svg { width: 16px; height: 16px; }

/* ── TERMS CHECKBOX ───────────────────────────── */
.auth-terms-field { margin-top: 4px; }
.auth-terms-label {
    display: flex !important;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px !important;
    color: var(--text-dim, #5a5a70) !important;
    text-transform: none !important;
    line-height: 1.6;
    margin-bottom: 0 !important;
}
.auth-terms-label input[type="checkbox"] {
    width: 14px; height: 14px;
    min-width: 14px;
    margin-top: 2px;
    accent-color: #7c6aff;
    cursor: pointer;
    border: none !important;
    padding: 0 !important;
}
.auth-terms-label a {
    color: #7c6aff;
    text-decoration: none;
}
.auth-terms-label a:hover { text-decoration: underline; }

/* ── MOBILE ───────────────────────────────────── */
    .auth-modal { padding: 24px 18px; }
    .admin-modal { width: 96vw; }
    .adm-stats { grid-template-columns: 1fr 1fr; }
    .apend-row, .auser-row { flex-direction: column; align-items: flex-start; }
    .apend-btns { width: 100%; }
}

/* ════════════════════════════════════════════════
   PROFILE CARD
   ════════════════════════════════════════════════ */

.profile-modal {
    width: min(460px, 95vw);
    padding: 0;
    overflow: hidden;
}

/* ── HEADER ───────────────────────────────────── */
.pc-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 24px 24px 20px;
    background: linear-gradient(135deg, #0d0d12 0%, color-mix(in srgb, var(--pc-color, #7c6aff) 8%, #0d0d12) 100%);
    border-bottom: 1px solid #1e1e2a;
    position: relative;
}

.pc-avatar {
    width: 52px; height: 52px;
    border-radius: 50%;
    border: 2px solid;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Unbounded', sans-serif;
    font-weight: 900;
    font-size: 20px;
    flex-shrink: 0;
    letter-spacing: 0;
}

.pc-identity {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pc-username {
    font-family: 'Unbounded', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #e8e8f0;
    letter-spacing: 1px;
}

.pc-status-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: #39d35c;
    box-shadow: 0 0 6px #39d35c88;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 4px;
}

/* ── INFO GRID ────────────────────────────────── */
.pc-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: #1a1a24;
    border-bottom: 1px solid #1e1e2a;
}

.pc-info-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 16px;
    background: #0d0d12;
}

.pc-info-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #3a3a50;
}

.pc-info-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #9090aa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── LIMITS ───────────────────────────────────── */
.pc-section-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 2px;
    color: #3a3a50;
    padding: 14px 16px 8px;
}

.pc-limits {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 16px 16px;
}

.pc-limit-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.pc-limit-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #8888a8;
}

.pc-limit-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #5a5a70;
}

.pc-used {
    color: #c8c8d4;
}

.pc-bar-wrap {
    height: 3px;
    background: #1e1e2a;
    border-radius: 2px;
    overflow: hidden;
}

.pc-bar-fill {
    height: 100%;
    border-radius: 2px;
    width: 0%;
    transition: width 0.6s cubic-bezier(.4,0,.2,1);
}

/* ── ACTIONS ──────────────────────────────────── */
.pc-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px 20px;
    border-top: 1px solid #1a1a24;
}

.pc-btn {
    flex: 1;
    background: none;
    border: 1px solid #2a2a3a;
    border-radius: 5px;
    padding: 9px 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    color: var(--text-dim, #5a5a70);
    letter-spacing: 0.5px;
}

.pc-btn-logout:hover {
    background: rgba(255,60,80,.1);
    border-color: #ff3c5055;
    color: #ff3c50;
}

.pc-btn-admin {
    color: #7c6aff;
    border-color: #7c6aff44;
}
.pc-btn-admin:hover {
    background: rgba(124,106,255,.12);
    border-color: #7c6aff88;
}

@media (max-width: 480px) {
    .pc-info-grid { grid-template-columns: 1fr; }
    .pc-actions { flex-direction: column; }
}

/* ═══════════════════════════════════════════════
   ADMIN USER CARDS
   ═══════════════════════════════════════════════ */

.auc-card {
    background: #0d0d12;
    border: 1px solid #1e1e2a;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

/* ── HEADER ─────────────────────────────────── */
.auc-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px 10px;
    background: linear-gradient(135deg, #0d0d12 0%, color-mix(in srgb, var(--auc-color, #7c6aff) 6%, #0d0d12) 100%);
    border-bottom: 1px solid #1a1a24;
}

.auc-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 2px solid;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Unbounded', sans-serif;
    font-weight: 900;
    font-size: 15px;
    flex-shrink: 0;
}

.auc-identity { flex: 1; min-width: 0; }

.auc-username {
    font-family: 'Unbounded', sans-serif;
    font-weight: 700;
    font-size: 13px;
    color: #e8e8f0;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.auc-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

/* ── META ───────────────────────────────────── */
.auc-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: #1a1a24;
    border-bottom: 1px solid #1a1a24;
}

.auc-meta > span {
    background: #0d0d12;
    padding: 7px 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #7070a0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auc-meta-label {
    font-size: 8px;
    letter-spacing: 1.5px;
    color: #3a3a50;
    margin-right: 4px;
}

/* ── LIMITS ─────────────────────────────────── */
.auc-limits-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 2px;
    color: #3a3a50;
    padding: 10px 12px 6px;
}

.auc-limits {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 12px 12px;
}

.auc-limit-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auc-limit-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #6060a0;
    width: 80px;
    flex-shrink: 0;
}

.auc-limit-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #4a4a68;
    width: 56px;
    flex-shrink: 0;
    text-align: right;
}

.auc-used { color: #c8c8d4; }

/* ── MOBILE ─────────────────────────────────── */
@media (max-width: 640px) {
    .auc-header { flex-wrap: wrap; }
    .auc-actions { width: 100%; }
    .auc-meta { grid-template-columns: 1fr; }
}
