/**
 * AgenticCart Admin UI
 * Modern SaaS-style design system
 */

/* ==========================================================================
   CSS Variables - Easy Branding
   ========================================================================== */

:root {
    /* Brand Colors - Change these to rebrand */
    --ac-primary: #6366f1;
    --ac-primary-hover: #4f46e5;
    --ac-primary-light: #eef2ff;
    --ac-primary-dark: #3730a3;

    /* Semantic Colors */
    --ac-success: #10b981;
    --ac-success-light: #d1fae5;
    --ac-warning: #f59e0b;
    --ac-warning-light: #fef3c7;
    --ac-error: #ef4444;
    --ac-error-light: #fee2e2;
    --ac-info: #3b82f6;
    --ac-info-light: #dbeafe;

    /* Neutrals */
    --ac-gray-50: #f9fafb;
    --ac-gray-100: #f3f4f6;
    --ac-gray-200: #e5e7eb;
    --ac-gray-300: #d1d5db;
    --ac-gray-400: #9ca3af;
    --ac-gray-500: #6b7280;
    --ac-gray-600: #4b5563;
    --ac-gray-700: #374151;
    --ac-gray-800: #1f2937;
    --ac-gray-900: #111827;

    /* Layout */
    --ac-sidebar-width: 240px;
    --ac-header-height: 64px;
    --ac-border-radius: 8px;
    --ac-border-radius-lg: 12px;
    --ac-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --ac-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --ac-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --ac-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);

    /* Typography */
    --ac-font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --ac-font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

.ac-wrap {
    font-family: var(--ac-font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--ac-gray-900);
    background: var(--ac-gray-50);
    margin: -20px -20px 0 -20px;
    min-height: calc(100vh - 32px);
}

.ac-wrap *,
.ac-wrap *::before,
.ac-wrap *::after {
    box-sizing: border-box;
}

/* ==========================================================================
   Layout Structure
   ========================================================================== */

.ac-layout {
    display: flex;
    min-height: calc(100vh - 32px);
}

/* Sidebar */
.ac-sidebar {
    width: var(--ac-sidebar-width);
    background: white;
    border-right: 1px solid var(--ac-gray-200);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 32px; /* WP Admin bar */
    left: 160px; /* WP Admin menu */
    bottom: 0;
    z-index: 100;
    transition: transform 0.2s ease;
}

/* Adjust for collapsed WP menu */
.folded .ac-sidebar {
    left: 36px;
}

@media screen and (max-width: 960px) {
    .ac-sidebar {
        left: 0;
    }
}

@media screen and (max-width: 782px) {
    .ac-sidebar {
        transform: translateX(-100%);
    }
    .ac-sidebar.open {
        transform: translateX(0);
    }
    .ac-wrap {
        margin-top: -46px;
    }
    .ac-layout {
        min-height: calc(100vh - 46px);
    }
}

/* Main Content */
.ac-main {
    flex: 1;
    margin-left: var(--ac-sidebar-width);
    padding: 32px;
    max-width: 1200px;
}

@media screen and (max-width: 782px) {
    .ac-main {
        margin-left: 0;
        padding: 20px;
    }
}

/* ==========================================================================
   Sidebar Components
   ========================================================================== */

.ac-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--ac-gray-100);
}

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

.ac-logo-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--ac-border-radius);
    object-fit: contain;
}

.ac-logo-text {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.ac-sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.ac-nav-section {
    margin-bottom: 24px;
}

.ac-nav-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ac-gray-400);
    padding: 0 12px;
    margin-bottom: 8px;
}

.ac-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--ac-border-radius);
    color: var(--ac-gray-600);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
}

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

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

.ac-nav-item .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    opacity: 0.7;
}

.ac-nav-item.active .dashicons {
    opacity: 1;
}

/* Sidebar Footer */
.ac-sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--ac-gray-100);
}

.ac-status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--ac-gray-50);
    border-radius: var(--ac-border-radius);
    font-size: 13px;
}

.ac-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ac-gray-400);
}

.ac-status-dot.active {
    background: var(--ac-success);
}

.ac-status-dot.warning {
    background: var(--ac-warning);
}

.ac-status-dot.error {
    background: var(--ac-error);
}

/* ==========================================================================
   Page Header
   ========================================================================== */

.ac-page-header {
    margin-top: 24px;
    margin-bottom: 32px;
}

