/* ========================================
   Red Pattern - Modern Dashboard Styles
   ======================================== */

/* CSS Variables */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --bg-card: rgba(26, 26, 37, 0.8);
    --bg-card-hover: rgba(36, 36, 50, 0.9);
    --bg-glass: rgba(26, 26, 37, 0.6);
    
    --accent-red: #ef4444;
    --accent-red-dark: #dc2626;
    --accent-red-light: #f87171;
    --accent-blue: #3b82f6;
    --accent-green: #22c55e;
    --accent-orange: #f97316;
    
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(239, 68, 68, 0.5);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(239, 68, 68, 0.15);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
    
    --header-height: 70px;
    --sidebar-width: 280px;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-red-dark);
}

/* ========================================
   Header
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.logo:hover {
    transform: scale(1.02);
}

.logo-icon {
    width: 40px;
    height: 24px;
    color: var(--accent-red);
    filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.4));
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.header-nav {
    display: flex;
    gap: 8px;
    background: var(--bg-tertiary);
    padding: 4px;
    border-radius: var(--radius-lg);
}

.nav-btn {
    padding: 10px 24px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
    color: var(--text-primary);
    background: var(--accent-red);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

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

.icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    position: relative;
}

.icon-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
}

.notification-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--accent-red);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-red);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.user-menu:hover {
    background: var(--bg-card-hover);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.dropdown-icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
    margin-top: var(--header-height);
    padding: 32px;
    min-height: calc(100vh - var(--header-height));
}

.page {
    display: none;
    animation: fadeIn 0.4s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Stats Section (Home)
   ======================================== */
.stats-section {
    margin-bottom: 32px;
}

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

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
}

.stat-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(239, 68, 68, 0.2);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

/* Subscription Card */
.subscription-card {
    grid-column: span 2;
}

.stat-header {
    margin-bottom: 20px;
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.stat-value {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.stat-value .number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-value .unit {
    font-size: 1rem;
    color: var(--text-secondary);
}

.subscription-history {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.history-item {
    display: flex;
    gap: 12px;
    font-size: 0.8125rem;
}

.history-item .date {
    color: var(--text-muted);
    min-width: 120px;
}

.history-item .action {
    color: var(--text-secondary);
}

.subscription-actions {
    display: flex;
    gap: 16px;
}

.btn-link {
    background: none;
    border: none;
    color: var(--accent-red);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.btn-link:hover {
    color: var(--accent-red-light);
    text-decoration: underline;
}

.btn-link.secondary {
    color: var(--text-secondary);
}

.btn-link.secondary:hover {
    color: var(--text-primary);
}

/* Trash Card */
.trash-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.trash-icon {
    width: 64px;
    height: 80px;
    flex-shrink: 0;
}

.trash-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 12px rgba(239, 68, 68, 0.3));
}

.trash-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.trash-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.trash-count {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-red);
    line-height: 1;
}

/* Storage Card */
.storage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.storage-title {
    font-size: 1rem;
    font-weight: 600;
}

.storage-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.storage-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.storage-progress {
    display: flex;
    height: 100%;
    border-radius: 4px;
    overflow: hidden;
}

.progress-segment {
    height: 100%;
    transition: width var(--transition-slow);
}

.progress-segment.trash {
    background: var(--accent-red);
}

.progress-segment.projects {
    background: var(--accent-blue);
}

.storage-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
}

.legend-dot.trash {
    background: var(--accent-red);
}

.legend-dot.projects {
    background: var(--accent-blue);
}

.legend-dot.available {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

/* Upload Card */
.upload-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.upload-zone {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.upload-zone:hover {
    border-color: var(--accent-red);
    background: rgba(239, 68, 68, 0.05);
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
}

.upload-icon svg {
    width: 100%;
    height: 100%;
}

.upload-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.5;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-dark));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary svg {
    width: 18px;
    height: 18px;
}

.btn-full {
    width: 100%;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-red);
}

/* ========================================
   Projects Section
   ======================================== */
.projects-section {
    margin-top: 32px;
}

