* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #3B82F6;
    --primary-dark: #2563EB;
    --primary-light: #DBEAFE;
    --secondary: #6366F1;
    --accent: #F59E0B;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --dark: #0F172A;
    --dark-light: #1E293B;
    --dark-card: #334155;
    --border: #334155;
    --text: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    background: var(--dark);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, var(--dark) 0%, #1a1a3e 50%, var(--dark) 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
    animation: float 30s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(3%, 3%) rotate(1deg); }
}

.login-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 56px 48px;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 48px;
}

.login-header .logo-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.4);
}

.login-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    font-size: 15px;
    color: var(--text);
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

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

.btn-danger:hover {
    background: #DC2626;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.btn-block {
    width: 100%;
}

.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 14px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #FCA5A5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.login-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.login-footer p {
    color: var(--text-muted);
    font-size: 13px;
}

.admin-page {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.admin-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 10%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 90%, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.sidebar {
    width: 260px;
    background: var(--dark-light);
    border-right: 1px solid var(--border);
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 28px 24px;
    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.sidebar-nav {
    padding: 20px 12px;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 4px;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
    font-weight: 500;
}

.sidebar-nav li a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    padding-left: 20px;
}

.sidebar-nav li.active a {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(99, 102, 241, 0.2) 100%);
    color: var(--text);
    border-left: 3px solid var(--primary);
}

.nav-icon {
    margin-right: 12px;
    font-size: 18px;
}

.nav-text {
    font-size: 14px;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.header {
    background: var(--dark-light);
    padding: 16px 28px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.toggle-sidebar {
    display: none;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    color: var(--text);
}

.header-left h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-name {
    font-weight: 500;
    color: var(--text);
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    font-size: 13px;
}

.content-wrapper {
    padding: 32px;
    flex: 1;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.5px;
}

.page-header p {
    color: var(--text-secondary);
    margin-top: 4px;
}

.page-actions {
    display: flex;
    gap: 10px;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.card {
    background: var(--dark-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(59, 130, 246, 0.3);
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 16px;
    font-size: 24px;
    background: rgba(59, 130, 246, 0.1);
}

.card-content h3 {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.5px;
}

.row {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
}

.panel {
    background: var(--dark-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.panel-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.1);
}

.panel-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.panel-body {
    padding: 24px;
}

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

.table th, .table td {
    padding: 14px 16px;
    text-align: left;
}

.table th {
    background: rgba(0, 0, 0, 0.1);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 14px;
}

.table-striped tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.05);
}

.table tbody tr:hover {
    background: rgba(59, 130, 246, 0.05);
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.btn-edit {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 8px;
    transition: all 0.2s;
}

.btn-edit:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.btn-delete {
    background: var(--danger);
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-delete:hover {
    background: #DC2626;
}

.info-list {
    display: flex;
    flex-direction: column;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item .label {
    color: var(--text-muted);
    font-size: 13px;
}

.info-item .value {
    color: var(--text);
    font-weight: 600;
    font-size: 13px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--dark-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 460px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: modalSlide 0.4s ease-out;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.1);
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.modal-content form {
    padding: 24px;
}

select {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s;
}

select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text);
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.chart-container {
    padding: 16px 0;
}

.chart-bars {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 180px;
    padding: 0 16px;
}

.bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    margin: 0 6px;
}

.bar-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.bar-wrapper {
    width: 100%;
    max-width: 36px;
    height: 140px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.bar {
    width: 100%;
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-sm);
    transition: height 0.5s ease;
}

.bar-value {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 6px;
    font-weight: 600;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s;
}

.action-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.action-icon {
    font-size: 24px;
    margin-bottom: 6px;
}

.action-text {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.filter-group select {
    width: auto;
    padding: 10px 14px;
    font-size: 13px;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0 14px;
}

.search-box input {
    background: transparent;
    border: none;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text);
    width: 180px;
}

.search-box input:focus {
    outline: none;
}

.search-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.page-btn {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.page-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.current-page {
    padding: 8px 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.tab {
    padding: 10px 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.tab.active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--text);
}

.tab:hover {
    background: rgba(255, 255, 255, 0.05);
}

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.25s;
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(59, 130, 246, 0.3);
}

.notification-item.unread {
    border-left: 3px solid var(--primary);
}

.notification-icon {
    font-size: 24px;
    margin-right: 14px;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-content h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.notification-content p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.notification-time {
    font-size: 11px;
    color: var(--text-muted);
}

.notification-action {
    padding: 6px 12px;
    background: rgba(59, 130, 246, 0.15);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--primary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.notification-action:hover {
    background: rgba(59, 130, 246, 0.25);
}

.settings-nav {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.nav-item {
    padding: 10px 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.nav-item.active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--text);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 36px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s;
}

.upload-area:hover {
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(59, 130, 246, 0.05);
}

.upload-icon {
    font-size: 28px;
    margin-bottom: 10px;
}

.avatar-section {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.avatar {
    width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.source-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.source-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.source-bar-wrapper {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.source-bar {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    transition: width 0.5s ease;
}

.source-name {
    font-size: 13px;
    color: var(--text-secondary);
    width: 70px;
}

.source-value {
    font-size: 13px;
    color: var(--text);
    font-weight: 600;
    width: 45px;
    text-align: right;
}

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

.region-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
}

.region-flag {
    font-size: 18px;
}

.region-name {
    flex: 1;
    font-size: 13px;
    color: var(--text);
}

.region-value {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}

.chart-lines {
    position: relative;
    height: 180px;
}

.chart-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-left: 36px;
}

.grid-line {
    border-top: 1px dashed rgba(255, 255, 255, 0.05);
    font-size: 10px;
    color: var(--text-muted);
    padding-top: 3px;
}

.chart-area {
    position: relative;
    margin-left: 44px;
    height: 100%;
}

.line-chart {
    width: 100%;
    height: 100%;
}

@media (max-width: 1200px) {
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .row {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        transform: translateX(-100%);
        z-index: 2000;
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .toggle-sidebar {
        display: block;
    }
    .stats-cards {
        grid-template-columns: 1fr;
    }
    .content-wrapper {
        padding: 20px;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .page-header h1 {
        font-size: 24px;
    }
    .filter-bar {
        flex-wrap: wrap;
    }
    .search-box input {
        width: 100%;
    }
}

.result-count {
    font-size: 13px;
    color: var(--text-secondary);
    margin-left: 16px;
}

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

.post-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
}

.post-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: var(--shadow-md);
}

.post-thumbnail {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.post-content {
    padding: 20px;
}

.post-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
    line-height: 1.4;
}

.post-excerpt {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.post-date, .post-author {
    font-size: 12px;
    color: var(--text-muted);
}

.post-actions {
    display: flex;
    gap: 10px;
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
}

.api-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-top: 16px;
}

.api-status.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.api-status.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-icon {
    font-size: 20px;
}

.status-text {
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
}

.site-info {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary);
}

.site-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.api-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-sm);
    margin-top: 16px;
}

.info-icon {
    font-size: 16px;
}

.info-text {
    font-size: 13px;
    color: var(--text-secondary);
}

.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.site-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.25s;
}

.site-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(59, 130, 246, 0.3);
}

.site-status {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.site-details {
    flex: 1;
    min-width: 0;
}

.site-url {
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
    word-break: break-all;
}

.site-title {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.site-actions {
    flex-shrink: 0;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 30px;
    font-size: 14px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    color: #86EFAC;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.has-submenu > a {
    justify-content: space-between;
}

.submenu-arrow {
    font-size: 10px;
    color: var(--text-muted);
    transition: transform 0.25s ease;
}

.has-submenu.active > a,
.has-submenu:hover > a {
    background: rgba(59, 130, 246, 0.15);
    color: var(--text);
    border-left: 3px solid var(--primary);
}

.submenu {
    display: none;
    list-style: none;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    overflow: hidden;
}

.has-submenu.submenu-open .submenu {
    display: block;
}

.submenu li {
    margin: 0;
}

.submenu li a {
    display: block;
    padding: 10px 16px 10px 48px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
}

.submenu li a:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--text);
    padding-left: 52px;
}

.submenu li a.disabled {
    color: var(--text-muted);
    cursor: not-allowed;
}

.submenu li a.disabled:hover {
    background: none;
    color: var(--text-muted);
    padding-left: 48px;
}

.tabs-wrapper {
    margin-bottom: 20px;
}

.tabs-wrapper .tabs {
    display: flex;
    background: var(--dark-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 4px;
    gap: 4px;
}

.tabs-wrapper .tab {
    flex: 1;
    padding: 12px 24px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.25s;
}

.tabs-wrapper .tab:hover {
    background: rgba(255, 255, 255, 0.05);
}

.tabs-wrapper .tab.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.panel-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-left: 12px;
    font-weight: 400;
}

.status-action {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
}

.empty-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 12px;
}

