/* 
 * Dashboard V3 — Clean, Modern, Professional
 * Redesigned for SMM Fastzone
 */

/* ========================================
   DASHBOARD V3 LAYOUT
   ======================================== */

.page-content:has(.dashboard-v3) {
    padding: 28px 32px !important;
}

.page-content:has(.dashboard-v3) .page-header,
.page-content:has(.dashboard-v3) nav[aria-label="breadcrumb"] {
    display: none;
}

/* Fallback for browsers without :has() support */
.dashboard-v3 ~ .page-header,
.dashboard-v3 ~ nav[aria-label="breadcrumb"] {
    display: none;
}

.dashboard-v3 {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 0;
    max-width: 1400px;
    margin: 0 auto;
}

/* ========================================
   WELCOME SECTION
   ======================================== */

.welcome-section {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
    border-radius: 20px;
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.welcome-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.welcome-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: 10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.welcome-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
    gap: 20px;
}

.welcome-greeting {
    display: block;
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 6px;
    font-weight: 500;
}

.welcome-title {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 8px;
    letter-spacing: -0.5px;
}

.welcome-desc {
    font-size: 15px;
    color: rgba(255,255,255,0.75);
    margin: 0;
    max-width: 400px;
}

.welcome-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-action-primary {
    background: #fff;
    color: #6366f1;
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

.btn-action-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    color: #6366f1;
}

.btn-action-secondary {
    background: rgba(255,255,255,0.15);
    color: #fff;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.25);
}

.btn-action-secondary:hover {
    background: rgba(255,255,255,0.25);
    color: #fff;
    transform: translateY(-2px);
}

.btn-action.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* ========================================
   STATS GRID
   ======================================== */

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

.stat-card-v3 {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border: 1px solid #f1f5f9;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.stat-card-v3:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.15);
}

.stat-card-inner {
    display: flex;
    align-items: center;
    gap: 14px;
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-balance .stat-card-icon {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    color: #7c3aed;
}

.stat-orders .stat-card-icon {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #16a34a;
}

.stat-deposit .stat-card-icon {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #2563eb;
}

.stat-spent .stat-card-icon {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #d97706;
}

.stat-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.stat-card-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-value {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-card-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 10px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    color: #6366f1;
    transition: all 0.2s ease;
}

.stat-card-link:hover {
    background: #eef2ff;
    color: #4f46e5;
}

.stat-card-link i {
    font-size: 11px;
    transition: transform 0.2s ease;
}

.stat-card-link:hover i {
    transform: translateX(3px);
}

/* ========================================
   CARDS V3
   ======================================== */

.card-v3 {
    background: #fff;
    border-radius: 18px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    overflow: hidden;
    transition: box-shadow 0.25s ease;
}

.card-v3:hover {
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.06);
}

.card-v3-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid #f1f5f9;
}

.card-v3-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
}

.card-v3-title i {
    color: #6366f1;
    font-size: 14px;
}

.card-v3-badge {
    font-size: 11px;
    font-weight: 600;
    color: #6366f1;
    background: #eef2ff;
    padding: 4px 10px;
    border-radius: 99px;
}

.card-v3-link {
    font-size: 13px;
    font-weight: 600;
    color: #6366f1;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
}

.card-v3-link:hover {
    color: #4f46e5;
}

.card-v3-link i {
    font-size: 10px;
}

.card-v3-body {
    padding: 22px;
}

.card-v3-body-flush {
    padding: 0;
}

/* ========================================
   GRID LAYOUTS
   ======================================== */

.dashboard-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ========================================
   CHART
   ======================================== */

#orderChart {
    width: 100% !important;
    max-height: 220px;
}

/* ========================================
   QUICK ACTIONS
   ======================================== */

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

.quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 10px;
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
    background: #f8fafc;
    border: 1px solid transparent;
}

