/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   AMERITECHWEBS HOSTING — DASHBOARD
   Premium SaaS aesthetic, teal + cream + warm gold
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    /* Brand colors — teal + cream + warm gold */
    --teal-50: #f0fdfa;
    --teal-100: #ccfbf1;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --teal-700: #0f766e;
    --teal-800: #115e59;
    --teal-900: #134e4a;

    --cream: #fafaf7;
    --cream-100: #f5f5ee;
    --cream-200: #e8e5d8;

    --gold: #c9a86a;
    --gold-dark: #a58144;

    --ink: #0f172a;
    --ink-soft: #334155;
    --muted: #64748b;
    --border: #e2e8f0;

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* Typography */
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Menlo', monospace;

    /* Spacing & sizing */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04);
    --shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    font-family: var(--font-body);
    background: var(--cream);
    color: var(--ink);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.3rem; }

a { color: var(--teal-700); text-decoration: none; }
a:hover { color: var(--teal-800); }

/* ━━━ Buttons ━━━ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border: none;
    border-radius: var(--radius-sm);
    font: 600 0.94rem var(--font-body);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    line-height: 1;
}
.btn-primary { background: var(--teal-700); color: white; }
.btn-primary:hover { background: var(--teal-800); transform: translateY(-1px); box-shadow: var(--shadow); color: white; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-dark); color: white; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--cream-100); border-color: var(--teal-500); }
.btn-danger { background: var(--danger); color: white; }
.btn-block { display: flex; width: 100%; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

/* ━━━ Forms ━━━ */
.input, .select, textarea.input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font: 0.95rem var(--font-body);
    background: white;
    color: var(--ink);
    transition: border-color 0.15s;
}
.input:focus { outline: none; border-color: var(--teal-600); box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1); }

.field { margin-bottom: 18px; }
.field label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}
.field .hint { font-size: 0.82rem; color: var(--muted); margin-top: 4px; }

/* ━━━ Auth Pages (Login / Signup) ━━━ */
.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.auth-side {
    background: linear-gradient(135deg, var(--teal-800), var(--teal-900));
    color: white;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.auth-side::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 80% 20%, rgba(201, 168, 106, 0.15), transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(20, 184, 166, 0.3), transparent 50%);
    pointer-events: none;
}
.auth-side > * { position: relative; }
.auth-side .brand {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
}
.auth-side h1 {
    font-size: 3rem;
    line-height: 1.05;
    margin-bottom: 20px;
}
.auth-side h1 em { font-style: italic; color: var(--gold); }
.auth-side .features {
    list-style: none;
    margin-top: 30px;
}
.auth-side .features li {
    padding: 10px 0;
    color: rgba(255,255,255,0.85);
    display: flex;
    gap: 12px;
}
.auth-side .features li::before {
    content: '◆';
    color: var(--gold);
}
.auth-side footer {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

.auth-form-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 50px;
    background: var(--cream);
}
.auth-form {
    width: 100%;
    max-width: 420px;
}
.auth-form h2 {
    font-size: 2rem;
    margin-bottom: 8px;
}
.auth-form > p.lead {
    color: var(--muted);
    margin-bottom: 30px;
}

/* ━━━ Alerts ━━━ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 0.9rem;
    border-left: 3px solid;
}
.alert-error { background: #fef2f2; color: #991b1b; border-color: var(--danger); }
.alert-success { background: #f0fdf4; color: #166534; border-color: var(--success); }
.alert-info { background: #eff6ff; color: #1e40af; border-color: #3b82f6; }

/* ━━━ App Layout (logged in) ━━━ */
.app {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}
.sidebar {
    background: white;
    border-right: 1px solid var(--border);
    padding: 24px 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.sidebar-brand {
    padding: 0 24px 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 18px;
}
.sidebar-brand .logo {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--teal-800);
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-brand .logo::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--gold);
    border-radius: 50%;
}
.sidebar-brand small {
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.sidebar-nav { padding: 0 12px; }
.sidebar-nav .group {
    margin-bottom: 22px;
}
.sidebar-nav .group-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0 12px 8px;
}
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    color: var(--ink-soft);
    border-radius: var(--radius-sm);
    margin-bottom: 2px;
    font-weight: 500;
    font-size: 0.92rem;
}
.sidebar-nav a:hover { background: var(--cream-100); color: var(--ink); }
.sidebar-nav a.active {
    background: var(--teal-50);
    color: var(--teal-800);
    font-weight: 600;
}

