/* ============================================================
   PLATFORM — Stripe-Inspired Design System
   ============================================================ */

/* --- CSS Variables --- */
:root {
    /* Primary palette */
    --primary: #635BFF;
    --primary-dark: #5046E5;
    --primary-light: #7A73FF;
    --primary-ghost: rgba(99, 91, 255, 0.08);

    /* Neutrals */
    --gray-50: #F7F8FA;
    --gray-100: #F0F2F5;
    --gray-200: #E3E8EF;
    --gray-300: #CDD5E0;
    --gray-400: #9AA4B2;
    --gray-500: #697586;
    --gray-600: #4B5565;
    --gray-700: #364152;
    --gray-800: #202939;
    --gray-900: #121926;

    /* Accent colors */
    --green: #30B876;
    --green-bg: rgba(48, 184, 118, 0.1);
    --blue: #3B82F6;
    --blue-bg: rgba(59, 130, 246, 0.1);
    --purple: #8B5CF6;
    --purple-bg: rgba(139, 92, 246, 0.1);
    --orange: #F59E0B;
    --orange-bg: rgba(245, 158, 11, 0.1);
    --red: #EF4444;
    --red-bg: rgba(239, 68, 68, 0.08);

    /* Layout */
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    /* Typography */
    --font-display: 'Source Serif 4', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(18, 25, 38, 0.04);
    --shadow-sm: 0 1px 3px rgba(18, 25, 38, 0.06), 0 1px 2px rgba(18, 25, 38, 0.04);
    --shadow-md: 0 4px 12px rgba(18, 25, 38, 0.06), 0 1px 3px rgba(18, 25, 38, 0.04);
    --shadow-lg: 0 12px 40px rgba(18, 25, 38, 0.08), 0 4px 12px rgba(18, 25, 38, 0.04);
    --shadow-card: 0 0 0 1px rgba(18, 25, 38, 0.06), 0 1px 3px rgba(18, 25, 38, 0.06);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    font-family: var(--font-body);
    color: var(--gray-800);
    background: var(--gray-50);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--primary-dark); }

/* ============================================================
   LOGIN PAGE
   ============================================================ */

.page-login {
    background: var(--gray-900);
    min-height: 100vh;
}

.lang-bar {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 100;
    padding: 16px 24px;
}

.lang-switcher {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 3px;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.lang-switcher a {
    padding: 5px 12px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
    border-radius: 6px;
    transition: all 0.2s;
    font-weight: 500;
}

.lang-switcher a:hover { color: rgba(255, 255, 255, 0.8); }
.lang-switcher a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.login-container {
    display: flex;
    min-height: 100vh;
}

.login-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2;
}

.brand-icon { flex-shrink: 0; }

.brand-name {
    font-family: var(--font-body);
    font-size: 1.25rem;
    font-weight: 600;
    color: #000;
    letter-spacing: -0.02em;
}

/* Animated background pattern */
.login-hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-pattern {
    position: relative;
    width: 400px;
    height: 400px;
}

.grid-line {
    position: absolute;
    background: rgba(99, 91, 255, 0.12);
    border-radius: 2px;
}

.gl-1 { width: 1px; height: 100%; left: 25%; animation: fadeSlideV 3s ease-in-out infinite; }
.gl-2 { width: 1px; height: 100%; left: 50%; animation: fadeSlideV 3s ease-in-out 0.5s infinite; }
.gl-3 { width: 100%; height: 1px; top: 33%; animation: fadeSlideH 3s ease-in-out 0.3s infinite; }
.gl-4 { width: 100%; height: 1px; top: 66%; animation: fadeSlideH 3s ease-in-out 0.8s infinite; }

@keyframes fadeSlideV {
    0%, 100% { opacity: 0.3; } 50% { opacity: 1; }
}
@keyframes fadeSlideH {
    0%, 100% { opacity: 0.3; } 50% { opacity: 0.8; }
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    animation: floatCard 6s ease-in-out infinite;
}

.fc-1 { top: 15%; left: 5%; animation-delay: 0s; }
.fc-2 { top: 45%; right: 5%; animation-delay: 2s; }
.fc-3 { bottom: 15%; left: 20%; animation-delay: 4s; }

