/* ============================================================
   SocialAdmin - Global Styles
   Greenshift FSE Dark Theme
   ============================================================ */

:root {
    --bg-primary: #0f1117;
    --bg-secondary: #1a1d27;
    --bg-card: #1e2230;
    --bg-card-hover: #252a3a;
    --bg-input: #252a3a;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --text-primary: #e8eaed;
    --text-secondary: #8b8fa3;
    --text-muted: #5f6377;
    --accent: #6c5ce7;
    --accent-light: #a29bfe;
    --gradient-1: linear-gradient(135deg, #6c5ce7, #a29bfe);
    --gradient-2: linear-gradient(135deg, #00b894, #55efc4);
    --gradient-3: linear-gradient(135deg, #e17055, #fab1a0);
    --gradient-4: linear-gradient(135deg, #0984e3, #74b9ff);
    --gradient-5: linear-gradient(135deg, #fdcb6e, #ffeaa7);
    --gradient-6: linear-gradient(135deg, #fd79a8, #e84393);
    --green: #00b894;
    --red: #e17055;
    --blue: #0984e3;
    --orange: #f39c12;
    --meta: #00b894;
    --ins: #6c5ce7;
    --facebook: #1877f2;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 30px rgba(108, 92, 231, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 270px;
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-header {
    padding: 24px 24px 20px;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo .logo-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.sidebar-logo .logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.sidebar-logo .logo-text span {
    color: var(--accent-light);
}

.sidebar-nav {
    padding: 16px 12px;
    flex: 1;
    overflow-y: auto;
}

.nav-label {
    padding: 8px 12px 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: var(--radius-sm);
}

.nav-item:hover {
    color: var(--text-primary);
}

.nav-item:hover::before {
    opacity: 0.08;
}

.nav-item.active {
    color: #fff;
}

.nav-item.active::before {
    opacity: 0.15;
}

.nav-item>* {
    position: relative;
    z-index: 1;
}

.nav-item .icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.nav-item .nav-badge {
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-footer .footer-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: #fff;
}

.sidebar-footer .footer-info {
    flex: 1;
}

.sidebar-footer .footer-info .name {
    font-size: 13px;
    font-weight: 600;
}

.sidebar-footer .footer-info .role {
    font-size: 11px;
    color: var(--text-muted);
}

/* ==================== MAIN CONTENT ==================== */
.main {
    margin-left: 270px;
    padding: 28px 32px;
    min-height: 100vh;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
    animation: fadeInDown 0.5s ease;
}

.page-header h1 {
    font-size: 26px;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header .subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ==================== LANGUAGE SWITCHER ==================== */
.lang-switcher {
    position: relative;
    display: inline-block;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    transition: var(--transition);
}

.lang-btn:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.lang-btn .lang-flag {
    font-size: 16px;
}

.lang-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    z-index: 60;
    overflow: hidden;
    animation: fadeIn 0.2s ease;
}

.lang-dropdown.show {
    display: block;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.lang-option:hover {
    background: rgba(108, 92, 231, 0.08);
    color: var(--text-primary);
}

.lang-option.active {
    color: var(--accent-light);
    background: rgba(108, 92, 231, 0.1);
}

.lang-option .lang-flag {
    font-size: 18px;
}

/* ==================== CARDS ==================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--border-hover);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ==================== STAT CARDS ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
    animation: fadeInDown 0.5s ease 0.1s both;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.stat-card .stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.stat-card .stat-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.stat-card .stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 2px;
}

.stat-card .stat-change {
    font-size: 11px;
    margin-top: 4px;
    font-weight: 600;
}

.stat-card .stat-change.up {
    color: #55efc4;
}

.stat-card .stat-change.down {
    color: #fab1a0;
}

/* Color variants for stat cards */
.stat-card.blue::before {
    background: var(--gradient-4);
}

.stat-card.blue .stat-icon {
    background: rgba(9, 132, 227, 0.15);
    color: #74b9ff;
}

.stat-card.green::before {
    background: var(--gradient-2);
}

.stat-card.green .stat-icon {
    background: rgba(0, 184, 148, 0.15);
    color: #55efc4;
}

.stat-card.yellow::before {
    background: var(--gradient-5);
}

.stat-card.yellow .stat-icon {
    background: rgba(253, 203, 110, 0.15);
    color: #ffeaa7;
}

.stat-card.red::before {
    background: var(--gradient-3);
}

.stat-card.red .stat-icon {
    background: rgba(225, 112, 85, 0.15);
    color: #fab1a0;
}

.stat-card.purple::before {
    background: var(--gradient-1);
}

.stat-card.purple .stat-icon {
    background: rgba(108, 92, 231, 0.15);
    color: #a29bfe;
}

.stat-card.pink::before {
    background: var(--gradient-6);
}

.stat-card.pink .stat-icon {
    background: rgba(253, 121, 168, 0.15);
    color: #fd79a8;
}

/* ==================== PLATFORM TABS ==================== */
.platform-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    animation: fadeInDown 0.5s ease 0.05s both;
}

.platform-tab {
    flex: 1;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    overflow: hidden;
}

.platform-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: transparent;
    transition: var(--transition);
}

.platform-tab:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.platform-tab.active {
    color: var(--text-primary);
    font-weight: 600;
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.platform-tab.active[data-platform="all"]::after {
    background: var(--gradient-1);
}

.platform-tab.active[data-platform="meta"]::after {
    background: var(--gradient-2);
}

.platform-tab.active[data-platform="ins"]::after {
    background: var(--gradient-1);
}

.platform-tab.active[data-platform="facebook"]::after {
    background: var(--gradient-4);
}

.platform-tab .tab-count {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    transition: var(--transition);
}

.platform-tab.active .tab-count {
    color: #fff;
}

.platform-tab.active[data-platform="all"] .tab-count {
    background: var(--accent);
}

.platform-tab.active[data-platform="meta"] .tab-count {
    background: var(--meta);
}

.platform-tab.active[data-platform="ins"] .tab-count {
    background: var(--ins);
}

.platform-tab.active[data-platform="facebook"] .tab-count {
    background: var(--facebook);
}

/* ==================== TOOLBAR ==================== */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
    animation: fadeInDown 0.5s ease 0.15s both;
}

.toolbar-left {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.toolbar-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0 16px;
    width: 320px;
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.search-box .search-icon {
    color: var(--text-muted);
    font-size: 14px;
}

.search-box input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 13px;
    padding: 10px 0;
    width: 100%;
    color: var(--text-primary);
    font-family: inherit;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

/* ==================== FORM ELEMENTS ==================== */
select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 13px;
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238b8fa3' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
    outline: none;
}

.btn {
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-1);
    color: #fff;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.btn-danger {
    background: rgba(225, 112, 85, 0.15);
    color: #fab1a0;
    border: 1px solid rgba(225, 112, 85, 0.2);
}

.btn-danger:hover {
    background: rgba(225, 112, 85, 0.25);
}

.btn-success {
    background: rgba(0, 184, 148, 0.15);
    color: #55efc4;
    border: 1px solid rgba(0, 184, 148, 0.2);
}

.btn-success:hover {
    background: rgba(0, 184, 148, 0.25);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 14px;
}

/* ==================== TABLE ==================== */
.table-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.5s ease 0.2s both;
}

.table-scroll {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

thead th {
    padding: 14px 16px;
    text-align: left;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}

thead th:hover {
    color: var(--text-secondary);
}

tbody td {
    padding: 14px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    transition: var(--transition);
}

tbody tr {
    transition: var(--transition);
}

tbody tr:hover {
    background: rgba(108, 92, 231, 0.04);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* User cell */
.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: #fff;
    flex-shrink: 0;
    transition: var(--transition);
}

.user-avatar:hover {
    transform: scale(1.1);
}

.user-name {
    font-weight: 600;
    font-size: 13px;
}

.user-email {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 1px;
}

/* Badges */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.badge-active {
    background: rgba(0, 184, 148, 0.12);
    color: #55efc4;
}

.badge-active::before {
    background: #00b894;
}

.badge-blocked {
    background: rgba(225, 112, 85, 0.12);
    color: #fab1a0;
}

.badge-blocked::before {
    background: #e17055;
}

.badge-inactive {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
}

.badge-inactive::before {
    background: var(--text-muted);
}

.role-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.role-admin {
    background: rgba(9, 132, 227, 0.12);
    color: #74b9ff;
}

.role-user {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
}

.role-vip {
    background: rgba(253, 203, 110, 0.12);
    color: #ffeaa7;
}

.platform-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.platform-chip {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.3px;
    transition: var(--transition);
}

.platform-chip:hover {
    transform: scale(1.08);
}

/* Table actions */
.actions {
    display: flex;
    gap: 4px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--text-muted);
    transition: var(--transition);
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
}

.action-btn.view:hover {
    color: #74b9ff;
    border-color: rgba(9, 132, 227, 0.3);
    background: rgba(9, 132, 227, 0.08);
}

.action-btn.edit:hover {
    color: #a29bfe;
    border-color: rgba(108, 92, 231, 0.3);
    background: rgba(108, 92, 231, 0.08);
}

.action-btn.lock:hover {
    color: #ffeaa7;
    border-color: rgba(253, 203, 110, 0.3);
    background: rgba(253, 203, 110, 0.08);
}

.action-btn.delete:hover {
    color: #fab1a0;
    border-color: rgba(225, 112, 85, 0.3);
    background: rgba(225, 112, 85, 0.08);
}

/* Pagination */
.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
}

.table-footer .page-info {
    font-size: 12px;
    color: var(--text-muted);
}

.page-nav {
    display: flex;
    gap: 4px;
}

.page-btn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover:not(:disabled) {
    background: rgba(108, 92, 231, 0.1);
    border-color: rgba(108, 92, 231, 0.3);
    color: var(--accent-light);
}

.page-btn.active {
    background: var(--gradient-1);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 2px 10px rgba(108, 92, 231, 0.3);
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

/* Bulk bar */
.bulk-bar {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: rgba(108, 92, 231, 0.1);
    border: 1px solid rgba(108, 92, 231, 0.2);
    border-radius: var(--radius-md);
    margin-bottom: 14px;
    font-size: 13px;
    animation: fadeIn 0.3s ease;
}

.bulk-bar.show {
    display: flex;
}

/* ==================== MODALS ==================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    z-index: 200;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px;
    width: 580px;
    max-width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.show .modal {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close-btn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.close-btn:hover {
    background: rgba(225, 112, 85, 0.1);
    border-color: rgba(225, 112, 85, 0.3);
    color: #fab1a0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    background: var(--bg-input);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.checkbox-group {
    display: flex;
    gap: 16px;
    padding: 6px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.checkbox-label:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.03);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-label input[type="checkbox"]:checked+.check-mark {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox-label input[type="checkbox"]:checked+.check-mark::after {
    opacity: 1;
}

.check-mark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-hover);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
    flex-shrink: 0;
}

.check-mark::after {
    content: '\2713';
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    opacity: 0;
    transition: var(--transition);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

/* Detail modal */
.detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.detail-avatar {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: #fff;
}

.detail-name {
    font-size: 20px;
    font-weight: 700;
}

.detail-email {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.detail-badges {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.detail-platforms {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.detail-platform-card {
    padding: 14px;
    border-radius: var(--radius-md);
    text-align: center;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.detail-platform-card.inactive {
    opacity: 0.25;
}

.detail-platform-card small {
    display: block;
    font-size: 10px;
    font-weight: 400;
    opacity: 0.8;
    margin-top: 4px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.detail-item {
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.detail-item.full {
    grid-column: 1 / -1;
}

.detail-item label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    margin-bottom: 6px;
    display: block;
}

.detail-item .value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

/* ==================== TOAST ==================== */
.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 14px 22px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    z-index: 300;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 380px;
    backdrop-filter: blur(10px);
    border: 1px solid;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    background: rgba(0, 184, 148, 0.15);
    color: #55efc4;
    border-color: rgba(0, 184, 148, 0.3);
}

.toast-error {
    background: rgba(225, 112, 85, 0.15);
    color: #fab1a0;
    border-color: rgba(225, 112, 85, 0.3);
}

.toast-info {
    background: rgba(9, 132, 227, 0.15);
    color: #74b9ff;
    border-color: rgba(9, 132, 227, 0.3);
}

/* ==================== DROPDOWN ==================== */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    z-index: 50;
    overflow: hidden;
    animation: fadeIn 0.2s ease;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.dropdown-menu a:hover {
    background: rgba(108, 92, 231, 0.08);
    color: var(--text-primary);
}

/* Table checkbox */
input[type="checkbox"].row-check,
.check-all {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-hover);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

input[type="checkbox"].row-check:checked,
.check-all:checked {
    background: var(--accent);
    border-color: var(--accent);
}

input[type="checkbox"].row-check:checked::after,
.check-all:checked::after {
    content: '\2713';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

/* ==================== UTILITY ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 14px;
}

.text-muted {
    color: var(--text-muted);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-center {
    text-align: center;
}

.mt-16 {
    margin-top: 16px;
}

.mb-16 {
    margin-bottom: 16px;
}

.mb-24 {
    margin-bottom: 24px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

/* ==================== CHARTS (CSS-only) ==================== */
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 160px;
    padding-top: 10px;
}

.bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    height: 100%;
    justify-content: flex-end;
}

.bar-fill {
    width: 100%;
    border-radius: 6px 6px 0 0;
    transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 4px;
    position: relative;
}

.bar-fill:hover {
    filter: brightness(1.2);
}

.bar-label {
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
    white-space: nowrap;
}

.bar-value {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
}

/* Donut chart */
.donut-container {
    display: flex;
    align-items: center;
    gap: 24px;
}

.donut {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.donut-center .donut-number {
    font-size: 24px;
    font-weight: 800;
}

.donut-center .donut-label {
    font-size: 10px;
    color: var(--text-muted);
}

.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-value {
    margin-left: auto;
    font-weight: 600;
    color: var(--text-primary);
}

/* Activity list */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background: rgba(108, 92, 231, 0.03);
    margin: 0 -8px;
    padding: 12px 8px;
    border-radius: var(--radius-sm);
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.activity-icon.add {
    background: rgba(0, 184, 148, 0.12);
    color: #55efc4;
}

.activity-icon.edit {
    background: rgba(108, 92, 231, 0.12);
    color: #a29bfe;
}

.activity-icon.delete {
    background: rgba(225, 112, 85, 0.12);
    color: #fab1a0;
}

.activity-icon.block {
    background: rgba(253, 203, 110, 0.12);
    color: #ffeaa7;
}

.activity-icon.login {
    background: rgba(9, 132, 227, 0.12);
    color: #74b9ff;
}

.activity-text {
    flex: 1;
    font-size: 13px;
}

.activity-text strong {
    font-weight: 600;
}

.activity-time {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Settings */
.settings-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    overflow: hidden;
}

.settings-section-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
    font-weight: 600;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.settings-item-info {
    flex: 1;
}

.settings-item-label {
    font-size: 14px;
    font-weight: 500;
}

.settings-item-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Toggle switch */
.toggle {
    width: 44px;
    height: 24px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.toggle.active {
    background: var(--accent);
    border-color: var(--accent);
}

.toggle::after {
    content: '';
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: var(--transition);
}

.toggle.active::after {
    left: 22px;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.4s ease both;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .sidebar {
        width: 64px;
    }

    .sidebar-header {
        padding: 16px 12px;
    }

    .sidebar-logo .logo-text,
    .nav-label,
    .nav-item span:not(.icon):not(.nav-dot),
    .nav-item .nav-badge,
    .sidebar-footer .footer-info {
        display: none;
    }

    .nav-item {
        justify-content: center;
        padding: 12px;
    }

    .sidebar-footer {
        justify-content: center;
    }

    .main {
        margin-left: 64px;
        padding: 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .platform-tabs {
        flex-wrap: wrap;
    }

    .platform-tab {
        flex: none;
        width: calc(50% - 4px);
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .checkbox-group {
        flex-wrap: wrap;
    }

    .page-header {
        flex-direction: column;
        gap: 12px;
    }

    .donut-container {
        flex-direction: column;
    }
}

</style>