.content {
    padding: 32px 40px;
    max-width: 1280px;
}
.page-header {
    margin-bottom: 28px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.page-header h1 { font-size: 2.1rem; }
.page-header .subtitle { color: var(--muted); margin-top: 4px; }

/* ━━━ Cards ━━━ */
.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}
.card-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ━━━ Stats grid ━━━ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.stat {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
}
.stat-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    font-weight: 600;
}
.stat-value {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 600;
    margin-top: 6px;
    color: var(--teal-800);
}
.stat-delta { font-size: 0.85rem; color: var(--success); margin-top: 4px; }

/* ━━━ Hosting account row ━━━ */
.hosting-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: white;
    margin-bottom: 12px;
    transition: all 0.15s;
}
.hosting-row:hover { border-color: var(--teal-500); box-shadow: var(--shadow); }
.hosting-domain {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    flex-grow: 1;
}
.hosting-meta { display: flex; gap: 16px; font-size: 0.85rem; color: var(--muted); }
.hosting-meta strong { color: var(--ink); font-weight: 600; }

/* ━━━ Status badges ━━━ */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.badge-active { background: #dcfce7; color: #166534; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-suspended { background: #fee2e2; color: #991b1b; }
.badge-cancelled { background: #f3f4f6; color: #4b5563; }

/* ━━━ Plan cards (signup) ━━━ */
.plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    margin: 30px 0;
}
.plan-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
}
.plan-card:hover { border-color: var(--teal-500); transform: translateY(-2px); }
.plan-card.selected { border-color: var(--teal-700); box-shadow: var(--shadow-lg); background: var(--teal-50); }
.plan-card.popular::before {
    content: 'MOST POPULAR';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold);
    color: var(--ink);
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}
.plan-name {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--teal-800);
}
.plan-price {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 600;
    color: var(--ink);
    margin: 12px 0;
}
.plan-price sup { font-size: 1.2rem; vertical-align: 32px; color: var(--muted); margin-right: 4px; }
.plan-price small { font-size: 0.9rem; color: var(--muted); font-weight: 400; }
.plan-features { list-style: none; padding: 0; margin: 18px 0; }
.plan-features li { padding: 6px 0; color: var(--ink-soft); font-size: 0.9rem; }
.plan-features li::before { content: '✓ '; color: var(--teal-600); font-weight: 700; }

/* ━━━ Tables ━━━ */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}
.table th {
    text-align: left;
    padding: 14px 16px;
    background: var(--cream-100);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}
.table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover { background: var(--cream-100); }

/* ━━━ Misc ━━━ */
.flex { display: flex; align-items: center; gap: 12px; }
.flex-grow { flex-grow: 1; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 0.85rem; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 28px; }
.mt-2 { margin-top: 16px; }
.code, code {
    font-family: var(--font-mono);
    background: var(--cream-100);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--teal-800);
}

/* ━━━ iframe container for embedded cPanel ━━━ */
.cpanel-frame {
    width: 100%;
    height: calc(100vh - 100px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: white;
}

/* ━━━ Mobile ━━━ */
@media (max-width: 900px) {
    .auth-page { grid-template-columns: 1fr; }
    .auth-side { display: none; }
    .app { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        z-index: 50;
        transition: left 0.2s;
        height: 100vh;
        box-shadow: var(--shadow-lg);
    }
    .sidebar.open { left: 0; }
    .content { padding: 20px; }
    .page-header h1 { font-size: 1.6rem; }
}