@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.fc-dot {
    width: 8px; height: 8px;
    background: var(--green);
    border-radius: 50%;
    margin-bottom: 10px;
    box-shadow: 0 0 12px rgba(48, 184, 118, 0.4);
}

.fc-lines span {
    display: block;
    height: 4px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    margin-bottom: 6px;
}
.fc-lines span:nth-child(1) { width: 120px; }
.fc-lines span:nth-child(2) { width: 80px; }
.fc-lines span:nth-child(3) { width: 100px; }

.fc-bar { width: 140px; height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; margin-bottom: 10px; }
.fc-bar-fill { width: 72%; height: 100%; background: var(--primary); border-radius: 3px; }
.fc-amount { color: #fff; font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.fc-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    background: var(--green);
    color: #fff;
    font-size: 0.75rem;
    border-radius: 50%;
    margin-right: 10px;
}

.fc-3 { display: flex; align-items: center; }
.fc-3 span { color: rgba(255,255,255,0.7); font-size: 0.85rem; font-weight: 500; }

/* Login form */
.login-right {
    width: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    position: relative;
}

.login-form-wrapper {
    width: 100%;
    max-width: 360px;
    padding: 40px;
}

.login-heading {
    font-family: var(--font-display);
    font-size: 1.85rem;
    font-weight: 600;
    color: var(--gray-900);
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.login-subheading {
    color: var(--gray-500);
    font-size: 0.95rem;
    margin-bottom: 32px;
    line-height: 1.5;
}

/* Buttons */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-google {
    background: var(--gray-900);
    color: #fff;
    box-shadow: var(--shadow-sm);
}
.btn-google:hover {
    background: var(--gray-800);
    color: #fff;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-demo {
    background: var(--gray-100);
    color: var(--gray-700);
}
.btn-demo:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    padding: 10px 24px;
    width: auto;
    box-shadow: 0 1px 3px rgba(99, 91, 255, 0.3);
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 91, 255, 0.3);
}

.btn-danger {
    background: #fff;
    color: var(--red);
    border: 1px solid var(--red);
    padding: 10px 24px;
    width: auto;
}
.btn-danger:hover {
    background: var(--red);
    color: #fff;
}

.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
    color: var(--gray-400);
    font-size: 0.82rem;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.login-terms {
    margin-top: 20px;
    font-size: 0.78rem;
    color: var(--gray-400);
    line-height: 1.6;
    text-align: center;
}

.google-icon { flex-shrink: 0; }

/* Auth form (login / register) */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-form .form-input {
    padding: 10px 14px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--gray-800);
    background: #fff;
    outline: none;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form .form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.1);
}

.auth-form .form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-700);
}

.auth-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-link {
    font-size: 0.78rem;
    color: var(--primary);
    font-weight: 500;
}

.form-link:hover {
    color: var(--primary-dark);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn-full {
    width: 100%;
}

.btn-google {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
}
.btn-google:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.auth-footer-text {
    text-align: center;
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: 4px;
}

.auth-footer-text a {
    font-weight: 600;
    color: var(--primary);
}

.auth-footer-text a:hover {
    color: var(--primary-dark);
}

/* Register page — wider right panel and scroll */
.register-form-wrapper {
    max-width: 420px !important;
    padding: 32px 36px !important;
    max-height: 100vh;
    overflow-y: auto;
}

/* ============================================================
   APP LAYOUT
   ============================================================ */

.page-app {
    display: flex;
    min-height: 100vh;
    background: var(--gray-50);
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: #fff;
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    z-index: 50;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    height: var(--topbar-height);
    padding: 0 24px;
    border-bottom: 1px solid var(--gray-100);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    color: var(--gray-600);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s;
}

.nav-item:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.nav-item.active {
    background: var(--primary-ghost);
    color: var(--primary);
}

.nav-item.active svg { stroke: var(--primary); }

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--gray-100);
}

.sidebar-lang { padding: 4px 8px 8px; }

.lang-select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.82rem;
    color: var(--gray-600);
    background: var(--gray-50);
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}
.lang-select:hover { border-color: var(--gray-300); }
.lang-select:focus { border-color: var(--primary); }

