/* ===========================================
   RIZTO DASHBOARD STYLES
   =========================================== */

/* ===== DASHBOARD LAYOUT ===== */
.dashboard-main {
    padding-top: 100px;
    min-height: 100vh;
}

.dashboard-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 2rem;
}

/* ===== DASHBOARD HEADER ===== */
.dashboard-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--bg-glass);
    backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--border);
}

.dashboard-header-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ===== USER MENU ===== */
.user-menu {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s;
}

.user-menu-btn:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px var(--primary-glow);
}

.user-name {
    font-weight: 500;
    color: var(--text);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--bg-glass-strong);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--glass-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: var(--text);
    text-decoration: none;
    transition: background 0.2s;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    font-size: 0.9rem;
    text-align: left;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.logout-btn {
    color: var(--primary);
    border-top: 1px solid var(--border);
}

/* ===== WELCOME SECTION ===== */
.welcome-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
}

.welcome-title span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-sub {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* ===== QUICK STATS ===== */
.quick-stats {
    display: flex;
    gap: 1.5rem;
}

.stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 2rem;
    text-align: center;
    min-width: 140px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px var(--primary-glow);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* ===== SECTION HEADER ===== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ===== SERVICES GRID ===== */
.services-section {
    margin-bottom: 3rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

/* ===== SERVICE CARD ===== */
.service-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: all 0.3s var(--ease-out);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-4px);
    border-color: rgba(201, 0, 43, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201, 0, 43, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card.active {
    background: linear-gradient(145deg, rgba(201, 0, 43, 0.05), transparent);
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary), 0 10px 40px var(--primary-glow);
}

.service-card.locked {
    opacity: 0.7;
    background: rgba(0, 0, 0, 0.02);
}

.service-card.locked:hover {
    opacity: 1;
    border-color: var(--border-hover);
}

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.service-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.1));
}

.service-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-active {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-locked {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.status-trial {
    background: rgba(201, 0, 43, 0.1);
    color: var(--primary);
    border: 1px solid rgba(201, 0, 43, 0.2);
}

.status-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-expired {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.service-name {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.service-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    line-height: 1.6;
}

.service-features {
    list-style: none;
    margin-bottom: 2rem;
    padding: 0;
}

.service-features li {
    position: relative;
    padding-left: 1.75rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

.service-footer {
    margin-top: auto;
}

/* ===== ACTIVITY SECTION ===== */
.activity-section {
    margin-bottom: 3rem;
}

.activity-badge {
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.activity-log {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.activity-item.new-item {
    animation: slideIn 0.3s ease-out;
    background: rgba(201, 0, 43, 0.08);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.activity-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.activity-action {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
}

.activity-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.activity-status {
    font-size: 0.9rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-status.status-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.activity-status.status-error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto;
}

/* ===== LOADING STATE ===== */
.loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 4rem;
    color: var(--text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== ERROR STATE ===== */
.error-message {
    color: #ef4444;
    text-align: center;
    padding: 2rem;
    background: rgba(239, 68, 68, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid rgba(239, 68, 68, 0.1);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 1rem;
    }

    .welcome-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .welcome-title {
        font-size: 2rem;
    }

    .quick-stats {
        width: 100%;
        justify-content: space-between;
    }

    .stat-box {
        flex: 1;
        min-width: auto;
        padding: 1rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .user-name {
        display: none;
    }

    .dashboard-header-inner {
        padding: 1rem;
    }
}

/* ===== DARK MODE OVERRIDES ===== */
[data-theme="dark"] .dashboard-header {
    background: rgba(0, 0, 0, 0.8);
}

[data-theme="dark"] .user-dropdown {
    background: rgba(10, 10, 10, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .service-card {
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(12px);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .service-card:hover {
    border-color: var(--primary);
    background: rgba(25, 25, 25, 0.8);
}

[data-theme="dark"] .stat-box {
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(12px);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .activity-log {
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(12px);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .empty-state {
    background: rgba(20, 20, 20, 0.4);
    border-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .user-menu-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Configuration Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.config-modal {
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

.config-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.modal-overlay.active .config-modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.75rem;
    background: linear-gradient(135deg, #fff, #ccc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.close-modal {
    background: none;
    border: none;
    color: #666;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 0.5;
}

.close-modal:hover {
    color: #fff;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.75rem;
    color: #ccc;
    font-size: 0.95rem;
    font-weight: 500;
}

.form-input,
.form-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    color: #fff;
    font-family: inherit;
    transition: all 0.2s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(201, 0, 43, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ===== PREMIUM NOTIFICATION MODAL ===== */
.premium-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.premium-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.premium-modal {
    background: linear-gradient(145deg, rgba(20, 20, 23, 0.95), rgba(30, 30, 35, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    width: 90%;
    max-width: 480px;
    padding: 2.5rem;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(201, 0, 43, 0.15);
    text-align: center;
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.premium-modal-overlay.active .premium-modal {
    transform: scale(1) translateY(0);
}

.premium-modal::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    transform: rotate(45deg);
    pointer-events: none;
}

.premium-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(201, 0, 43, 0.2), rgba(255, 31, 75, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary);
    box-shadow: 0 0 30px rgba(201, 0, 43, 0.3);
    border: 1px solid rgba(201, 0, 43, 0.3);
    font-size: 2.5rem;
}

.premium-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #fff 0%, #ccc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.premium-desc {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.premium-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    background: linear-gradient(135deg, #c9002b 0%, #ff1f4b 100%);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(201, 0, 43, 0.4);
}

.premium-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(201, 0, 43, 0.5);
}

/* ===== COUNTDOWN TIMERS ===== */
.timer-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.timer-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-align: center;
}

/* Trial Timer (Detailed) */
.trial-timer {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.timer-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 40px;
}

.timer-value {
    font-size: 1.25rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.4rem;
    border-radius: 6px;
    min-width: 36px;
    text-align: center;
}