.quick-item:hover {
    background: #eef2ff;
    border-color: rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

.quick-item span {
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
}

.quick-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.qi-purple { background: #ede9fe; color: #7c3aed; }
.qi-green { background: #dcfce7; color: #16a34a; }
.qi-blue { background: #dbeafe; color: #2563eb; }
.qi-orange { background: #ffedd5; color: #ea580c; }
.qi-pink { background: #fce7f3; color: #db2777; }
.qi-teal { background: #ccfbf1; color: #0d9488; }

/* ========================================
   ACCOUNT SUMMARY
   ======================================== */

.account-summary {
    background: #f8fafc;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #f1f5f9;
}

.account-summary-header {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.account-summary-title {
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.account-summary-body {
    padding: 4px 16px;
}

.account-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.account-row:last-child {
    border-bottom: none;
}

.account-label {
    font-size: 13px;
    color: #6b7280;
}

.account-value {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
}

.account-badge {
    font-size: 11px;
    font-weight: 700;
    color: #6366f1;
    background: #eef2ff;
    padding: 3px 10px;
    border-radius: 99px;
}

/* ========================================
   ORDER LIST
   ======================================== */

.order-list-v3 {
    display: flex;
    flex-direction: column;
}

.order-item-v3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 22px;
    border-bottom: 1px solid #f8fafc;
    transition: background 0.15s ease;
    gap: 12px;
}

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

.order-item-v3:hover {
    background: #fafbff;
}

.order-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.order-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.order-status-dot.status-completed,
.order-status-dot.status-success { background: #10b981; }
.order-status-dot.status-pending { background: #f59e0b; }
.order-status-dot.status-processing,
.order-status-dot.status-inprogress,
.order-status-dot.status-in\ progress { background: #3b82f6; }
.order-status-dot.status-partial { background: #8b5cf6; }
.order-status-dot.status-canceled,
.order-status-dot.status-cancelled,
.order-status-dot.status-refunded { background: #ef4444; }

.order-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.order-item-service {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-item-meta {
    font-size: 12px;
    color: #9ca3af;
}

.order-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.order-item-price {
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
}

.order-item-status {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-completed, .badge-success { background: #dcfce7; color: #16a34a; }
.badge-pending { background: #fef3c7; color: #d97706; }
.badge-processing, .badge-inprogress, .badge-in\ progress { background: #dbeafe; color: #2563eb; }
.badge-partial { background: #ede9fe; color: #7c3aed; }
.badge-canceled, .badge-cancelled, .badge-refunded { background: #fee2e2; color: #dc2626; }

/* ========================================
   SERVICE LOG LIST
   ======================================== */

.service-log-list {
    display: flex;
    flex-direction: column;
}

.service-log-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
    border-bottom: 1px solid #f8fafc;
    transition: background 0.15s ease;
}

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

.service-log-item:hover {
    background: #fafbff;
}

.service-log-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.sli-up {
    background: #fef3c7;
    color: #d97706;
}

.sli-down {
    background: #dcfce7;
    color: #16a34a;
}

.service-log-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.service-log-name {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.service-log-price {
    font-size: 12px;
    color: #6b7280;
}

.service-log-price i {
    font-size: 9px;
    margin: 0 4px;
    color: #9ca3af;
}

.service-log-date {
    font-size: 12px;
    color: #9ca3af;
    flex-shrink: 0;
}

/* ========================================
   ANNOUNCEMENTS
   ======================================== */

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

.announcement-item {
    padding: 18px;
    background: #f8fafc;
    border-radius: 14px;
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.announcement-badge {
    display: inline-flex;
    align-self: flex-start;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.announcement-badge.badge-info { background: #dbeafe; color: #2563eb; }
.announcement-badge.badge-warning { background: #fef3c7; color: #d97706; }
.announcement-badge.badge-danger { background: #fee2e2; color: #dc2626; }
.announcement-badge.badge-success { background: #dcfce7; color: #16a34a; }
.announcement-badge.badge-update { background: #ede9fe; color: #7c3aed; }
.announcement-badge.badge-promo { background: #fce7f3; color: #db2777; }

.announcement-content {
    font-size: 14px;
    line-height: 1.7;
    color: #374151;
}

.announcement-date {
    font-size: 12px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ========================================
   EMPTY STATE
   ======================================== */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 12px;
}

.empty-state i {
    font-size: 36px;
    color: #d1d5db;
}

.empty-state p {
    font-size: 14px;
    color: #9ca3af;
    margin: 0;
}

/* ========================================
   DARK THEME SUPPORT
   ======================================== */

.dark-theme .stat-card-v3,
.dark-theme .card-v3 {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.dark-theme .stat-card-v3:hover {
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
    border-color: rgba(129, 140, 248, 0.3);
}

.dark-theme .stat-card-value,
.dark-theme .card-v3-title,
.dark-theme .order-item-service,
.dark-theme .order-item-price,
.dark-theme .service-log-name,
.dark-theme .account-value {
    color: #f1f5f9;
}

.dark-theme .stat-card-label,
.dark-theme .account-label,
.dark-theme .order-item-meta,
.dark-theme .service-log-date {
    color: #64748b;
}

.dark-theme .stat-card-icon {
    opacity: 0.9;
}

.dark-theme .stat-card-link {
    background: #0f172a;
    color: #a5b4fc;
}

.dark-theme .stat-card-link:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #c7d2fe;
}

.dark-theme .card-v3-header {
    border-color: #334155;
}

.dark-theme .card-v3-title i {
    color: #818cf8;
}

.dark-theme .card-v3-badge {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
}

.dark-theme .card-v3-link {
    color: #a5b4fc;
}

.dark-theme .quick-item {
    background: #0f172a;
    border-color: #334155;
}

.dark-theme .quick-item:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(129, 140, 248, 0.3);
}

.dark-theme .quick-item span {
    color: #e2e8f0;
}

.dark-theme .quick-icon {
    opacity: 0.85;
}

.dark-theme .account-summary {
    background: #0f172a;
    border-color: #334155;
}

.dark-theme .account-summary-header {
    border-color: #334155;
}

.dark-theme .account-summary-title {
    color: #64748b;
}

.dark-theme .account-row {
    border-color: #1e293b;
}

.dark-theme .account-badge {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
}

.dark-theme .order-item-v3 {
    border-color: #1e293b;
}

.dark-theme .order-item-v3:hover {
    background: #263347;
}

.dark-theme .service-log-item {
    border-color: #1e293b;
}

.dark-theme .service-log-item:hover {
    background: #263347;
}

.dark-theme .service-log-price {
    color: #94a3b8;
}

.dark-theme .service-log-price i {
    color: #475569;
}

.dark-theme .announcement-item {
    background: #0f172a;
    border-color: #334155;
}

.dark-theme .announcement-content {
    color: #cbd5e1;
}

.dark-theme .announcement-date {
    color: #64748b;
}

.dark-theme .announcement-badge.badge-info { background: rgba(59, 130, 246, 0.15); color: #93c5fd; }
.dark-theme .announcement-badge.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fcd34d; }
.dark-theme .announcement-badge.badge-danger { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }
.dark-theme .announcement-badge.badge-success { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; }

.dark-theme .welcome-section {
    background: linear-gradient(135deg, #312e81 0%, #4c1d95 50%, #6d28d9 100%);
}

.dark-theme .empty-state i {
    color: #475569;
}

.dark-theme .empty-state p {
    color: #64748b;
}

/* Dark theme chart */
.dark-theme #orderChart {
    filter: brightness(0.95);
}

/* ========================================
   RESPONSIVE
   ======================================== */

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

@media (max-width: 992px) {
    .dashboard-grid-2 {
        grid-template-columns: 1fr;
    }

    .welcome-content {
        flex-direction: column;
        text-align: center;
    }

    .welcome-actions {
        justify-content: center;
    }

    .welcome-desc {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .dashboard-v3 {
        gap: 16px;
    }

    .welcome-section {
        padding: 24px 20px;
        border-radius: 16px;
    }

    .welcome-title {
        font-size: 22px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .stat-card-v3 {
        padding: 16px;
    }

    .stat-card-value {
        font-size: 16px;
    }

    .stat-card-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .quick-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .quick-item {
        padding: 12px 8px;
    }

    .card-v3-body {
        padding: 16px;
    }

    .order-item-v3,
    .service-log-item {
        padding: 12px 16px;
    }
}

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

    .welcome-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-action {
        justify-content: center;
    }

    .quick-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