.nav-logout { color: var(--gray-500); }
.nav-logout:hover { color: var(--red); background: var(--red-bg); }

.nav-separator {
    height: 1px;
    background: var(--gray-100);
    margin: 8px 12px;
}

/* Main content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Topbar */
.topbar {
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 40;
}

.topbar-left { display: flex; align-items: center; gap: 12px; }

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    color: var(--gray-600);
}
.mobile-menu-toggle:hover { background: var(--gray-100); }

.topbar-right { display: flex; align-items: center; gap: 16px; }

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
}

.topbar-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.topbar-avatar-placeholder {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 600;
}

.topbar-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
}

/* Content area */
.content-area {
    flex: 1;
    padding: 32px;
    max-width: 1200px;
    width: 100%;
}

.page-header {
    margin-bottom: 28px;
}

.page-title {
    font-family: var(--font-body);
    font-size: 1.7rem;
    font-weight: 600;
    color: var(--gray-900);
    letter-spacing: -0.03em;
    margin-bottom: 4px;
}

.page-subtitle {
    color: var(--gray-500);
    font-size: 0.92rem;
}

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

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

.stat-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-card);
    display: flex;
    gap: 16px;
    transition: box-shadow 0.2s, transform 0.2s;
}

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

a.stat-card-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.si-red    { background: rgba(239, 68, 68, 0.1);  color: var(--red); }

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.si-blue { background: var(--blue-bg); color: var(--blue); }
.si-green { background: var(--green-bg); color: var(--green); }
.si-purple { background: var(--purple-bg); color: var(--purple); }
.si-orange { background: var(--orange-bg); color: var(--orange); }
.si-red    { background: var(--red-bg); color: var(--red); }

.stat-info { display: flex; flex-direction: column; }

.stat-label {
    font-size: 0.78rem;
    color: var(--gray-500);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.stat-change {
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 4px;
}
.stat-change.positive { color: var(--green); }
.stat-change small { color: var(--gray-400); font-weight: 400; }

/* ============================================================
   CARDS & CONTENT GRID
   ============================================================ */

.content-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
}

.card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

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

.card-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-800);
}

.card-body { padding: 24px; }

/* Chart */
.chart-period {
    display: flex;
    gap: 2px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.period-btn {
    padding: 5px 14px;
    border: none;
    background: none;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray-500);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}
.period-btn:hover { color: var(--gray-700); }
.period-btn.active {
    background: #fff;
    color: var(--gray-800);
    box-shadow: var(--shadow-xs);
}

.chart-area {
    padding: 20px 24px 24px;
    height: 280px;
}

.chart-area canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Activity */
.activity-list { padding: 8px 0; }

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 24px;
    transition: background 0.15s;
}
.activity-item:hover { background: var(--gray-50); }

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.dot-green { background: var(--green); box-shadow: 0 0 0 3px var(--green-bg); }
.dot-blue { background: var(--blue); box-shadow: 0 0 0 3px var(--blue-bg); }
.dot-purple { background: var(--purple); box-shadow: 0 0 0 3px var(--purple-bg); }
.dot-orange { background: var(--orange); box-shadow: 0 0 0 3px var(--orange-bg); }

.activity-content { flex: 1; min-width: 0; }

.activity-text {
    display: block;
    font-size: 0.88rem;
    color: var(--gray-700);
    font-weight: 500;
}

.activity-time {
    font-size: 0.78rem;
    color: var(--gray-400);
    margin-top: 2px;
    display: block;
}

/* ============================================================
   ACCOUNT PAGE
   ============================================================ */

.account-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

.profile-sidebar {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 32px 24px;
    text-align: center;
}

.profile-avatar-wrapper { margin-bottom: 16px; }

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gray-100);
}

.profile-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 600;
}

.profile-name {
    font-family: var(--font-body);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.profile-email {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 20px;
}

.profile-meta {
    border-top: 1px solid var(--gray-100);
    padding-top: 16px;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
}

.meta-label { font-size: 0.8rem; color: var(--gray-500); }
.meta-value { font-size: 0.8rem; color: var(--gray-700); font-weight: 500; }

/* Settings form */
.settings-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
}

.form-input {
    padding: 10px 14px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--gray-800);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.1);
}

