/* ==========================================================================
   Modern CSS Reset & Design System
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121e;
    --bg-tertiary: #19192c;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent: #6366f1; /* Indigo */
    --accent-light: #818cf8;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    --accent-glow: rgba(99, 102, 241, 0.15);
    
    --google-blue: #4285f4;
    --google-gradient: linear-gradient(135deg, #4285f4 0%, #357ae8 100%);
    
    --success: #10b981; /* Emerald */
    --success-light: rgba(16, 185, 129, 0.1);
    --danger: #ef4444; /* Rose */
    --danger-light: rgba(239, 68, 68, 0.1);
    --warning: #f59e0b; /* Amber */
    --warning-light: rgba(245, 158, 11, 0.1);
    
    /* Layout Constants */
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Background Glowing Orbs */
body::before, body::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.45;
}

body::before {
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    top: 10%;
    left: 10%;
}

body::after {
    background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
    bottom: 15%;
    right: 10%;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

a {
    color: var(--accent-light);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--text-primary);
}

/* ==========================================================================
   Glassmorphic Styling & Layout Components
   ========================================================================== */
.glass-panel {
    background: rgba(18, 18, 30, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: var(--glass-border);
    border-radius: var(--border-radius-md);
    box-shadow: var(--glass-shadow);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--accent-gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
}

.user-nav-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--accent);
}

/* ==========================================================================
   Login / Landing Page UI
   ========================================================================== */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    padding: 40px 20px;
}

