/* ===== Modern Design System - ScriptHooks ===== */
/* Converted from Figma Make React/Tailwind export */

/* ===== CSS Variables ===== */
:root {
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;

    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-200: #bfdbfe;
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;

    --purple-100: #f3e8ff;
    --purple-300: #d8b4fe;
    --purple-400: #c084fc;
    --purple-600: #9333ea;
    --purple-700: #7c3aed;

    --emerald-100: #d1fae5;
    --emerald-600: #059669;
    --emerald-700: #047857;

    --orange-100: #ffedd5;
    --orange-700: #c2410c;

    --red-500: #ef4444;

    --pink-500: #ec4899;

    --indigo-600: #4f46e5;
}

/* ===== Base Layout ===== */
.app-container {
    min-height: 100vh;
    background: linear-gradient(to bottom right, var(--slate-50), var(--slate-100));
    display: flex;
}

/* ===== Sidebar ===== */
aside.sidebar {
    width: 256px;
    background: white;
    border-right: 1px solid rgba(226, 232, 240, 0.6);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
}

aside.sidebar .sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

aside.sidebar .sidebar-logo {
    font-size: 1.25rem;
    color: var(--slate-900);
    letter-spacing: -0.025em;
    text-decoration: none;
    display: block;
}

aside.sidebar .sidebar-logo .logo-text {
    font-size: 1.25rem;
    color: var(--slate-900);
    letter-spacing: -0.025em;
}

aside.sidebar .sidebar-logo:hover,
aside.sidebar .sidebar-logo:hover .logo-text {
    color: var(--blue-600);
}

aside.sidebar .sidebar-nav {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

aside.sidebar .nav-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

aside.sidebar .nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    border-radius: 0.75rem;
    text-decoration: none;
    color: var(--slate-600);
    font-size: 0.875rem;
    transition: all 0.2s;
    border: 1px solid transparent;
    margin-bottom: 0;
    background: transparent;
}

aside.sidebar .nav-item:hover {
    background: var(--slate-50);
    color: var(--slate-900);
}

aside.sidebar .nav-item.active {
    background: var(--blue-50);
    color: var(--blue-700);
    border-color: rgba(191, 219, 254, 0.6);
}

aside.sidebar .nav-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

aside.sidebar .nav-icon svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

aside.sidebar .nav-label {
    font-size: 0.875rem;
}

aside.sidebar .sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
    margin-top: auto;
}

aside.sidebar .credits-card,
aside.sidebar .credits-box {
    background: var(--slate-50);
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
    margin-bottom: 0.75rem;
}

aside.sidebar .credits-label {
    color: var(--slate-500);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

aside.sidebar .credits-value {
    color: var(--blue-600);
    font-size: 1.5rem;
    font-weight: 500;
}

/* User Profile Styles */
aside.sidebar .sidebar-user {
    position: relative;
}

aside.sidebar .user-profile,
aside.sidebar .user-profile-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
}

aside.sidebar .user-profile:hover,
aside.sidebar .user-profile-box:hover {
    background: var(--slate-50);
}

aside.sidebar .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--slate-800);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 500;
    font-size: 0.875rem;
    flex-shrink: 0;
}

aside.sidebar .user-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

aside.sidebar .user-name {
    color: var(--slate-700);
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    mask-image: linear-gradient(to right, black 70%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 70%, transparent 100%);
}

aside.sidebar .user-email {
    color: var(--slate-400);
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    mask-image: linear-gradient(to right, black 70%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 70%, transparent 100%);
}

aside.sidebar .user-menu-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    margin-bottom: 0.5rem;
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

aside.sidebar .user-menu-dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--slate-700);
    text-decoration: none;
    transition: background 0.2s;
}

aside.sidebar .user-menu-dropdown a:hover {
    background: var(--slate-50);
}

/* Sidebar Auth Buttons */
aside.sidebar .sidebar-auth {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

aside.sidebar .sidebar-auth-btn {
    width: 100%;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--slate-300);
    background: white;
    color: var(--slate-700);
}