.ac-page-title {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ac-gray-900);
    margin: 0 0 8px 0;
}

.ac-page-description {
    font-size: 15px;
    color: var(--ac-gray-500);
    margin: 0;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.ac-card {
    background: white;
    border-radius: var(--ac-border-radius-lg);
    border: 1px solid var(--ac-gray-200);
    box-shadow: var(--ac-shadow-sm);
    overflow: hidden;
}

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

.ac-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ac-gray-900);
    margin: 0;
}

.ac-card-body {
    padding: 24px;
}

.ac-card-footer {
    padding: 16px 24px;
    background: var(--ac-gray-50);
    border-top: 1px solid var(--ac-gray-100);
}

/* ==========================================================================
   Stats Cards
   ========================================================================== */

.ac-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.ac-stat-card {
    background: white;
    border-radius: var(--ac-border-radius-lg);
    border: 1px solid var(--ac-gray-200);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: box-shadow 0.2s ease;
}

.ac-stat-card:hover {
    box-shadow: var(--ac-shadow-md);
}

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

.ac-stat-icon.primary {
    background: var(--ac-primary-light);
    color: var(--ac-primary);
}

.ac-stat-icon.success {
    background: var(--ac-success-light);
    color: var(--ac-success);
}

.ac-stat-icon.warning {
    background: var(--ac-warning-light);
    color: var(--ac-warning);
}

.ac-stat-icon.info {
    background: var(--ac-info-light);
    color: var(--ac-info);
}

.ac-stat-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

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

.ac-stat-value {
    font-size: 28px;
    font-weight: 600;
    color: var(--ac-gray-900);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.ac-stat-label {
    font-size: 13px;
    color: var(--ac-gray-500);
    margin-top: 4px;
}

.ac-stats-grid-premium {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.ac-stat-card-premium {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 160px;
    padding: 16px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #dbe2ea;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.88), transparent 32%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.ac-stat-card-premium::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.14), transparent);
}

.ac-stat-card-premium.is-products::before {
    background: linear-gradient(90deg, #0f766e, rgba(15, 118, 110, 0.08));
}

.ac-stat-card-premium.is-categories::before {
    background: linear-gradient(90deg, #2563eb, rgba(37, 99, 235, 0.08));
}

.ac-stat-card-premium.is-brands::before {
    background: linear-gradient(90deg, #b45309, rgba(180, 83, 9, 0.08));
}

.ac-stat-card-premium.is-reviews::before {
    background: linear-gradient(90deg, #7c3aed, rgba(124, 58, 237, 0.08));
}

.ac-stat-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.ac-stat-card-kicker {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ac-stat-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px #e2e8f0;
}

.ac-stat-card-premium.is-products .ac-stat-card-icon {
    color: #0f766e;
    background: #ecfdf5;
    box-shadow: inset 0 0 0 1px #bbf7d0;
}

.ac-stat-card-premium.is-categories .ac-stat-card-icon {
    color: #2563eb;
    background: #eff6ff;
    box-shadow: inset 0 0 0 1px #bfdbfe;
}

.ac-stat-card-premium.is-brands .ac-stat-card-icon {
    color: #b45309;
    background: #fffbeb;
    box-shadow: inset 0 0 0 1px #fde68a;
}

.ac-stat-card-premium.is-reviews .ac-stat-card-icon {
    color: #7c3aed;
    background: #f5f3ff;
    box-shadow: inset 0 0 0 1px #ddd6fe;
}

.ac-stat-card-icon .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
}

.ac-stat-card-value {
    font-size: clamp(24px, 2.6vw, 30px);
    line-height: 1;
    letter-spacing: -0.04em;
    font-weight: 700;
    color: var(--ac-gray-900);
}

.ac-stat-card-label {
    margin-top: 6px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ac-gray-900);
}

.ac-stat-card-meta {
    margin: auto 0 0 0;
    padding-top: 10px;
    font-size: 12px;
    line-height: 1.55;
    color: var(--ac-gray-500);
}

@media (max-width: 1100px) {
    .ac-stats-grid-premium {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.ac-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--ac-border-radius);
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
}

.ac-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--ac-primary-light);
}

.ac-btn-primary {
    background: var(--ac-primary);
    color: white;
}

.ac-btn-primary:hover {
    background: var(--ac-primary-hover);
    color: white;
}

.ac-btn-secondary {
    background: white;
    color: var(--ac-gray-700);
    border: 1px solid var(--ac-gray-300);
}

.ac-btn-secondary:hover {
    background: var(--ac-gray-50);
    color: var(--ac-gray-900);
}

.ac-btn-ghost {
    background: transparent;
    color: var(--ac-gray-600);
}

.ac-btn-ghost:hover {
    background: var(--ac-gray-100);
    color: var(--ac-gray-900);
}

.ac-btn-success {
    background: var(--ac-success);
    color: white;
}

.ac-btn-success:hover {
    background: #059669;
}

.ac-btn-lg {
    padding: 12px 24px;
    font-size: 15px;
}

.ac-btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.ac-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ac-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Loading spinner */
.ac-btn.loading .dashicons {
    animation: ac-spin 1s linear infinite;
}

@keyframes ac-spin {
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   Form Elements
   ========================================================================== */

.ac-form-group {
    margin-bottom: 24px;
}

.ac-form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--ac-gray-700);
    margin-bottom: 8px;
}

.ac-form-hint {
    font-size: 13px;
    color: var(--ac-gray-500);
    margin-top: 6px;
}

.ac-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--ac-gray-300);
    border-radius: var(--ac-border-radius);
    background: white;
    transition: all 0.15s ease;
}