.projects-toolbar {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.search-box svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.sort-dropdown {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.sort-dropdown select {
    padding: 10px 32px 10px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.date-filters {
    display: flex;
    gap: 16px;
    margin-left: auto;
}

.date-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.date-btn {
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.date-btn:hover {
    border-color: var(--accent-red);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.project-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(239, 68, 68, 0.2);
    box-shadow: var(--shadow-glow);
    transform: translateY(-4px);
}

.project-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-date {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
}

.project-title {
    padding: 16px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-actions {
    display: flex;
    padding: 0 16px 16px;
    gap: 8px;
}

.action-btn {
    flex: 1;
    height: 36px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.action-btn svg {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.action-btn:hover {
    background: var(--accent-red);
}

.action-btn:hover svg {
    color: white;
}

.action-btn.delete:hover {
    background: var(--accent-red);
}

/* ========================================
   Settings Layout
   ======================================== */
.settings-layout {
    display: flex;
    gap: 24px;
}

.settings-sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
}

.settings-nav {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
}

.settings-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.settings-nav-item.active {
    background: var(--accent-red);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.settings-nav-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.nav-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
}

.referral-promo {
    margin-top: 20px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.1));
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-lg);
}

.referral-promo h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.referral-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.referral-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 12px rgba(239, 68, 68, 0.3));
}

.settings-content {
    flex: 1;
    min-width: 0;
}

.settings-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.settings-section.active {
    display: block;
}

/* ========================================
   Subscription Section
   ======================================== */
.subscription-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.subscription-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.subscription-timer {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.timer-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.timer-value {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 16px;
}

.timer-value .number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.timer-value .unit {
    font-size: 1rem;
    color: var(--text-secondary);
}

.timer-progress {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.timer-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-red), var(--accent-red-light));
    border-radius: 3px;
    transition: width var(--transition-slow);
}

.timer-range {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.tariff-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

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

.tariff-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.btn-configure {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--accent-blue);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-configure:hover {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.1);
}

.btn-configure svg {
    width: 16px;
    height: 16px;
}

.tariff-sliders {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slider-header span:first-child {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.slider-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.slider-value.new {
    color: var(--accent-green);
}

.slider {
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--accent-red);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
}

.slider.active::-webkit-slider-thumb {
    background: var(--accent-green);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
}

.slider.active::-webkit-slider-thumb:hover {
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.5);
}