aside.sidebar .sidebar-auth-btn:hover {
    background: var(--slate-50);
    border-color: var(--slate-400);
}

aside.sidebar .sidebar-auth-btn.primary {
    background: var(--blue-600);
    border-color: var(--blue-600);
    color: white;
}

aside.sidebar .sidebar-auth-btn.primary:hover {
    background: var(--blue-700);
    border-color: var(--blue-700);
}

/* ===== Main Content ===== */
.main-content-area {
    flex: 1;
    margin-left: 256px;
    min-height: 100vh;
    background: linear-gradient(to bottom right, var(--slate-50), var(--slate-100));
}

.content-wrapper {
    padding: 1.5rem;
    max-width: 64rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .content-wrapper {
        padding: 3rem;
    }
}

/* ===== Page Header ===== */
.page-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.page-header-left {
    text-align: left;
    margin-bottom: 2rem;
}

.page-header-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2.25rem;
    color: var(--slate-900);
    letter-spacing: -0.025em;
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .page-title {
        font-size: 3rem;
    }
}

.page-subtitle {
    font-size: 1.125rem;
    color: var(--slate-600);
}

/* ===== Cards ===== */
.card {
    background: white;
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.card:hover {
    border-color: rgba(203, 213, 225, 0.8);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card-sm {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--slate-900);
    margin-bottom: 0.25rem;
    text-align: left;
}

.card-subtitle {
    color: var(--slate-600);
    font-weight: 400;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

/* ===== Stats Cards ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stats-grid .stat-card {
    background: white;
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s;
    text-align: left;
    display: block;
}

.stats-grid .stat-card:hover {
    border-color: rgba(203, 213, 225, 0.8);
    box-shadow: 0 10px 15px -3px rgba(226, 232, 240, 0.5);
}

.stats-grid .stat-label {
    color: var(--slate-500);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    font-weight: 400;
    display: block;
}

.stats-grid .stat-value {
    font-size: 1.875rem;
    color: var(--slate-900);
    font-weight: 400;
    display: block;
}

.stats-grid .stat-value-blue {
    color: var(--blue-600);
}

/* Mini Stats Cards (for analytics results) */
.mini-stats-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .mini-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.mini-stat-card {
    background: white;
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 0.75rem;
    padding: 1.25rem 1rem;
    text-align: center;
}

.mini-stat-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    color: var(--slate-500);
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.mini-stat-value {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--slate-900);
}

/* Info Icon */
.info-icon {
    width: 12px;
    height: 12px;
    color: var(--slate-400);
    cursor: help;
}

/* Charts Grid */
.analytics-charts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .analytics-charts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Chart Container */
.chart-container {
    margin-bottom: 1.5rem;
}

.chart-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--slate-900);
    margin-bottom: 1rem;
    text-decoration: none;
    border: none;
}

.chart-title:link,
.chart-title:visited,
.chart-title:hover,
.chart-title:active {
    color: var(--slate-900);
    text-decoration: none;
}

/* Chart Legend */
.chart-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.chart-legend-label {
    color: var(--slate-600);
    font-size: 0.875rem;
}

/* ===== CTA Banner ===== */
.cta-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.25rem;
    background: white;
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    transition: border-color 0.3s;
}

.cta-banner:hover {
    border-color: rgba(203, 213, 225, 0.8);
}

.cta-text {
    color: var(--slate-600);
}

.cta-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--blue-600);
    text-decoration: none;
    transition: color 0.2s;
}

.cta-link:hover {
    color: var(--blue-700);
}

.cta-link svg {
    transition: transform 0.2s;
}

.cta-link:hover svg {
    transform: translateX(2px);
}

/* ===== Credits Badge ===== */
.credits-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--blue-50);
    border: 1px solid rgba(191, 219, 254, 0.6);
    border-radius: 9999px;
    color: var(--blue-700);
    margin-bottom: 2rem;
}

.credits-badge svg {
    width: 1rem;
    height: 1rem;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    color: var(--slate-700);
    margin-bottom: 0.5rem;
}