.ac-input:focus {
    outline: none;
    border-color: var(--ac-primary);
    box-shadow: 0 0 0 3px var(--ac-primary-light);
}

.ac-input::placeholder {
    color: var(--ac-gray-400);
}

.ac-code-input {
    width: 100%;
    max-width: none;
    padding: 18px 18px 18px 24px;
    font-family: var(--ac-font-mono);
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 0.38em;
    text-align: center;
    text-transform: uppercase;
    border-radius: 16px;
    border-color: var(--ac-gray-300);
    background:
        linear-gradient(white, white) padding-box,
        repeating-linear-gradient(
            to right,
            var(--ac-gray-200) 0,
            var(--ac-gray-200) calc(12.5% - 2px),
            transparent calc(12.5% - 2px),
            transparent 12.5%
        ) border-box;
}

.ac-code-input::placeholder {
    letter-spacing: 0.28em;
    color: var(--ac-gray-300);
}

.ac-connect-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 28px;
    padding: 28px;
    border: 1px solid var(--ac-gray-200);
    border-radius: 20px;
    background:
        radial-gradient(circle at top left, rgba(99, 102, 241, 0.08), transparent 34%),
        linear-gradient(180deg, #fcfcfd 0%, #f8fafc 100%);
}

.ac-connect-hero-copy {
    display: flex;
    flex-direction: column;
}

.ac-connect-kicker {
    display: inline-flex;
    align-self: flex-start;
    margin-bottom: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    background: white;
    border: 1px solid var(--ac-gray-200);
    color: var(--ac-gray-600);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ac-connect-title {
    margin: 0 0 12px 0;
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: -0.04em;
    color: var(--ac-gray-900);
}

.ac-connect-description {
    margin: 0 0 18px 0;
    max-width: 60ch;
    font-size: 15px;
    line-height: 1.75;
    color: var(--ac-gray-600);
}

.ac-connect-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ac-connect-step {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 14px 16px;
    border-radius: 14px;
    background: white;
    border: 1px solid var(--ac-gray-200);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.ac-connect-step-number {
    width: 32px;
    height: 32px;
    display: inline-block;
    border-radius: 999px;
    background: var(--ac-primary-light);
    color: var(--ac-primary);
    font-size: 13px;
    font-weight: 700;
    line-height: 32px;
    place-self: start;
    text-align: center;
    padding: 0;
    vertical-align: top;
}

.ac-connect-step-copy strong {
    display: block;
    margin-bottom: 4px;
    color: var(--ac-gray-900);
    font-size: 13px;
}

.ac-connect-step-copy span {
    display: block;
    color: var(--ac-gray-500);
    font-size: 13px;
    line-height: 1.5;
}

.ac-connect-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 22px;
    border-radius: 18px;
    background: white;
    border: 1px solid var(--ac-gray-200);
    box-shadow: var(--ac-shadow-md);
}

.ac-connect-panel-header {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    margin-bottom: 18px;
}

.ac-connect-panel-header .dashicons {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--ac-primary-light);
    color: var(--ac-primary);
    font-size: 22px;
}

.ac-connect-panel-title {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--ac-gray-900);
}