.form-input:disabled {
    background: var(--gray-50);
    color: var(--gray-500);
    cursor: not-allowed;
}

.form-hint {
    font-size: 0.78rem;
    color: var(--gray-400);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 8px;
}

/* Danger zone */
.card-danger { border: 1px solid rgba(239, 68, 68, 0.2); }
.card-danger .card-header { border-bottom-color: rgba(239, 68, 68, 0.1); }
.card-danger .card-header h3 { color: var(--red); }

.danger-desc {
    font-size: 0.88rem;
    color: var(--gray-600);
    margin-bottom: 16px;
    line-height: 1.6;
}

/* ============================================================
   ALERTS
   ============================================================ */

.alert {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-error {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.alert-success {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid rgba(48, 184, 118, 0.15);
}

/* ============================================================
   FOOTER
   ============================================================ */

.app-footer {
    padding: 20px 32px;
    font-size: 0.78rem;
    color: var(--gray-400);
    border-top: 1px solid var(--gray-100);
    margin-top: auto;
}

/* ============================================================
   TOOLBAR (page header with actions)
   ============================================================ */

.page-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.toolbar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.82rem;
    width: auto;
}

.search-input-wrap {
    position: relative;
}

.search-input-wrap svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    pointer-events: none;
}

.search-input {
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--gray-800);
    background: #fff;
    outline: none;
    min-width: 220px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.1);
}

/* ============================================================
   MINI STAT CARDS (horizontal row)
   ============================================================ */

.stats-row {
    display: flex;
    gap: 14px;
    margin-bottom: 22px;
}

.stat-mini {
    flex: 1;
    background: #fff;
    border-radius: var(--radius-md);
    padding: 16px 20px;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: box-shadow 0.2s, transform 0.2s;
}

.stat-mini:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.stat-mini-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-mini-info {
    display: flex;
    flex-direction: column;
}

.stat-mini-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.stat-mini-label {
    font-size: 0.74rem;
    color: var(--gray-500);
    font-weight: 500;
    margin-top: 1px;
}

/* ============================================================
   DATA TABLES
   ============================================================ */

.table-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.table-card .card-header {
    padding: 16px 22px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead th {
    padding: 10px 22px;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: left;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}

.data-table tbody tr {
    transition: background 0.12s;
}

.data-table tbody tr:hover {
    background: rgba(99, 91, 255, 0.02);
}

.data-table tbody td {
    padding: 14px 22px;
    font-size: 0.88rem;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Cell helpers */
.cell-primary {
    font-weight: 600;
    color: var(--gray-900);
}

.cell-secondary {
    font-size: 0.78rem;
    color: var(--gray-400);
    margin-top: 1px;
}

.cell-stack {
    display: flex;
    flex-direction: column;
}

/* ============================================================
   BADGES / STATUS PILLS
   ============================================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.74rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.badge-green  { background: var(--green-bg);  color: #1a7f4b; }
.badge-green::before  { background: var(--green); }
.badge-yellow { background: var(--orange-bg); color: #92610e; }
.badge-yellow::before { background: var(--orange); }
.badge-red    { background: var(--red-bg);    color: #b91c1c; }
.badge-red::before    { background: var(--red); }
.badge-blue   { background: var(--blue-bg);   color: #1d5bbf; }
.badge-blue::before   { background: var(--blue); }
.badge-gray   { background: var(--gray-100);  color: var(--gray-600); }
.badge-gray::before   { background: var(--gray-400); }
.badge-orange { background: #fff3e0; color: #c25e00; }
.badge-orange::before { background: #f57c00; }

.cell-mono {
    font-family: 'SF Mono', SFMono-Regular, Consolas, monospace;
    font-size: 0.82rem;
    color: var(--gray-600);
    letter-spacing: 0.02em;
}

.rating-stars {
    color: #f59e0b;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* ============================================================
   TABLE ACTION BUTTONS
   ============================================================ */

.table-actions {
    display: flex;
    gap: 6px;
}

.btn-table {
    padding: 5px 11px;
    font-size: 0.76rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
    background: #fff;
    color: var(--gray-600);
    cursor: pointer;
    font-family: var(--font-body);
    text-decoration: none;
    transition: all 0.15s;
}

.btn-table:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-ghost);
}

