/* Client Portal Styles - WHMCS Lagom Inspired */
:root {
    --bg-light: #f4f6f9;
    --card-bg: #ffffff;
    --text-main: #333333;
    --text-muted: #6c757d;
    --border-color: #e9ecef;
    --primary-blue: #0d6efd;
    --success-green: #198754;
    --danger-red: #dc3545;
    --warning-orange: #fd7e14;
    --info-cyan: #0dcaf0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: var(--primary-blue);
    transition: 0.3s;
}

a:hover {
    color: #0b5ed7;
}

/* Auth Pages (Login / Register) */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    background: var(--card-bg);
    width: 100%;
    max-width: 450px;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-blue);
}

.auth-container h2 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.auth-container p.subtitle {
    color: var(--text-muted);
    margin-bottom: 25px;
    font-size: 0.95rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.btn {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: 0.3s;
    width: 100%;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-blue);
    color: #fff;
}

.btn-primary:hover {
    background: #0b5ed7;
    color: #fff;
}

.btn-success {
    background: var(--success-green);
    color: #fff;
}

.btn-success:hover {
    background: #157347;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--bg-light);
}

.auth-alert {
    background: #f8d7da;
    color: #842029;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    border: 1px solid #f5c2c7;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
}

/* Dashboard Layout */
.client-portal {
    display: flex;
    min-height: 100vh;
}

/* Header Navbar */
.cp-navbar {
    background: #fff;
    height: 70px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}

.cp-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-blue);
}

.cp-nav-links a {
    margin-left: 20px;
    color: var(--text-muted);
    font-weight: 500;
}

.cp-nav-links a:hover {
    color: var(--primary-blue);
}

/* Main Content Area */
.cp-main {
    margin-top: 70px;
    padding: 30px;
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    gap: 30px;
}

/* Sidebar */
.cp-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.sidebar-widget {
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    overflow: hidden;
}

.widget-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.widget-body {
    padding: 20px;
    font-size: 0.9rem;
}

.user-info p {
    color: var(--text-muted);
    margin-bottom: 5px;
}

.user-info .name {
    font-weight: bold;
    color: var(--text-main);
    font-size: 1rem;
    margin-bottom: 10px;
}

.widget-body .btn {
    padding: 8px 15px;
    font-size: 0.9rem;
    margin-top: 15px;
}

.widget-links {
    list-style: none;
}
.widget-links li {
    border-bottom: 1px solid var(--border-color);
}
.widget-links li:last-child {
    border-bottom: none;
}
.widget-links a {
    display: block;
    padding: 12px 20px;
    color: var(--text-main);
    font-size: 0.9rem;
}
.widget-links a:hover {
    background: var(--bg-light);
    color: var(--primary-blue);
}

/* Content Area */
.cp-content {
    flex-grow: 1;
}

/* Status Banner */
.status-banner {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #f5c2c7;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}
.status-banner-left {
    display: flex;
    align-items: center;
    gap: 15px;
}
.status-icon {
    width: 50px;
    height: 50px;
    background: var(--danger-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
}
.badge-red {
    background: var(--danger-red);
    color: #fff;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}
.btn-outline-red {
    border: 1px solid var(--danger-red);
    color: var(--danger-red);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    background: transparent;
    cursor: pointer;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 25px 20px;
    position: relative;
    overflow: hidden;
}

.stat-card h3 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 5px;
    line-height: 1;
}

.stat-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 3px;
}

.stat-blue::after { background: var(--primary-blue); }
.stat-green::after { background: var(--success-green); }
.stat-red::after { background: var(--danger-red); }
.stat-orange::after { background: var(--warning-orange); }

/* Panels */
.cp-panel {
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.panel-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-body {
    padding: 20px;
}

/* Service Item */
.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}
.service-item:last-child {
    border-bottom: none;
}

.service-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.badge-active {
    background: var(--success-green);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
}

.service-title {
    font-weight: 600;
}

.service-domain {
    color: var(--text-muted);
    font-size: 0.85rem;
}

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

/* Two Columns Panels */
.two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.text-muted-sm {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

@media (max-width: 992px) {
    .cp-main {
        flex-direction: column;
    }
    .cp-sidebar {
        width: 100%;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .two-cols {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 576px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .service-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}
