/* TowFi Provider Portal — Desktop Web App Theme */

:root {
    --gold: rgb(224, 163, 13);
    --gold-light: rgba(224, 163, 13, 0.12);
    --gold-border: rgba(224, 163, 13, 0.3);
    --dark-bg: rgb(34, 39, 43);
    --card-bg: rgb(45, 52, 60);
    --darker-bg: rgb(26, 32, 37);
    --light-card: rgb(55, 62, 70);
    --success: rgb(40, 167, 69);
    --error: rgb(220, 53, 69);
    --warning: rgb(255, 193, 7);
    --info: rgb(23, 162, 184);
    --text-primary: #ffffff;
    --text-secondary: rgba(255,255,255,0.8);
    --text-tertiary: #9ca3af;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --sidebar-width: 260px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
    background: var(--darker-bg);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Auth Pages (Login/Register) ────────────────── */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}
.auth-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1100px;
    width: 100%;
    min-height: 600px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.auth-brand {
    background: linear-gradient(135deg, var(--dark-bg) 0%, rgb(20, 24, 28) 100%);
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid rgba(255,255,255,0.06);
}
.auth-brand img { height: 52px; margin-bottom: 12px; }
.auth-brand .subtitle {
    font-size: 14px; color: var(--gold); font-weight: 700;
    letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 32px;
}
.auth-brand h1 {
    font-size: 32px; font-weight: 800; line-height: 1.2; margin-bottom: 16px;
}
.auth-brand h1 span { color: var(--gold); }
.auth-brand p { font-size: 15px; color: var(--text-tertiary); line-height: 1.6; }
.auth-brand .feature-list { margin-top: 32px; }
.auth-brand .feature-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 0; font-size: 14px; color: var(--text-secondary);
}
.auth-brand .feature-icon {
    width: 32px; height: 32px; border-radius: 8px;
    background: var(--gold-light); display: flex;
    align-items: center; justify-content: center; font-size: 14px;
    color: var(--gold); flex-shrink: 0;
}

.auth-form {
    background: var(--card-bg);
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.auth-form h2 {
    font-size: 24px; font-weight: 700; margin-bottom: 8px;
}
.auth-form .auth-subtitle {
    font-size: 14px; color: var(--text-tertiary); margin-bottom: 32px;
}

/* ── Registration Wide Layout ───────────────────── */
.reg-page {
    min-height: 100vh;
    padding: 30px 40px;
}
.reg-header {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 24px;
}
.reg-header img { height: 40px; }
.reg-header .subtitle {
    font-size: 13px; color: var(--gold); font-weight: 700;
    letter-spacing: 1.2px; text-transform: uppercase;
}
.reg-container {
    max-width: 900px;
    margin: 0 auto;
}
.reg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.reg-full { grid-column: 1 / -1; }

/* ── Dashboard Layout ───────────────────────────── */
.dash-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100vh;
}
.sidebar {
    background: var(--dark-bg);
    border-right: 1px solid rgba(255,255,255,0.06);
    padding: 0;
    position: fixed;
    width: var(--sidebar-width);
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.sidebar-logo {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-logo img { height: 36px; }
.sidebar-logo .subtitle {
    font-size: 10px; color: var(--gold); font-weight: 700;
    letter-spacing: 1.2px; text-transform: uppercase; margin-top: 4px;
}
.sidebar-nav { padding: 12px 0; flex: 1; }
.nav-section {
    padding: 8px 16px 4px;
    font-size: 10px; font-weight: 800; color: var(--text-tertiary);
    letter-spacing: 1.5px; text-transform: uppercase;
}
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 20px; margin: 2px 8px;
    border-radius: var(--radius-sm); cursor: pointer;
    font-size: 14px; font-weight: 500; color: var(--text-secondary);
    transition: all 0.15s; text-decoration: none;
}
.nav-item:hover {
    background: rgba(255,255,255,0.05); color: white; text-decoration: none;
}
.nav-item.active {
    background: var(--gold-light); color: var(--gold); font-weight: 600;
}
.nav-item .icon { width: 20px; text-align: center; font-size: 16px; }
.nav-item .badge {
    margin-left: auto; background: var(--gold);
    color: var(--darker-bg); font-size: 11px; font-weight: 800;
    padding: 2px 7px; border-radius: 10px;
}
.sidebar-user {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex; align-items: center; gap: 12px;
}
.sidebar-user .avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--gold-light); display: flex;
    align-items: center; justify-content: center;
    color: var(--gold); font-weight: 700; font-size: 14px;
}
.sidebar-user .name { font-size: 13px; font-weight: 600; }
.sidebar-user .role { font-size: 11px; color: var(--text-tertiary); }

.main-content {
    margin-left: var(--sidebar-width);
    padding: 24px 32px;
    min-height: 100vh;
}
.page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px;
}
.page-header h1 { font-size: 24px; font-weight: 700; }
.page-header .actions { display: flex; gap: 10px; }

/* ── Cards ──────────────────────────────────────── */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 24px;
    margin-bottom: 16px;
}
.card-gold { border-color: var(--gold-border); }
.card-header {
    display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
}
.card-header .icon {
    width: 40px; height: 40px; background: var(--gold-light);
    border-radius: 10px; display: flex; align-items: center;
    justify-content: center; color: var(--gold); font-size: 18px;
}
.card-header h3 { font-size: 18px; font-weight: 700; }