/* ============================================================
   RATING STARS
   ============================================================ */

.rating {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--orange);
    font-size: 0.82rem;
}

.rating-value {
    font-weight: 600;
    color: var(--gray-800);
    margin-left: 4px;
    font-size: 0.82rem;
}

/* ============================================================
   AVATAR IN TABLE
   ============================================================ */

.table-avatar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}

.ta-blue   { background: var(--blue); }
.ta-green  { background: var(--green); }
.ta-purple { background: var(--purple); }
.ta-orange { background: var(--orange); }
.ta-red    { background: #e05b5b; }
.ta-teal   { background: #0ea5a5; }

/* ============================================================
   DETAIL / VIEW PAGE LAYOUT
   ============================================================ */

.detail-status-bar {
    display: flex;
    gap: 24px;
    padding: 14px 20px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.detail-status-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-status-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.detail-status-value {
    font-size: 0.88rem;
    color: var(--gray-800);
    font-weight: 500;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 18px;
    align-items: start;
}

.detail-main {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 24px;
}

.detail-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.detail-label {
    font-size: 0.78rem;
    color: var(--gray-500);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.detail-value {
    font-size: 0.9rem;
    color: var(--gray-800);
    font-weight: 500;
}

.detail-notes {
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--gray-100);
}

.detail-notes-text {
    font-size: 0.88rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin-top: 4px;
}

/* Quick stats grid */
.quick-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.quick-stat {
    text-align: center;
    padding: 10px 4px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
}

.quick-stat-value {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-900);
}

.quick-stat-label {
    display: block;
    font-size: 0.72rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 2px;
}

/* Driver mini card */
.driver-card-mini {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Empty state small */
.empty-state-sm {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 24px;
    color: var(--gray-400);
    font-size: 0.86rem;
}

/* Timeline */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.timeline-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
}

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

.timeline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}

.dot-red    { background: var(--red); }
.dot-blue   { background: var(--blue); }
.dot-green  { background: var(--green); }
.dot-gray   { background: var(--gray-300); }
.dot-orange { background: var(--orange); }

.timeline-content { flex: 1; }

.timeline-text {
    display: block;
    font-size: 0.84rem;
    color: var(--gray-700);
    line-height: 1.4;
}

.timeline-date {
    font-size: 0.76rem;
    color: var(--gray-400);
    margin-top: 2px;
    display: block;
}

/* ============================================================
   SETTINGS LAYOUT (tabbed sub-pages)
   ============================================================ */

.settings-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    align-items: start;
}

.settings-tabs {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 8px;
    position: sticky;
    top: 24px;
}

.settings-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--gray-600);
    text-decoration: none;
    transition: all 0.15s;
}

.settings-tab:hover {
    background: var(--gray-50);
    color: var(--gray-800);
}

.settings-tab.active {
    background: var(--primary-bg);
    color: var(--primary);
    font-weight: 600;
}

.settings-tab svg { flex-shrink: 0; }

.settings-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.settings-desc {
    font-size: 0.88rem;
    color: var(--gray-600);
    line-height: 1.6;
}

.card-header-with-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body-flush { padding: 0; }
.card-body-flush .data-table { margin: 0; border: none; }

/* Toggle switches */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-100);
}

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

.toggle-info { flex: 1; }

.toggle-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.toggle-desc {
    display: block;
    font-size: 0.82rem;
    color: var(--gray-500);
}

.toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    margin-left: 16px;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--gray-200);
    border-radius: 24px;
    transition: 0.2s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Form hint text */
.form-hint {
    font-size: 0.78rem;
    color: var(--gray-400);
    margin-top: 4px;
}

/* Subscription: plan banner */
.plan-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: #fff;
}