.form-hint {
    display: block;
    font-size: 0.875rem;
    color: var(--slate-500);
    margin-top: 0.5rem;
}

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

@media (min-width: 768px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

.form-row-3 {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .form-row-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== Inputs ===== */
.input,
.textarea,
.select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--slate-300);
    border-radius: 0.75rem;
    background: white;
    color: var(--slate-800);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
}

.input:focus,
.textarea:focus,
.select:focus {
    outline: none;
    border-color: var(--blue-400);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.input::placeholder,
.textarea::placeholder {
    color: var(--slate-400);
}

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

.select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.input-max-w {
    max-width: 28rem;
}

/* ===== Badges ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.badge-blue {
    background: var(--blue-100);
    color: var(--blue-700);
}

.badge-green {
    background: var(--emerald-100);
    color: var(--emerald-700);
}

.badge-purple {
    background: var(--purple-100);
    color: var(--purple-700);
}

.badge-orange {
    background: var(--orange-100);
    color: var(--orange-700);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--slate-900);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.2);
}

.btn-primary:hover {
    background: var(--slate-800);
    box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.25);
}

.btn-blue {
    background: var(--blue-600);
    color: white;
    border: none;
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    box-shadow: 0 4px 14px -3px rgba(37, 99, 235, 0.4);
}

.btn-blue:hover {
    background: var(--blue-700);
    box-shadow: 0 6px 20px -3px rgba(37, 99, 235, 0.5);
}

/* Generate Hooks button - pill style */
.btn-blue-pill {
    background: var(--blue-600);
    color: white;
    border: none;
    border-radius: 0.75rem;
    padding: 0.875rem 1.5rem;
    font-weight: 500;
    font-size: 1rem;
    box-shadow: 0 4px 14px -3px rgba(37, 99, 235, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-blue-pill:hover {
    background: var(--blue-700);
    box-shadow: 0 6px 20px -3px rgba(37, 99, 235, 0.5);
    transform: translateY(-1px);
}

.btn-blue-pill svg {
    width: 18px;
    height: 18px;
}

/* Explore Analytics button - wide style matching dropdown */
.btn-explore-analytics {
    background: var(--blue-600);
    color: white;
    border: none;
    border-radius: 0.75rem;
    padding: 0.75rem 2rem;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex: 1;
    min-width: 200px;
}

.btn-explore-analytics:hover {
    background: var(--blue-700);
}

.btn-gradient {
    background: linear-gradient(to right, var(--blue-600), var(--indigo-600));
    color: white;
    box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.3);
}

.btn-gradient:hover {
    background: linear-gradient(to right, var(--blue-700), #4338ca);
    box-shadow: 0 25px 50px -12px rgba(37, 99, 235, 0.4);
}

.btn-emerald {
    background: var(--emerald-600);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(5, 150, 105, 0.2);
}

.btn-emerald:hover {
    background: var(--emerald-700);
    box-shadow: 0 20px 25px -5px rgba(5, 150, 105, 0.3);
}

.btn-outline {
    background: white;
    color: var(--slate-700);
    border: 1px solid var(--slate-300);
}

.btn-outline:hover {
    background: var(--slate-50);
    border-color: var(--slate-400);
}

.btn-outline-purple {
    background: white;
    color: var(--purple-600);
    border: 2px solid var(--purple-300);
}

.btn-outline-purple:hover {
    background: #faf5ff;
    border-color: var(--purple-400);
}

.btn-outline-red {
    background: white;
    color: var(--red-500);
    border: 2px solid var(--red-500);
}

.btn-outline-red:hover {
    background: #fef2f2;
}

.btn-dashed {
    background: white;
    color: var(--blue-600);
    border: 2px dashed var(--slate-300);
}

.btn-dashed:hover {
    background: var(--blue-50);
    border-color: var(--blue-400);
}

.btn-lg {
    padding: 1rem 1.5rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-full {
    width: 100%;
}

.btn-flex {
    flex: 1;
}

/* ===== Platform Pills ===== */
.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pill {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--slate-300);
    background: white;
    color: var(--slate-700);
}

.pill:hover {
    background: var(--slate-50);
}

.pill.active {
    background: var(--blue-600);
    color: white;
    border-color: var(--blue-600);
}

/* ===== Category Pills (larger) ===== */
.category-pill {
    padding: 0.625rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--slate-300);
    background: white;
    color: var(--slate-700);
}

.category-pill:hover {
    border-color: var(--blue-400);
    background: var(--blue-50);
}

.category-pill.active {
    background: var(--blue-600);
    color: white;
    border-color: var(--blue-600);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.2);
}

/* ===== Tabs ===== */
.tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--slate-200);
    margin-bottom: 2rem;
}

