/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', sans-serif;
    background: #0f0f1a;
    color: #fff;
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 240px;
    min-height: 100vh;
    background: rgba(255,255,255,0.03);
    border-right: 1px solid rgba(255,255,255,0.07);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    position: fixed;
    top: 0; left: 0; bottom: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px;
    margin-bottom: 32px;
}
.logo-icon {
    font-size: 24px;
    width: 40px; height: 40px;
    background: #1877F2;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.logo-text {
    font-size: 18px;
    color: #fff;
}
.logo-text strong { color: #1877F2; }

.nav-menu {
    list-style: none;
    flex: 1;
}
.nav-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 10px;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    margin-bottom: 4px;
}
.nav-menu li a:hover {
    background: rgba(255,255,255,0.07);
    color: #fff;
}
.nav-menu li.active a {
    background: rgba(24,119,242,0.15);
    color: #1877F2;
}

.sidebar-footer {
    border-top: 1px solid rgba(255,255,255,0.07);
    padding-top: 16px;
}
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.user-avatar {
    width: 36px; height: 36px;
    background: #1877F2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
}
.user-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}
.user-role {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
}
.btn-logout {
    display: block;
    text-align: center;
    padding: 9px;
    border-radius: 8px;
    background: rgba(255,59,48,0.1);
    color: #ff3b30;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.2s;
}
.btn-logout:hover { background: rgba(255,59,48,0.2); }

/* ===== MAIN CONTENT ===== */
.main {
    margin-left: 240px;
    flex: 1;
    padding: 32px;
    min-width: 0;   

}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}
.page-header h1 {
    font-size: 24px;
    font-weight: 700;
}
.subtitle {
    color: rgba(255,255,255,0.4);
    font-size: 14px;
    margin-top: 4px;
}

/* ===== STATS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;  
    cursor: pointer;
    transition: border-color 0.2s;
}
.stat-card:hover {
    border-color: rgba(24,119,242,0.3);
}
.stat-icon { font-size: 32px; }
.stat-number {
    font-size: 32px;
    font-weight: 800;
    color: #1877F2;
}
.stat-label {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
    margin-top: 2px;
}

/* ===== CARDS ===== */
.card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    overflow: hidden;
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.card-header h2 {
    font-size: 16px;
    font-weight: 600;
}

/* ===== BUTTONS ===== */
.btn-primary {
    background: #1877F2;
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-block;
}
.btn-primary:hover { background: #1565d8; }
.btn-link {
    color: #1877F2;
    text-decoration: none;
    font-size: 14px;
}
.btn-link:hover { text-decoration: underline; }

/* ===== TABLE ===== */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.table th {
    text-align: left;
    padding: 10px 12px;
    color: rgba(255,255,255,0.4);
    font-weight: 500;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.8);
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(255,255,255,0.02); }

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.badge-pending {
    background: rgba(255,159,10,0.15);
    color: #ff9f0a;
}
.badge-published {
    background: rgba(52,199,89,0.15);
    color: #34c759;
}
.badge-failed {
    background: rgba(255,59,48,0.15);
    color: #ff3b30;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 40px;
    color: rgba(255,255,255,0.3);
}
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { margin-bottom: 20px; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 8px;
}
.form-control {
    width: 100%;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 12px 16px;
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}
.form-control:focus { border-color: #1877F2; }
.form-control::placeholder { color: rgba(255,255,255,0.2); }

/* ===== ALERTS ===== */
.alert-error {
    background: rgba(255,59,48,0.15);
    border: 1px solid rgba(255,59,48,0.3);
    color: #ff3b30;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
}
.alert-success {
    background: rgba(52,199,89,0.15);
    border: 1px solid rgba(52,199,89,0.3);
    color: #34c759;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
}
/* ===== AUTH PAGES (без сайдбара) ===== */
.auth-body {
    display: block;
}
.auth-body .auth-page,
.auth-body .verify-page,
.auth-body .page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}
/* Кнопка поддержки в сайдбаре */
.nav-support {
    padding: 12px 16px 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.nav-support-btn {
    display: block;
    text-align: center;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.2s;
}

.nav-support-btn:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.05);
}