.plan-badge {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.plan-price {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 4px 0;
}

.plan-price span { font-size: 0.85rem; font-weight: 400; opacity: 0.8; }

.plan-desc { font-size: 0.85rem; opacity: 0.85; }

.plan-meta { text-align: right; }

.plan-meta-item { margin-bottom: 8px; }
.plan-meta-item:last-child { margin-bottom: 0; }

.plan-meta-label {
    display: block;
    font-size: 0.75rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.plan-meta-value { font-size: 0.88rem; font-weight: 600; }

/* Usage bars */
.usage-row {
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

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

.usage-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.usage-label { font-size: 0.86rem; color: var(--gray-700); font-weight: 500; }
.usage-count { font-size: 0.82rem; color: var(--gray-500); }

.usage-bar {
    height: 6px;
    background: var(--gray-100);
    border-radius: 6px;
    overflow: hidden;
}

.usage-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 6px;
    transition: width 0.4s ease;
}

/* Plans grid */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.plan-option {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 20px;
    position: relative;
    transition: border-color 0.2s;
}

.plan-option:hover { border-color: var(--gray-300); }

.plan-option-current {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.plan-current-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 2px 12px;
    background: var(--primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.plan-option h4 { font-size: 1rem; font-weight: 700; color: var(--gray-900); margin-bottom: 4px; }

.plan-option-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 12px;
}

.plan-option-price span { font-size: 0.82rem; font-weight: 400; color: var(--gray-500); }

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}

.plan-features li {
    font-size: 0.82rem;
    color: var(--gray-600);
    padding: 4px 0;
    padding-left: 18px;
    position: relative;
}

.plan-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--green);
    font-weight: 700;
    font-size: 0.78rem;
}

.btn-full { width: 100%; }

/* Users: avatar, roles */
.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    flex-shrink: 0;
}

.badge-purple { background: var(--purple-bg); color: #6d28d9; }
.badge-purple::before { background: var(--purple); }

.btn-table-danger { color: var(--red); }
.btn-table-danger:hover { background: var(--red-bg); }

.text-muted { color: var(--gray-400); font-size: 0.82rem; }

.roles-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.role-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

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

.role-name {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.role-desc {
    font-size: 0.82rem;
    color: var(--gray-500);
}

/* Mobile App: phone mockup */
.mobile-app-banner {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 8px 0;
}

.app-phone-frame {
    width: 120px;
    height: 210px;
    border: 3px solid var(--gray-300);
    border-radius: 18px;
    padding: 8px;
    background: var(--gray-50);
    flex-shrink: 0;
}

.app-screen {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 10px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.app-screen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-screen-logo {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--primary);
}

.app-screen-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
}

.app-screen-card {
    height: 40px;
    background: var(--gray-100);
    border-radius: 6px;
}

.app-screen-card.short { height: 24px; }

.app-screen-nav {
    margin-top: auto;
    display: flex;
    gap: 4px;
    justify-content: center;
}

.app-screen-nav span {
    width: 16px;
    height: 3px;
    background: var(--gray-200);
    border-radius: 3px;
}

.app-info h4 { font-size: 1.1rem; font-weight: 700; color: var(--gray-900); margin-bottom: 6px; }
.app-info p { font-size: 0.88rem; color: var(--gray-600); line-height: 1.5; margin-bottom: 14px; }

.app-badges { display: flex; gap: 8px; }

.btn-dark {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--gray-900);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-dark:hover { background: var(--gray-700); }

/* Integrations grid */
.integrations-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.integration-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s;
}

.integration-card:hover { border-color: var(--gray-300); }

.integration-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.integration-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.int-gps        { background: #e0f2fe; color: #0284c7; }
.int-tacho      { background: #fce7f3; color: #be185d; }
.int-fuel       { background: #fef3c7; color: #b45309; }
.int-accounting { background: #d1fae5; color: #059669; }
.int-erp        { background: var(--purple-bg); color: var(--purple); }
.int-notify     { background: var(--orange-bg); color: var(--orange); }

.integration-name { font-size: 0.92rem; font-weight: 700; color: var(--gray-900); margin: 0; }
.integration-provider { font-size: 0.78rem; color: var(--gray-500); }

.integration-desc {
    font-size: 0.84rem;
    color: var(--gray-600);
    line-height: 1.5;
    flex: 1;
    margin-bottom: 14px;
}

.integration-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Upload area */
.upload-area {
    border: 2px dashed var(--gray-200);
    border-radius: var(--radius-md);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
}

.upload-area:hover { border-color: var(--gray-300); }

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--gray-500);
    font-size: 0.88rem;
    font-weight: 500;
}

.upload-placeholder svg { color: var(--gray-400); }

.upload-hint {
    font-size: 0.78rem;
    color: var(--gray-400);
    font-weight: 400;
}

/* ============================================================
   LEGAL PAGES (Terms, Privacy)
   ============================================================ */

.legal-page {
    min-height: 100vh;
    background: var(--gray-50);
    display: flex;
    justify-content: center;
    padding: 40px 20px;
}

.legal-container {
    max-width: 720px;
    width: 100%;
}

.legal-header {
    margin-bottom: 32px;
}

.legal-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--gray-900);
}