.empty-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px !important;
}

.primary-panel {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border-color: rgba(59, 130, 246, 0.3);
}

.panel-tip {
    font-size: 12px;
    color: var(--primary);
    margin-left: 12px;
    font-weight: 400;
}

.panel-count {
    font-size: 13px;
    color: var(--text-muted);
    margin-left: 12px;
    font-weight: 400;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
    border-radius: var(--radius-md);
}

.btn-icon {
    margin-right: 8px;
    font-size: 18px;
}

.quick-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group.inline {
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-group.inline label {
    margin-bottom: 0;
}

.form-group.inline select {
    width: auto;
    min-width: 100px;
}

.detect-result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-top: 16px;
}

.detect-result.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.detect-result.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.result-icon {
    font-size: 24px;
}

.result-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    display: block;
}

.result-site {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
    display: block;
}

.quick-hint {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-sm);
    margin-top: 16px;
}

.hint-icon {
    font-size: 16px;
}

.hint-text {
    font-size: 13px;
    color: var(--text-secondary);
}

.sites-list.compact .site-item {
    justify-content: space-between;
}

.sites-list.compact .site-details {
    flex: 1;
    min-width: 0;
}

.sites-list.compact .site-actions {
    display: flex;
    gap: 8px;
}

@media (max-width: 768px) {
    .form-group.inline {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .form-group.inline select {
        width: 100%;
    }
    
    .sites-list.compact .site-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .sites-list.compact .site-actions {
        width: 100%;
        justify-content: flex-end;
    }
}