.ac-connect-panel-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--ac-gray-500);
}

.ac-launch-state {
    position: relative;
    border-color: #d9dee8;
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.08), transparent 30%),
        linear-gradient(180deg, #fcfcfd 0%, #f3f6fa 100%);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.ac-launch-state-body {
    position: relative;
    padding: 28px;
}

.ac-launch-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: 24px;
    padding: 32px;
    margin-bottom: 0;
    border-radius: 24px;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(148, 163, 184, 0.28), transparent 28%),
        linear-gradient(135deg, #0f172a 0%, #111827 55%, #1f2937 100%);
    color: white;
}

.ac-launch-hero::after {
    content: "";
    position: absolute;
    inset: auto -10% -45% auto;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 65%);
    pointer-events: none;
}

.ac-launch-hero-copy,
.ac-launch-overview {
    position: relative;
    z-index: 1;
}

.ac-launch-hero-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.ac-launch-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.88);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ac-launch-kicker .dashicons {
    width: 14px;
    height: 14px;
    font-size: 14px;
}

.ac-launch-title {
    margin: 0 0 12px 0;
    font-size: 36px;
    line-height: 1.05;
    letter-spacing: -0.045em;
    color: white;
}

.ac-launch-description {
    margin: 0;
    max-width: 54ch;
    font-size: 15px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.72);
}

.ac-launch-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 18px;
    margin-top: 26px;
}

.ac-launch-action {
    background: white;
    color: #0f172a;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.22);
}

.ac-launch-action:hover {
    background: #f8fafc;
    color: #0f172a;
}

.ac-launch-caption {
    margin: 0;
    max-width: 34ch;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.64);
}

.ac-launch-overview {
    padding: 22px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
}

.ac-launch-overview-label {
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ac-launch-overview-title {
    margin-bottom: 18px;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: white;
}

.ac-launch-overview-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ac-launch-overview-list li {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
}

.ac-launch-overview-list li.is-active {
    background: rgba(255, 255, 255, 0.12);
}

.ac-launch-overview-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
}

.ac-launch-overview-list strong,
.ac-launch-overview-list span {
    display: block;
}

.ac-launch-overview-list strong {
    margin-bottom: 4px;
    color: white;
    font-size: 13px;
    font-weight: 600;
}

.ac-launch-overview-list span {
    color: rgba(255, 255, 255, 0.66);
    font-size: 12px;
    line-height: 1.5;
}

.ac-launch-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.ac-launch-step {
    display: flex;
    flex-direction: column;
    min-height: 220px;
    padding: 22px;
    border-radius: 20px;
    border: 1px solid #dbe2ea;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.ac-launch-step.is-featured {
    background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
    border-color: #c8d7d2;
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.09);
}

.ac-launch-step-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ac-launch-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 999px;
    background: #0f172a;
    color: white;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
}

.ac-launch-step:not(.is-featured) .ac-launch-step-number {
    background: #e8edf4;
    color: #475569;
}

.ac-launch-step-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eafaf2;
    color: #0f766e;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ac-launch-step-badge-muted {
    background: #eef2f7;
    color: #64748b;
}

.ac-launch-step-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin: 22px 0 18px;
    border-radius: 16px;
    background: #f4f7fb;
    color: #0f172a;
    box-shadow: inset 0 0 0 1px #e2e8f0;
}

.ac-launch-step.is-featured .ac-launch-step-icon {
    background: #eefbf4;
    color: #047857;
    box-shadow: inset 0 0 0 1px #cce9d7;
}

.ac-launch-step-icon .dashicons {
    width: 22px;
    height: 22px;
    font-size: 22px;
}

.ac-launch-step-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ac-gray-900);
}

.ac-launch-step-description {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    color: var(--ac-gray-600);
}

/* ==========================================================================
   Alerts / Notices
   ========================================================================== */

.ac-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: var(--ac-border-radius);
    margin-bottom: 20px;
}

.ac-alert-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.ac-alert-content {
    flex: 1;
}

.ac-alert-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.ac-alert-message {
    font-size: 14px;
    opacity: 0.9;
}