.tab {
    padding: 0.75rem 1.5rem;
    color: var(--slate-600);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.tab:hover {
    color: var(--slate-900);
}

.tab.active {
    color: var(--blue-600);
    border-bottom-color: var(--blue-600);
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 3rem;
}

.empty-icon {
    width: 64px;
    height: 64px;
    background: var(--slate-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.empty-icon svg {
    width: 32px;
    height: 32px;
    color: var(--slate-400);
}

.empty-title {
    font-size: 1.25rem;
    color: var(--slate-900);
    margin-bottom: 0.5rem;
}

.empty-text {
    color: var(--slate-600);
    max-width: 24rem;
    margin: 0 auto;
}

/* ===== Feature Callout ===== */
.feature-callout {
    background: linear-gradient(to right, var(--blue-600), var(--indigo-600));
    border-radius: 1rem;
    padding: 1.5rem;
    color: white;
}

.feature-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.feature-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    font-size: 0.75rem;
    backdrop-filter: blur(4px);
}

.feature-text {
    font-size: 0.875rem;
    color: #dbeafe;
}

/* ===== Slider ===== */
.slider {
    width: 100%;
    height: 8px;
    background: var(--slate-200);
    border-radius: 4px;
    appearance: none;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--blue-600);
    cursor: pointer;
}

/* ===== Footer ===== */
.page-footer {
    padding-top: 2rem;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
    margin-top: 3rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.footer-link {
    color: var(--slate-600);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--slate-900);
}

.footer-copyright {
    text-align: center;
    color: var(--slate-500);
    font-size: 0.875rem;
}

/* ===== Utility Classes ===== */
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }

.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }

.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }

.hidden { display: none; }

.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }

.text-slate-400 { color: var(--slate-400); }
.text-slate-500 { color: var(--slate-500); }
.text-slate-600 { color: var(--slate-600); }
.text-slate-700 { color: var(--slate-700); }
.text-slate-900 { color: var(--slate-900); }
.text-blue-600 { color: var(--blue-600); }
.text-blue-700 { color: var(--blue-700); }
.text-red-500 { color: var(--red-500); }

.bg-slate-50 { background: var(--slate-50); }
.bg-slate-100 { background: var(--slate-100); }
.bg-white { background: white; }

.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.min-w-0 { min-width: 0; }

/* ===== Side Drawers ===== */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 100%;
    max-width: 28rem;
    background: white;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
}

.drawer.active {
    transform: translateX(0);
}

.drawer-content {
    padding: 1.5rem;
}

.drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.drawer-title {
    font-size: 1.25rem;
    color: var(--slate-900);
    margin-bottom: 0.25rem;
}

.drawer-subtitle {
    font-size: 0.875rem;
    color: var(--slate-500);
}

.drawer-close {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--slate-400);
    transition: color 0.2s;
}

.drawer-close:hover {
    color: var(--slate-600);
}

.drawer-close svg {
    width: 20px;
    height: 20px;
}

.drawer-section {
    margin-bottom: 2rem;
}

.drawer-section-title {
    font-size: 1rem;
    color: var(--slate-900);
    margin-bottom: 1rem;
}

.drawer-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

/* Drawer Form Elements */
.drawer-label {
    display: block;
    font-size: 0.875rem;
    color: var(--slate-700);
    margin-bottom: 0.5rem;
}

.drawer-label .required {
    color: var(--red-500);
}