.slider-range {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.storage-usage {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.storage-usage .storage-header {
    margin-bottom: 16px;
}

.subscription-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.pricing-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.pricing-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.price {
    display: flex;
    align-items: center;
    gap: 8px;
}

.amount {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.period {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.discount {
    padding: 2px 8px;
    background: rgba(34, 197, 94, 0.2);
    color: var(--accent-green);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
}

.btn-pay {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-pay:hover {
    border-color: var(--accent-red);
    background: rgba(239, 68, 68, 0.1);
}

.autopay-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    font-size: 0.8125rem;
    color: var(--accent-green);
}

.autopay-info svg {
    width: 16px;
    height: 16px;
}

.payment-methods {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

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

.payment-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.payment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: all var(--transition-fast);
}

.payment-item.active {
    border-color: var(--accent-green);
}

.payment-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-logo {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 700;
}

.payment-card.mir .card-logo {
    background: linear-gradient(135deg, #00b4e6, #00a0d2);
    color: white;
}

.payment-card.mastercard .card-logo {
    background: linear-gradient(135deg, #eb001b, #f79e1b);
    color: white;
}

.card-number {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.check-icon {
    width: 20px;
    height: 20px;
    color: var(--accent-green);
}

/* ========================================
   Accounts Section
   ======================================== */
.accounts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.accounts-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.accounts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.account-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.account-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(239, 68, 68, 0.2);
}

.account-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-blue), #6366f1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
}

.account-info {
    flex: 1;
}

.account-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.account-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.account-role {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.account-role.editor {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent-blue);
}

.account-role.viewer {
    background: rgba(34, 197, 94, 0.2);
    color: var(--accent-green);
}

.account-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.btn-icon svg {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

.btn-icon:hover {
    background: var(--accent-blue);
}

.btn-icon:hover svg {
    color: white;
}

.btn-icon.delete:hover {
    background: var(--accent-red);
}

/* ========================================
   Referral Section
   ======================================== */
.referral-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.referral-info-card {
    grid-column: span 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.referral-info-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.referral-info-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.referral-rewards {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.reward-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reward-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.reward-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--accent-red);
}

.referral-link-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.referral-link-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.link-box {
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    overflow: hidden;
}

.link-box code {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    word-break: break-all;
}

.referral-stats-card {
    grid-column: span 2;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.referral-stats-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-green);
}

.referral-tables {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.referral-table {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
}

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

.table-header h4 {
    font-size: 1rem;
    font-weight: 600;
}

.table-count {
    width: 28px;
    height: 28px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
}

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

.referral-table th {
    text-align: left;
    padding: 10px 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

.referral-table td {
    padding: 12px 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.referral-table tr:last-child td {
    border-bottom: none;
}

.referral-table td svg {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    vertical-align: middle;
}

.days-earned {
    color: var(--accent-green);
    font-weight: 600;
}

/* ========================================
   Profile Section
   ======================================== */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.profile-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.email-display {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.email-display svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

.email-display span {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.profile-card.phone-verify h3 {
    font-size: 1rem;
    margin-bottom: 16px;
}

.phone-input-group {
    display: flex;
    gap: 12px;
}

.phone-input {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.phone-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.phone-input svg {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.profile-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-group label {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.field-input {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.field-input input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.9375rem;
    outline: none;
}

.field-input svg {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

/* ========================================
   Symbols Section
   ======================================== */
.symbols-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.symbols-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.symbols-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.symbol-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.symbol-icon {
    width: 24px;
    text-align: center;
    font-size: 1.125rem;
}

.symbol-dash {
    color: var(--text-muted);
}

.symbol-name {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.symbols-edit-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.symbol-edit-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.symbol-input {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: 0.875rem;
    outline: none;
    transition: all var(--transition-fast);
}

.symbol-input:focus {
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.symbols-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

/* ========================================
   Support Section
   ======================================== */
.support-header {
    text-align: center;
    margin-bottom: 32px;
}

.support-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.support-header p {
    font-size: 1rem;
    color: var(--text-secondary);
}

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

.support-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: all var(--transition-normal);
}

.support-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(239, 68, 68, 0.2);
    transform: translateY(-4px);
}

.support-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.support-icon svg {
    width: 28px;
    height: 28px;
    color: var(--accent-red);
}

.support-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.support-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.faq-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.faq-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-tertiary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.faq-question:hover {
    background: var(--bg-card-hover);
}

.faq-question span {
    font-size: 0.9375rem;
    font-weight: 500;
}

.faq-question svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
}

.faq-item.active .faq-question svg {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-answer p {
    padding: 16px 20px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========================================
   Modal
   ======================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 10;
}

.modal-close:hover {
    background: var(--accent-red);
}

.modal-close svg {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
}

.modal-close:hover svg {
    color: white;
}

.modal-body {
    padding: 32px;
    overflow-y: auto;
    max-height: 90vh;
}

.config-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 24px;
}

.config-current h3,
.config-new h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.config-prices {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.price-tag {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 600;
}

.price-tag small {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.config-prices.new .price-tag {
    background: rgba(34, 197, 94, 0.15);
    color: var(--accent-green);
}

.config-timer {
    margin-bottom: 24px;
}

.config-timer.new .timer-value .number {
    color: var(--accent-green);
}

.timer-progress-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
    margin: 12px 0 8px;
}

.timer-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-red), var(--accent-red-light));
    border-radius: 3px;
}

.config-timer.new .timer-fill {
    background: linear-gradient(90deg, var(--accent-green), #4ade80);
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

/* ========================================
   Toast Notification
   ======================================== */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 16px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 3000;
    opacity: 0;
    transition: all var(--transition-normal);
}

.toast.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-message {
    font-size: 0.9375rem;
    font-weight: 500;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1400px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .subscription-card {
        grid-column: span 2;
    }
}

@media (max-width: 1200px) {
    .settings-layout {
        flex-direction: column;
    }
    
    .settings-sidebar {
        width: 100%;
    }
    
    .settings-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .settings-nav-item {
        flex: 1;
        min-width: 200px;
    }
    
    .referral-promo {
        display: none;
    }
    
    .subscription-grid {
        grid-template-columns: 1fr;
    }
    
    .referral-grid {
        grid-template-columns: 1fr;
    }
    
    .referral-stats-card,
    .referral-tables {
        grid-column: span 1;
    }
    
    .referral-tables {
        grid-template-columns: 1fr;
    }
    
    .profile-grid {
        grid-template-columns: 1fr;
    }
    
    .symbols-grid,
    .symbols-edit-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .support-grid {
        grid-template-columns: 1fr;
    }
    
    .config-comparison {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0 16px;
    }
    
    .header-nav {
        display: none;
    }
    
    .main-content {
        padding: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .subscription-card {
        grid-column: span 1;
    }
    
    .projects-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: none;
    }
    
    .date-filters {
        margin-left: 0;
    }
    
    .settings-nav-item {
        min-width: auto;
    }
    
    .symbols-grid,
    .symbols-edit-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 16px;
    }
    
    .modal-body {
        padding: 20px;
    }
}