/* ── Stat Cards ─────────────────────────────────── */
.stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--card-bg); border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.08); padding: 20px;
}
.stat-card .label { font-size: 12px; color: var(--text-tertiary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-card .value { font-size: 28px; font-weight: 800; color: var(--gold); margin-top: 4px; }
.stat-card .change { font-size: 12px; margin-top: 4px; }
.stat-card .change.up { color: var(--success); }
.stat-card .change.down { color: var(--error); }

/* ── Tables ─────────────────────────────────────── */
.table-card { padding: 0; overflow: hidden; }
.table-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 24px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.table-header h3 { font-size: 16px; font-weight: 700; }
table { width: 100%; border-collapse: collapse; }
thead th {
    text-align: left; padding: 12px 24px;
    font-size: 11px; font-weight: 700; color: var(--text-tertiary);
    text-transform: uppercase; letter-spacing: 0.8px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
tbody td {
    padding: 14px 24px; font-size: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
tbody tr:hover { background: rgba(255,255,255,0.02); }
.status-badge {
    display: inline-flex; padding: 3px 10px; border-radius: 6px;
    font-size: 11px; font-weight: 700; text-transform: uppercase;
}
.status-active { background: rgba(40,167,69,0.15); color: var(--success); }
.status-pending { background: var(--gold-light); color: var(--gold); }
.status-completed { background: rgba(23,162,184,0.15); color: var(--info); }
.status-cancelled { background: rgba(220,53,69,0.15); color: var(--error); }

/* ── Forms ──────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block; font-size: 12px; font-weight: 700;
    color: var(--gold); text-transform: uppercase;
    letter-spacing: 0.8px; margin-bottom: 6px;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 14px 16px;
    background: var(--dark-bg); border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm); color: var(--text-primary);
    font-size: 15px; font-family: inherit; outline: none;
    transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus { border-color: var(--gold); }
.form-group input::placeholder { color: var(--text-tertiary); }
.form-group .hint { font-size: 11px; color: var(--text-tertiary); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ── Buttons ────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px; padding: 14px 28px; border: none; border-radius: var(--radius);
    font-size: 15px; font-weight: 700; font-family: inherit;
    cursor: pointer; transition: all 0.2s; text-decoration: none;
}
.btn-gold { background: var(--gold); color: var(--darker-bg); }
.btn-gold:hover { background: rgb(240,178,20); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(224,163,13,0.3); }
.btn-gold:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-outline { background: transparent; color: var(--gold); border: 1.5px solid var(--gold); }
.btn-outline:hover { background: var(--gold-light); text-decoration: none; }
.btn-dark { background: var(--dark-bg); color: var(--text-primary); border: 1px solid rgba(255,255,255,0.1); }
.btn-dark:hover { border-color: var(--gold-border); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-full { width: 100%; }
.btn-danger { background: rgba(220,53,69,0.15); color: var(--error); border: 1px solid rgba(220,53,69,0.3); }

/* ── Steps ──────────────────────────────────────── */
.steps { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; justify-content: center; }
.step { width: 10px; height: 10px; border-radius: 50%; background: var(--light-card); transition: all 0.3s; }
.step.active { background: var(--gold); width: 40px; border-radius: 5px; }
.step.done { background: var(--success); }
.step-label { text-align: center; font-size: 14px; color: var(--text-tertiary); margin-bottom: 28px; }
.step-content { display: none; }
.step-content.active { display: block; }

/* ── Services Grid ──────────────────────────────── */
.services-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.service-tag {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px; border-radius: 10px;
    font-size: 14px; font-weight: 600; cursor: pointer;
    border: 1.5px solid rgba(255,255,255,0.12);
    background: var(--dark-bg); color: var(--text-tertiary);
    transition: all 0.2s;
}
.service-tag:hover { border-color: var(--gold-border); }
.service-tag.selected { border-color: var(--gold); color: var(--gold); background: var(--gold-light); }
.check { display: none; }
.service-tag.selected .check { display: inline; }

/* ── Alerts ─────────────────────────────────────── */
.alert {
    padding: 14px 18px; border-radius: var(--radius-sm);
    font-size: 14px; display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.alert-error { background: rgba(220,53,69,0.12); color: var(--error); border: 1px solid rgba(220,53,69,0.3); }
.alert-success { background: rgba(40,167,69,0.12); color: var(--success); border: 1px solid rgba(40,167,69,0.3); }
.alert-info { background: rgba(224,163,13,0.08); color: var(--gold); border: 1px solid var(--gold-border); }

/* ── Divider ────────────────────────────────────── */
.divider { height: 1px; background: rgba(255,255,255,0.06); margin: 20px 0; }
.divider-gold { background: var(--gold-border); }

/* ── Stripe ──────────────────────────────────────── */
.stripe-banner {
    display: flex; align-items: center; justify-content: center;
    gap: 8px; padding: 12px; background: rgba(99,91,255,0.08);
    border-radius: var(--radius-sm); border: 1px solid rgba(99,91,255,0.2);
    font-size: 13px; color: rgba(255,255,255,0.6); margin-top: 16px;
}

/* ── Input with icon ─────────────────────────────── */
.input-with-icon { position: relative; }
.input-with-icon input { padding-right: 44px; }
.input-with-icon .toggle-pw {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--text-tertiary);
    cursor: pointer; font-size: 18px;
}

/* ── Spinner ─────────────────────────────────────── */
.spinner {
    width: 20px; height: 20px;
    border: 2.5px solid rgba(255,255,255,0.15);
    border-top-color: var(--gold); border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer ──────────────────────────────────────── */
.footer {
    text-align: center; padding: 24px; font-size: 12px; color: var(--text-tertiary);
}
.footer a { color: var(--text-tertiary); margin: 0 8px; }
.footer a:hover { color: var(--gold); }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 900px) {
    .auth-split { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dash-layout { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .main-content { margin-left: 0; }
    .form-row { grid-template-columns: 1fr; }
    .form-row-3 { grid-template-columns: 1fr; }
    .reg-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .auth-page { padding: 16px; }
    .auth-form { padding: 32px 24px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}