.drawer-input,
.drawer-select {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid var(--slate-300);
    border-radius: 0.75rem;
    background: white;
    color: var(--slate-900);
    font-size: 0.875rem;
    transition: all 0.2s;
}

.drawer-input:focus,
.drawer-select:focus {
    outline: none;
    border-color: var(--blue-500);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.drawer-input::placeholder {
    color: var(--slate-400);
}

.drawer-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.5rem;
    padding-right: 2.5rem;
}

/* Slider in Drawer */
.drawer-slider-group {
    margin-bottom: 1.25rem;
}

.drawer-slider-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.drawer-slider-label {
    font-size: 0.875rem;
    color: var(--slate-700);
}

.drawer-slider-value {
    font-size: 0.875rem;
    color: var(--slate-500);
}

.drawer-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    appearance: none;
    cursor: pointer;
    background: linear-gradient(to right, #f59e0b 0%, #f59e0b 50%, #e2e8f0 50%, #e2e8f0 100%);
}

.drawer-slider::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--blue-600);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.drawer-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--blue-600);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Badge outline style for Enterprise */
.badge-amber-outline {
    background: transparent;
    color: #f59e0b;
    border: 1px solid #f59e0b;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Aspect Ratio Buttons */
.aspect-ratio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.aspect-ratio-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    border: 2px solid var(--slate-300);
    border-radius: 0.75rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.aspect-ratio-btn:hover {
    border-color: var(--blue-400);
}

.aspect-ratio-btn.active {
    border-color: var(--blue-500);
    background: var(--blue-50);
}

.aspect-ratio-icon {
    border: 2px solid currentColor;
    border-radius: 2px;
}

.aspect-ratio-icon.ratio-1-1 { width: 24px; height: 24px; }
.aspect-ratio-icon.ratio-9-2 { width: 24px; height: 12px; }
.aspect-ratio-icon.ratio-2-3 { width: 16px; height: 24px; }
.aspect-ratio-icon.ratio-16-9 { width: 24px; height: 16px; }

.aspect-ratio-label {
    font-size: 0.75rem;
    color: var(--slate-600);
}

/* Image Type Buttons */
.image-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.image-type-btn {
    padding: 0.75rem 1rem;
    border: 2px solid var(--slate-300);
    border-radius: 0.75rem;
    background: white;
    color: var(--slate-700);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.image-type-btn:hover {
    border-color: var(--blue-400);
}

.image-type-btn.active {
    border-color: var(--blue-500);
    background: var(--blue-50);
    color: var(--blue-700);
}

/* Detected Topic Box */
.detected-topic-box {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.detected-topic-text {
    font-size: 0.875rem;
    color: #9a3412;
}

.detected-topic-text strong {
    font-weight: 500;
}

/* Enterprise Feature Box */
.enterprise-feature-box {
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
}

.enterprise-feature-title {
    font-size: 1rem;
    color: var(--slate-900);
    margin-bottom: 0.5rem;
}

.enterprise-feature-text {
    font-size: 0.875rem;
    color: var(--slate-600);
    margin-bottom: 1rem;
}

/* Drawer Actions */
.drawer-actions {
    display: flex;
    gap: 0.75rem;
}

.drawer-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.drawer-cost-text {
    text-align: center;
    font-size: 0.75rem;
    color: var(--slate-400);
    margin-bottom: 1.5rem;
}

/* Preview Image */
.drawer-preview {
    margin-bottom: 1.5rem;
}

.drawer-preview img {
    width: 100%;
    border-radius: 1rem;
    border: 2px solid var(--slate-900);
}

/* Error Box */
.drawer-error-box {
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
}

.drawer-error-text {
    font-size: 0.875rem;
    color: var(--red-500);
    margin-bottom: 1rem;
}

/* ===== Mobile Responsive ===== */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1100;
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: 0.75rem;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mobile-menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--slate-600);
    transition: all 0.3s;
    border-radius: 1px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 999;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-overlay.active {
        display: block;
    }

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

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

    .page-title {
        font-size: 1.75rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .page-header-split {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .cta-banner {
        flex-direction: column;
        text-align: center;
    }
}
