/* ============================================================
   CLOUD TERMINAL — Client Portal Design System
   ============================================================ */

/* Uses tokens.css for design tokens. This file provides
   client-specific component styles only. */
body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ============================================================
   CLIENT SIDEBAR — always 220px, no hover collapse
   ============================================================ */
#sidebar {
    width: 220px !important;
}

#sidebar:hover {
    width: 220px !important;
}

/* Always show all text labels — no hover needed */
.sidebar-brand .brand-text {
    opacity: 1 !important;
}

.sidebar-section-label {
    display: none !important;
}

.sidebar-nav .nav-link span:not(.nav-badge) {
    opacity: 1 !important;
}

.sidebar-footer .nav-link span {
    opacity: 1 !important;
}

/* ============================================================
   CLIENT PAGE WRAPPER
   ============================================================ */
.client-content-wrapper {
    margin-left: 220px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   SERVICE CARDS
   ============================================================ */
.service-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: all var(--duration) var(--ease);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: 4px 0 0 4px;
    background: var(--color-primary);
}

.service-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.service-card.active::before { background: var(--color-success); }
.service-card.suspended::before { background: var(--color-danger); }
.service-card.pending::before { background: var(--color-warning); }

.service-card .service-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.service-card .service-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
}

.service-card .service-detail {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.service-card .service-status {
    font-size: 0.72rem;
    font-weight: 500;
}

/* ============================================================
   DOMAIN CARDS
   ============================================================ */
.domain-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: all var(--duration) var(--ease);
}

.domain-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.domain-card .domain-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.domain-card .domain-expiry {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ============================================================
   CLIENT-SPECIFIC STAT CARDS
   ============================================================ */
.client-stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all var(--duration) var(--ease);
}

.client-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
}

.client-stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.client-stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    margin: 0 auto 0.75rem;
}

.client-stat-card .stat-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.02em;
}

.client-stat-card .stat-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 0.35rem;
}

/* Client stat card variants */
.client-stat-card.stat-accent::before { background: var(--color-primary); }
.client-stat-card.stat-accent .stat-icon { background: var(--color-primary-light); color: var(--color-primary); }

.client-stat-card.stat-success::before { background: var(--color-success); }
.client-stat-card.stat-success .stat-icon { background: var(--color-success-light); color: var(--color-success); }

.client-stat-card.stat-warning::before { background: var(--color-warning); }
.client-stat-card.stat-warning .stat-icon { background: var(--warning-subtle); color: var(--color-warning); }

.client-stat-card.stat-info::before { background: var(--info); }
.client-stat-card.stat-info .stat-icon { background: var(--info-subtle); color: var(--info); }

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary) 0%, #005a9e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
}

.profile-info-row {
    display: flex;
    align-items: center;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.875rem;
}

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

.profile-info-row .label {
    width: 140px;
    flex-shrink: 0;
    color: var(--text-muted);
    font-weight: 500;
}

.profile-info-row .value {
    color: var(--text-primary);
}

/* ============================================================
   KNOWLEDGE BASE
   ============================================================ */
.kb-category {
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--duration) var(--ease);
    text-decoration: none;
    color: inherit;
    display: block;
    background: var(--bg-surface);
}

.kb-category:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: inherit;
}

.kb-category .kb-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--color-primary-light);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.kb-category .kb-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.kb-category .kb-count {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ============================================================
   TICKET DETAILS
   ============================================================ */
.ticket-message {
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    background: var(--bg-surface);
}

.ticket-message.staff {
    border-left: 3px solid var(--color-primary);
    background: var(--color-primary-light);
}

.ticket-message .message-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.82rem;
}

.ticket-message .message-author {
    font-weight: 600;
    color: var(--text-primary);
}

.ticket-message .message-time {
    color: var(--text-muted);
}

.ticket-message .message-body {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================================
   CLIENT FOOTER
   ============================================================ */
.client-footer {
    margin-top: auto;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    padding: 1rem 0;
}

.client-footer .footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.client-footer a {
    color: var(--text-muted);
    transition: color var(--duration) var(--ease);
}

.client-footer a:hover {
    color: var(--color-primary);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
    #sidebar {
        transform: translateX(-100%);
    }

    #sidebar.active {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    }

    .client-content-wrapper {
        margin-left: 0;
    }
}

@media (max-width: 576px) {
    .client-stat-card {
        padding: 1rem;
    }

    .client-stat-card .stat-number {
        font-size: 1.5rem;
    }

    .client-footer .footer-content {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* ============================================================
   SHOP — Product Cards
   ============================================================ */
.product-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
}

.list-group-item.active {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

/* ============================================================
   SHOP — Cycle Options & Utilities
   ============================================================ */
.cursor-pointer { cursor: pointer; }

.cycle-option {
    transition: all 0.15s ease;
}

.cycle-option:hover {
    border-color: var(--color-primary) !important;
}

/* ============================================================
   INVOICE — Print Styles
   ============================================================ */
@media print {
    .no-print, .client-sidebar, .client-header, footer, .btn, #payBtn {
        display: none !important;
    }

    body {
        background: white !important;
    }

    .card {
        border: none !important;
        box-shadow: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    #wrapper {
        display: block !important;
    }

    #sidebar {
        display: none !important;
    }

    #content-wrapper {
        margin-left: 0 !important;
    }
}