.legal-logo-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
}

.legal-content {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 40px 48px;
    box-shadow: var(--shadow-sm);
}

.legal-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.legal-updated {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-100);
}

.legal-body h2 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 24px 0 8px 0;
}

.legal-body h2:first-child {
    margin-top: 0;
}

.legal-body p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--gray-600);
    margin: 0 0 10px 0;
}

.legal-body a {
    color: var(--primary);
    text-decoration: none;
}

.legal-body a:hover {
    text-decoration: underline;
}

.legal-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.85rem;
    color: var(--gray-500);
}

.legal-footer a {
    color: var(--primary);
    text-decoration: none;
}

.legal-footer a:hover {
    text-decoration: underline;
}

.legal-sep {
    margin: 0 8px;
    color: var(--gray-300);
}

@media (max-width: 768px) {
    .legal-content { padding: 24px 20px; }
    .legal-title { font-size: 1.4rem; }
}

/* ============================================================
   FORM PAGES (Add Asset, Add Driver, etc.)
   ============================================================ */

.form-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-page .card {
    overflow: visible;
}

.form-page .settings-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-page .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-page .form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-page .form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-700);
}

.form-page .form-input {
    padding: 9px 12px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.86rem;
    color: var(--gray-800);
    background: #fff;
    outline: none;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-page .form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

.form-page-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 4px;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    border: 1px solid var(--gray-200);
    background: #fff;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-outline:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
    color: var(--gray-800);
}

/* ============================================================
   RESPONSIVE — TABLES
   ============================================================ */

@media (max-width: 1024px) {
    .stats-row { flex-wrap: wrap; }
    .stats-row .stat-mini { min-width: calc(50% - 8px); }
    .page-header-row { flex-direction: column; }
    .settings-layout { grid-template-columns: 180px 1fr; }
    .plans-grid { grid-template-columns: 1fr; }
    .integrations-grid { grid-template-columns: 1fr; }
    .detail-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .data-table { font-size: 0.82rem; }
    .data-table thead th,
    .data-table tbody td { padding: 10px 14px; }
    .stats-row .stat-mini { min-width: 100%; }
    .search-input { min-width: 160px; }
    .settings-layout { grid-template-columns: 1fr; }
    .settings-tabs {
        flex-direction: row;
        overflow-x: auto;
        position: static;
        gap: 0;
    }
    .settings-tab { white-space: nowrap; font-size: 0.82rem; padding: 8px 12px; }
    .settings-tab span { display: none; }
    .settings-tab svg { width: 20px; height: 20px; }
    .plan-banner { flex-direction: column; text-align: center; }
    .plan-meta { text-align: center; margin-top: 12px; }
    .mobile-app-banner { flex-direction: column; text-align: center; }
    .app-badges { justify-content: center; }
    .detail-layout { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-status-bar { gap: 14px; }
}
}

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

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

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: var(--shadow-lg);
    }
    .sidebar.open { transform: translateX(0); }

    .main-content { margin-left: 0; }

    .mobile-menu-toggle { display: flex; }

    .login-container { flex-direction: column; }
    .login-left { display: none; }
    .login-right { width: 100%; min-height: 100vh; }

    .content-area { padding: 20px 16px; }
    .stats-grid { grid-template-columns: 1fr; }

    .form-page .form-row { grid-template-columns: 1fr; }
    .form-page-actions { flex-direction: column; }
    .form-page-actions .btn { width: 100%; }

    .lang-bar { position: static; padding: 12px 16px; background: var(--gray-900); }
}