.ac-alert-success {
    background: var(--ac-success-light);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.ac-alert-warning {
    background: var(--ac-warning-light);
    color: #92400e;
    border: 1px solid #fde68a;
}

.ac-alert-error {
    background: var(--ac-error-light);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.ac-alert-info {
    background: var(--ac-info-light);
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ==========================================================================
   Progress Bar
   ========================================================================== */

.ac-progress {
    position: relative;
    height: 8px;
    background: var(--ac-gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.ac-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--ac-primary), var(--ac-primary-hover));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.ac-progress-lg {
    height: 12px;
    border-radius: 6px;
}

.ac-progress-lg .ac-progress-bar {
    border-radius: 6px;
}

/* ==========================================================================
   Table
   ========================================================================== */

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

.ac-table th,
.ac-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--ac-gray-100);
}

.ac-table th {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ac-gray-500);
    background: var(--ac-gray-50);
}

.ac-table td {
    font-size: 14px;
    color: var(--ac-gray-700);
}

.ac-table tr:hover td {
    background: var(--ac-gray-50);
}

/* ==========================================================================
   Badges
   ========================================================================== */

.ac-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 9999px;
}

.ac-badge-success {
    background: var(--ac-success-light);
    color: #065f46;
}

.ac-badge-warning {
    background: var(--ac-warning-light);
    color: #92400e;
}

.ac-badge-error {
    background: var(--ac-error-light);
    color: #991b1b;
}

.ac-badge-info {
    background: var(--ac-info-light);
    color: #1e40af;
}

.ac-badge-neutral {
    background: var(--ac-gray-100);
    color: var(--ac-gray-600);
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.ac-empty-state {
    text-align: center;
    padding: 48px 24px;
}

.ac-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: var(--ac-gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ac-gray-400);
}

.ac-empty-icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
}

.ac-empty-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ac-gray-900);
    margin: 0 0 8px 0;
}

.ac-empty-description {
    font-size: 14px;
    color: var(--ac-gray-500);
    margin: 0 0 20px 0;
}

/* ==========================================================================
   Sync Page Specific
   ========================================================================== */

.ac-sync-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.ac-sync-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ac-gray-400);
}

.ac-sync-indicator.running {
    background: var(--ac-info);
    animation: ac-pulse 1.5s infinite;
}

.ac-sync-indicator.completed {
    background: var(--ac-success);
}

.ac-sync-indicator.error {
    background: var(--ac-error);
}

@keyframes ac-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

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

@media (max-width: 900px) {
    .ac-sync-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ac-sync-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--ac-gray-50);
    border-radius: var(--ac-border-radius);
}

.ac-sync-stat-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: var(--ac-border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ac-primary);
    box-shadow: var(--ac-shadow-sm);
}

.ac-sync-stat-value {
    font-size: 20px;
    font-weight: 600;
    color: var(--ac-gray-900);
}

.ac-sync-stat-label {
    font-size: 12px;
    color: var(--ac-gray-500);
}

/* ==========================================================================
   Getting Started Steps
   ========================================================================== */

.ac-getting-started {
    display: flex;
    align-items: flex-start;
    gap: 0;
}

.ac-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 0 16px;
}

.ac-step-number {
    width: 32px;
    height: 32px;
    background: var(--ac-gray-200);
    color: var(--ac-gray-600);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.ac-step.completed .ac-step-number {
    background: var(--ac-success);
    color: white;
}

.ac-step-connector {
    flex: 0 0 60px;
    height: 2px;
    background: var(--ac-gray-200);
    margin-top: 16px;
    position: relative;
}

.ac-step-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.ac-step-icon {
    width: 56px;
    height: 56px;
    background: var(--ac-gray-100);
    border-radius: var(--ac-border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ac-gray-500);
    margin-bottom: 4px;
}

.ac-step.completed .ac-step-icon {
    background: var(--ac-success-light);
    color: var(--ac-success);
}

.ac-step-icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
}

.ac-step-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--ac-gray-900);
    margin: 0;
}

.ac-step-description {
    font-size: 13px;
    color: var(--ac-gray-500);
    margin: 0;
    max-width: 200px;
}

.ac-step-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    margin: 4px 0;
}

.ac-step-status.success {
    background: var(--ac-success-light);
    color: #065f46;
}

.ac-step-status .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.ac-step .ac-btn {
    margin-top: 8px;
}

.ac-step .ac-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Responsive Getting Started */
@media (max-width: 900px) {
    .ac-getting-started {
        flex-direction: column;
        gap: 24px;
    }

    .ac-step {
        flex-direction: row;
        text-align: left;
        padding: 0;
        gap: 16px;
    }

    .ac-step-number {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .ac-step-connector {
        display: none;
    }

    .ac-step-content {
        align-items: flex-start;
    }

    .ac-step-description {
        max-width: none;
    }
}

/* ==========================================================================
   Account Overview
   ========================================================================== */

.ac-account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.ac-account-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ac-account-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--ac-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ac-account-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--ac-gray-900);
}