.login-card {
    max-width: 480px;
    width: 100%;
    padding: 40px;
    text-align: center;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.login-header {
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 32px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #ffffff 50%, #c7d2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-header p {
    color: var(--text-secondary);
}

/* Google Sign-in Button */
.btn-google {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 24px;
    background: white;
    border: none;
    border-radius: var(--border-radius-sm);
    color: #1f2937;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.btn-google:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.25);
    background: #f8fafc;
}

.btn-google:active {
    transform: translateY(0);
}

.btn-google svg {
    width: 20px;
    height: 20px;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.configured {
    background-color: var(--success-light);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge.pending {
    background-color: var(--warning-light);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Setup Accordion */
.setup-instructions {
    margin-top: 35px;
    text-align: left;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 25px;
}

.setup-summary {
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    font-size: 14px;
    user-select: none;
}

.setup-summary::-webkit-details-marker {
    display: none;
}

.setup-summary::after {
    content: '❯';
    font-size: 10px;
    transition: var(--transition-smooth);
}

details[open] .setup-summary::after {
    transform: rotate(90deg);
}

.setup-content {
    margin-top: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.setup-content ol {
    margin-left: 20px;
    margin-bottom: 12px;
}

.setup-content li {
    margin-bottom: 8px;
}

.setup-content code {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    color: var(--accent-light);
}

/* ==========================================================================
   Dashboard UI
   ========================================================================== */
.dashboard-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    margin-top: 30px;
    align-items: start;
}

@media (max-width: 900px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
}

/* Sidebar & User Profile Card */
.profile-card {
    padding: 30px;
    text-align: center;
}

.avatar-wrapper {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 0 auto 20px auto;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

.online-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 18px;
    height: 18px;
    background-color: var(--success);
    border: 3px solid var(--bg-secondary);
    border-radius: 50%;
}

.profile-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-email {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
    word-break: break-all;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 15px 0;
    margin-bottom: 25px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

.btn-logout {
    display: block;
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(239, 68, 68, 0.25);
    background: transparent;
    color: #ef4444;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-logout:hover {
    background: var(--danger-light);
    border-color: #ef4444;
}

/* Dashboard Forms */
.form-panel {
    padding: 40px;
}

.panel-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.panel-header h2 {
    font-size: 24px;
}

.panel-header p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

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

.form-group.full-width {
    grid-column: span 2;
}

@media (max-width: 600px) {
    .form-group.full-width {
        grid-column: span 1;
    }
}

label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input, textarea, select {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-sm);
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 15px;
    transition: var(--transition-smooth);
    width: 100%;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent-light);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: rgba(0, 0, 0, 0.3);
}

select option {
    background: #12121e; /* Match var(--bg-secondary) */
    color: var(--text-primary);
}

input[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.02);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 14px 28px;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
    transition: var(--transition-smooth);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* ==========================================================================
   Alerts & Feedback Toasts
   ========================================================================== */
.alert {
    padding: 16px 20px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    animation: fadeIn 0.4s ease-out;
}

.alert-success {
    background-color: var(--success-light);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-danger {
    background-color: var(--danger-light);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-warning {
    background: var(--warning-light);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Footer styling */
footer {
    margin-top: auto;
    padding: 30px 20px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ==========================================================================
   Google My Business Section
   ========================================================================== */
.gmb-section {
    margin-top: 40px;
    margin-bottom: 40px;
    animation: slideUp 0.5s ease-out 0.2s both;
}

/* Section header with icon + title + action buttons */
.gmb-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.gmb-icon-wrap {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

/* Action Buttons (Sync, Disconnect) */
.btn-gmb-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.btn-sync {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-light);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.btn-sync:hover {
    background: rgba(99, 102, 241, 0.25);
    color: white;
    border-color: var(--accent-light);
    transform: translateY(-1px);
}

.btn-disconnect {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-disconnect:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
}

/* ==========================================================================
   Connect Card (not connected state)
   ========================================================================== */
.gmb-connect-card {
    padding: 50px 40px;
    text-align: center;
    border: 1px dashed rgba(99, 102, 241, 0.25);
    background: rgba(99, 102, 241, 0.03);
}

.gmb-connect-icon {
    color: var(--accent);
    margin-bottom: 20px;
}

.gmb-connect-card h3 {
    font-size: 24px;
    margin-bottom: 12px;
}

.gmb-connect-card p {
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 30px;
    line-height: 1.7;
}

/* Feature pills */
.gmb-features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
}

.gmb-feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.gmb-feature-icon {
    font-size: 16px;
}

/* Connect GMB Button */
.btn-connect-gmb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 15px 32px;
    background: white;
    color: #1f2937;
    border-radius: var(--border-radius-sm);
    font-size: 16px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: var(--transition-smooth);
    border: none;
}

.btn-connect-gmb:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
    color: #111827;
}

/* ==========================================================================
   Connected State: Account Badge + Stats Strip
   ========================================================================== */
.gmb-connected-info {
    margin-bottom: 24px;
}

.gmb-account-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--success-light);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--success);
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.gmb-stats-strip {
    display: flex;
    gap: 1px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.gmb-stat {
    flex: 1;
    background: rgba(18, 18, 30, 0.7);
    padding: 16px;
    text-align: center;
}

.gmb-stat-val {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.gmb-stat-lbl {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ==========================================================================
   Business Cards Grid
   ========================================================================== */
.biz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

@media (max-width: 700px) {
    .biz-grid {
        grid-template-columns: 1fr;
    }
}

.biz-card {
    padding: 24px;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.biz-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(99, 102, 241, 0.2);
}

/* Card Header: Avatar, Name, Verified Badge */
.biz-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.biz-avatar {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: var(--accent-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: white;
    letter-spacing: 0.05em;
}

.biz-header-info {
    flex: 1;
    min-width: 0;
}

.biz-name {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 4px;
    word-break: break-word;
}

.biz-category {
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 2px 8px;
    display: inline-block;
}

/* Verified / Unverified Badge */
.biz-verified-badge {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.biz-verified-badge.verified {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.biz-verified-badge.unverified {
    background: var(--warning-light);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Business Detail Rows */
.biz-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.biz-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.biz-detail-icon {
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 1px;
}

.biz-detail-row a {
    color: var(--accent-light);
    word-break: break-all;
}

.biz-detail-row a:hover {
    color: white;
}

/* Card Footer: Action Buttons + Sync time */
.biz-card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 14px;
}

.biz-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.biz-btn-maps {
    background: rgba(66, 133, 244, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(66, 133, 244, 0.2);
}

.biz-btn-maps:hover {
    background: rgba(66, 133, 244, 0.2);
    color: white;
}

.biz-btn-review {
    background: rgba(251, 188, 5, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(251, 188, 5, 0.2);
}

.biz-btn-review:hover {
    background: rgba(251, 188, 5, 0.2);
    color: white;
}

.biz-btn-insights {
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.biz-btn-insights:hover {
    background: rgba(99, 102, 241, 0.22);
    color: white;
    transform: translateY(-1px);
}

.biz-synced-time {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Empty state */
.gmb-empty {
    padding: 50px 30px;
    text-align: center;
}

.gmb-empty h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.gmb-empty p {
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ==========================================================================
   Navigation Links (new pages)
   ========================================================================== */
.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    padding: 7px 14px;
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.nav-link:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
}

.nav-link.active {
    background: rgba(99,102,241,0.15);
    color: var(--accent-light);
}

/* ==========================================================================
   Page Hero (shared across scheduler, settings, posts pages)
   ========================================================================== */
.page-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.page-hero-icon {
    width: 52px;
    height: 52px;
    background: var(--accent-gradient);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(99,102,241,0.35);
}

/* ==========================================================================
   Select Styled
   ========================================================================== */
select.styled-select {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--border-radius-sm);
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 15px;
    transition: var(--transition-smooth);
    width: 100%;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

select.styled-select:focus {
    outline: none;
    border-color: var(--accent-light);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

/* ==========================================================================
   Create Post Button (biz card)
   ========================================================================== */
.biz-btn-post {
    background: rgba(16,185,129,0.1);
    color: #34d399;
    border: 1px solid rgba(16,185,129,0.2);
}

.biz-btn-post:hover {
    background: rgba(16,185,129,0.2);
    color: white;
    transform: translateY(-1px);
}

/* ==========================================================================
   Settings Page
   ========================================================================== */
.settings-page-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 32px;
}

.settings-page-icon {
    font-size: 40px;
    line-height: 1;
}

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

@media (max-width: 800px) {
    .settings-layout { grid-template-columns: 1fr; }
}

.settings-sidebar {
    padding: 12px;
    position: sticky;
    top: 90px;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
    user-select: none;
}

.settings-nav-item:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}

.settings-nav-item.active {
    background: rgba(99,102,241,0.15);
    color: var(--accent-light);
    font-weight: 600;
}

.settings-nav-icon { font-size: 18px; }

.settings-panel { padding: 36px; }

.settings-tab { display: none; }
.settings-tab.active { display: block; animation: fadeIn 0.3s ease; }

/* AI Provider Cards */
.ai-provider-card {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 16px;
    transition: var(--transition-smooth);
}

.ai-provider-card:hover {
    border-color: rgba(99,102,241,0.2);
}

.ai-provider-header {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.ai-provider-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
    color: white;
}

.ai-logo-claude { background: linear-gradient(135deg, #d97706, #b45309); }
.ai-logo-gemini { background: linear-gradient(135deg, #4285f4, #0f9d58); }
.ai-logo-openai { background: linear-gradient(135deg, #10a37f, #0d7a60); }

.ai-provider-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.ai-provider-desc {
    font-size: 12px;
    color: var(--text-muted);
}

.ai-key-status {
    margin-left: auto;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.ai-key-status.connected {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid rgba(16,185,129,0.2);
}

.ai-key-status.disconnected {
    background: rgba(255,255,255,0.04);
    color: var(--text-muted);
    border: 1px solid rgba(255,255,255,0.08);
}

.api-key-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.api-key-input-wrap input {
    padding-right: 48px;
}

.btn-show-key {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    padding: 4px;
    transition: color 0.2s;
}

.btn-show-key svg { width: 18px; height: 18px; }
.btn-show-key:hover { color: var(--text-primary); }

.btn-clear-key {
    background: none;
    border: 1px solid rgba(239,68,68,0.25);
    color: #f87171;
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-family: inherit;
}

.btn-clear-key:hover {
    background: var(--danger-light);
    border-color: rgba(239,68,68,0.5);
}

/* Cron Tab */
.cron-info-card {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 22px;
}

.cron-info-card h3 { font-size: 16px; margin-bottom: 4px; }

.cron-code {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 12px 16px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #a6e3a1;
    overflow-x: auto;
    margin-top: 12px;
    white-space: pre;
}

/* ==========================================================================
   Post Composer (post-scheduler.php)
   ========================================================================== */
.composer-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

@media (max-width: 1024px) {
    .composer-layout { grid-template-columns: 1fr; }
}

.composer-step {
    padding: 28px;
    margin-bottom: 20px;
}

.composer-step-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 22px;
}

.composer-step-header h3 {
    font-size: 17px;
    margin-bottom: 3px;
}

.composer-step-header p {
    font-size: 13px;
    color: var(--text-secondary);
}

.step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(99,102,241,0.3);
}

/* Business radio cards */
.biz-selector-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.biz-radio-card {
    cursor: pointer;
}

.biz-radio-card input[type="radio"] { display: none; }

.biz-radio-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    background: rgba(0,0,0,0.15);
    transition: var(--transition-smooth);
    cursor: pointer;
}

.biz-radio-card input:checked + .biz-radio-inner {
    border-color: var(--accent);
    background: rgba(99,102,241,0.1);
    box-shadow: 0 0 0 1px var(--accent);
}

.biz-radio-inner:hover {
    border-color: rgba(99,102,241,0.3);
    background: rgba(99,102,241,0.06);
}

.biz-radio-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
}

.biz-radio-info { flex: 1; min-width: 0; }
.biz-radio-name { font-weight: 600; font-size: 14px; color: var(--text-primary); }
.biz-radio-addr { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.biz-radio-check {
    color: var(--accent);
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.2s;
}

.biz-radio-card input:checked + .biz-radio-inner .biz-radio-check { opacity: 1; }

/* Post Type Tabs */
.post-type-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 4px;
}

@media (max-width: 600px) {
    .post-type-tabs { grid-template-columns: 1fr; }
}

.post-type-tab {
    cursor: pointer;
}

.post-type-tab input[type="radio"] { display: none; }

.post-type-tab-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 18px 12px;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    background: rgba(0,0,0,0.15);
    transition: var(--transition-smooth);
    text-align: center;
    cursor: pointer;
}

.post-type-tab input:checked + .post-type-tab-inner {
    border-color: var(--accent);
    background: rgba(99,102,241,0.12);
    box-shadow: 0 0 0 1px var(--accent);
}

.post-type-tab-inner:hover {
    border-color: rgba(99,102,241,0.3);
    background: rgba(99,102,241,0.06);
}

.post-type-icon { font-size: 24px; }
.post-type-label { font-weight: 700; font-size: 14px; }
.post-type-desc { font-size: 11px; color: var(--text-muted); line-height: 1.4; }

.post-type-fields {
    margin-top: 20px;
    padding: 20px;
    background: rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px;
    animation: fadeIn 0.3s ease;
}

/* AI Writer Panel */
.ai-writer-panel {
    background: linear-gradient(135deg, rgba(99,102,241,0.06) 0%, rgba(59,130,246,0.06) 100%);
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: 14px;
    padding: 20px;
}

.ai-writer-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.ai-writer-badge {
    background: var(--accent-gradient);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.ai-prompt-row { margin-bottom: 14px; }
.ai-prompt-row textarea {
    min-height: 80px;
    border-color: rgba(99,102,241,0.2);
    background: rgba(0,0,0,0.25);
    resize: vertical;
}

.ai-btn-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ai-gen-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition-smooth);
    position: relative;
}

.ai-gen-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.ai-btn-claude {
    background: linear-gradient(135deg, rgba(217,119,6,0.15), rgba(180,83,9,0.15));
    color: #fbbf24;
    border: 1px solid rgba(217,119,6,0.3);
}

.ai-btn-claude:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(217,119,6,0.25), rgba(180,83,9,0.25));
    transform: translateY(-1px);
}

.ai-btn-gemini {
    background: linear-gradient(135deg, rgba(66,133,244,0.15), rgba(15,157,88,0.12));
    color: #60a5fa;
    border: 1px solid rgba(66,133,244,0.3);
}

.ai-btn-gemini:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(66,133,244,0.25), rgba(15,157,88,0.2));
    transform: translateY(-1px);
}

.ai-btn-openai {
    background: linear-gradient(135deg, rgba(16,163,127,0.15), rgba(13,122,96,0.15));
    color: #34d399;
    border: 1px solid rgba(16,163,127,0.3);
}

.ai-btn-openai:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(16,163,127,0.25), rgba(13,122,96,0.25));
    transform: translateY(-1px);
}

.ai-no-key {
    font-size: 10px;
    background: rgba(245,158,11,0.15);
    color: #f59e0b;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.ai-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    margin-top: 12px;
    animation: fadeIn 0.3s ease;
}

.ai-status-info    { background: rgba(99,102,241,0.1);  color: var(--accent-light); border: 1px solid rgba(99,102,241,0.2); }
.ai-status-success { background: var(--success-light);  color: var(--success);      border: 1px solid rgba(16,185,129,0.2); }
.ai-status-error   { background: var(--danger-light);   color: var(--danger);       border: 1px solid rgba(239,68,68,0.2); }
.ai-status-warning { background: var(--warning-light);  color: var(--warning);      border: 1px solid rgba(245,158,11,0.2); }

/* Publish Toggle */
.publish-toggle-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 500px) {
    .publish-toggle-row { grid-template-columns: 1fr; }
}

.publish-toggle-option { cursor: pointer; }
.publish-toggle-option input[type="radio"] { display: none; }

.publish-toggle-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    background: rgba(0,0,0,0.15);
    transition: var(--transition-smooth);
    cursor: pointer;
}

.publish-toggle-option input:checked + .publish-toggle-inner {
    border-color: var(--accent);
    background: rgba(99,102,241,0.12);
    box-shadow: 0 0 0 1px var(--accent);
}

.publish-toggle-inner:hover {
    border-color: rgba(99,102,241,0.3);
}

.publish-icon { font-size: 26px; }

.publish-mode-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.publish-mode-desc  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.btn-schedule {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 14px 28px;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(245,158,11,0.3);
    transition: var(--transition-smooth);
}

.btn-schedule:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245,158,11,0.4);
}

/* ==========================================================================
   Live Preview Card
   ========================================================================== */
.composer-preview {
    position: sticky;
    top: 90px;
}

.preview-header {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    padding: 0 4px;
}

.gmb-preview-card {
    background: rgba(18,18,30,0.8);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.preview-biz-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.preview-type-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    background: rgba(99,102,241,0.15);
    color: var(--accent-light);
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: 4px;
    padding: 2px 8px;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

.preview-content {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 14px;
    min-height: 60px;
    white-space: pre-wrap;
    word-break: break-word;
}

.preview-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(99,102,241,0.15);
    color: var(--accent-light);
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
    cursor: default;
}

.preview-footer {
    font-size: 11px;
    color: var(--text-muted);
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 10px;
}

.ai-setup-hint {
    display: flex;
    gap: 14px;
    padding: 18px;
    margin-top: 16px;
    border-radius: 12px;
    background: rgba(99,102,241,0.06);
    border-color: rgba(99,102,241,0.15);
}

.ai-setup-hint strong { font-size: 14px; display: block; margin-bottom: 4px; }
.ai-setup-hint p { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

/* ==========================================================================
   Scheduled Posts Manager
   ========================================================================== */
.posts-stats-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    overflow: hidden;
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .posts-stats-strip { grid-template-columns: repeat(2, 1fr); }
}

.posts-stat {
    padding: 20px;
    text-align: center;
    background: rgba(18,18,30,0.7);
}

.posts-stat-val {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.posts-stat-lbl {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 8px 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.2);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition-smooth);
}

.filter-tab:hover {
    border-color: rgba(99,102,241,0.3);
    color: var(--text-primary);
}

.filter-tab.active {
    background: rgba(99,102,241,0.15);
    border-color: var(--accent);
    color: var(--accent-light);
}

/* Post List Card */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.post-card {
    padding: 20px 24px;
    transition: var(--transition-smooth);
    animation: fadeIn 0.3s ease;
}

.post-card:hover {
    transform: translateY(-2px);
    border-color: rgba(99,102,241,0.15);
}

.post-card-main {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.post-card-left {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.post-type-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
    box-shadow: 0 0 8px currentColor;
}

.post-card-info { flex: 1; min-width: 0; }
.post-card-biz { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.post-card-content { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 10px; word-break: break-word; }

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text-muted);
}

.post-tag {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid;
    letter-spacing: 0.05em;
}

.post-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

.post-status-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.status-pending   { background: var(--warning-light); color: var(--warning);  border: 1px solid rgba(245,158,11,0.25); }
.status-published { background: var(--success-light); color: var(--success);  border: 1px solid rgba(16,185,129,0.25); }
.status-failed    { background: var(--danger-light);  color: var(--danger);   border: 1px solid rgba(239,68,68,0.25); }

.post-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.post-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    border: none;
    transition: var(--transition-smooth);
}

.post-btn-publish {
    background: rgba(16,185,129,0.12);
    color: #34d399;
    border: 1px solid rgba(16,185,129,0.25);
}

.post-btn-publish:hover {
    background: rgba(16,185,129,0.22);
    color: white;
}

.post-btn-delete {
    background: rgba(239,68,68,0.08);
    color: #f87171;
    border: 1px solid rgba(239,68,68,0.2);
}

.post-btn-delete:hover {
    background: var(--danger-light);
    color: white;
}

.post-btn-edit {
    background: rgba(99, 102, 241, 0.12);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.post-btn-edit:hover {
    background: rgba(99, 102, 241, 0.22);
    color: white;
}

/* Login Page Custom Styling */
.login-separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}

.login-separator::before,
.login-separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.login-separator:not(:empty)::before {
    margin-right: 15px;
}

.login-separator:not(:empty)::after {
    margin-left: 15px;
}

.login-form {
    text-align: left;
}

.login-form .form-group {
    margin-bottom: 18px;
}

.login-form label {
    margin-bottom: 6px;
    display: block;
}

/* Custom checkable chip buttons */
.chip-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
    user-select: none;
}

.chip-checkbox-label:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.chip-checkbox-input {
    display: none;
}

.chip-checkbox-input:checked + .chip-checkbox-label {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.1);
}