/* ==========================================================================
   Mobile Toggle
   ========================================================================== */

.ac-mobile-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: var(--ac-primary);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: var(--ac-shadow-lg);
    cursor: pointer;
    z-index: 101;
}

.ac-mobile-toggle .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

@media screen and (max-width: 782px) {
    .ac-mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Overlay for mobile */
.ac-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.ac-sidebar-overlay.open {
    display: block;
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.ac-mt-0 { margin-top: 0; }
.ac-mt-4 { margin-top: 16px; }
.ac-mt-6 { margin-top: 24px; }
.ac-mt-8 { margin-top: 32px; }
.ac-mb-0 { margin-bottom: 0; }
.ac-mb-4 { margin-bottom: 16px; }
.ac-mb-6 { margin-bottom: 24px; }
.ac-ml-2 { margin-left: 8px; }
.ac-text-muted { color: var(--ac-gray-500); }

@media screen and (max-width: 900px) {
    .ac-connect-hero {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .ac-launch-state-body {
        padding: 20px;
    }

    .ac-launch-hero {
        grid-template-columns: 1fr;
        padding: 24px;
    }

    .ac-launch-title {
        font-size: 30px;
    }

    .ac-launch-steps {
        grid-template-columns: 1fr;
    }

    .ac-stats-grid-premium {
        grid-template-columns: 1fr;
    }

    .ac-code-input {
        font-size: 22px;
    }

    .ac-connect-title {
        font-size: 24px;
    }
}

.ac-connect-panel .ac-actions-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ac-connect-panel .ac-actions-row .ac-btn {
    width: 100%;
}

@media screen and (max-width: 640px) {
    .ac-launch-hero,
    .ac-launch-step {
        padding: 20px;
    }

    .ac-launch-title {
        font-size: 26px;
    }

    .ac-launch-actions {
        align-items: stretch;
    }

    .ac-launch-action {
        width: 100%;
    }
}

.ac-text-sm { font-size: 13px; }
.ac-font-mono { font-family: var(--ac-font-mono); font-size: 13px; }

/* ==========================================================================
   Hide WP Admin Elements on Our Pages
   ========================================================================== */

/* Hide WordPress footer */
.ac-wrap ~ #wpfooter,
body.agenticcart_page_agenticcart #wpfooter,
body.agenticcart_page_agenticcart-sync #wpfooter,
body.agenticcart_page_agenticcart-settings #wpfooter,
body.toplevel_page_agenticcart #wpfooter {
    display: none !important;
}

/* Hide screen options and help tabs */
body.agenticcart_page_agenticcart #screen-meta,
body.agenticcart_page_agenticcart-sync #screen-meta,
body.agenticcart_page_agenticcart-settings #screen-meta,
body.toplevel_page_agenticcart #screen-meta,
body.agenticcart_page_agenticcart #screen-meta-links,
body.agenticcart_page_agenticcart-sync #screen-meta-links,
body.agenticcart_page_agenticcart-settings #screen-meta-links,
body.toplevel_page_agenticcart #screen-meta-links {
    display: none !important;
}

/* ==========================================================================
   Toggle Switch
   ========================================================================== */

.ac-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.ac-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ac-toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--ac-gray-300);
    border-radius: 12px;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.ac-toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    box-shadow: var(--ac-shadow-sm);
    transition: transform 0.2s ease;
}

.ac-toggle input:checked + .ac-toggle-slider {
    background: var(--ac-primary);
}

.ac-toggle input:checked + .ac-toggle-slider::after {
    transform: translateX(20px);
}

.ac-toggle input:disabled + .ac-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.ac-toggle input:disabled ~ .ac-toggle-label {
    opacity: 0.5;
    cursor: not-allowed;
}

.ac-toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--ac-gray-700);
}

.ac-toggle:hover .ac-toggle-slider {
    background: var(--ac-gray-400);
}

.ac-toggle input:checked:hover + .ac-toggle-slider {
    background: var(--ac-primary-hover);
}

.ac-toggle input:disabled:hover + .ac-toggle-slider {
    background: var(--ac-gray-300);
}
