/* ============================================
   ZENDRA SALES DASHBOARD - Sharp & Compact
   ============================================ */

:root {
    --primary: #5046e5;
    --primary-hover: #3f37c9;
    --secondary: #5c6370;
    --success: #0d9668;
    --warning: #e07a12;
    --danger: #e53935;
    --info: #0991d1;

    --dark: #16181d;
    --dark-800: #1e2128;
    --dark-700: #2d323c;
    --dark-600: #454d5c;

    --gray-50: #f8f9fa;
    --gray-100: #eef0f3;
    --gray-200: #dde1e6;
    --gray-300: #c4c9d1;
    --gray-400: #878d99;

    --sidebar-width: 240px;
    --header-height: 54px;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.06);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);

    --radius-sm: 3px;
    --radius: 4px;
    --radius-md: 6px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    font-size: 14px;
    background: var(--gray-100);
    color: var(--dark);
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

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

.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--dark);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--dark-700);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-logo-icon {
    width: 28px;
    height: 28px;
    background: var(--primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 12px;
}

.sidebar-logo-text {
    color: white;
    font-size: 15px;
    font-weight: 600;
}

.sidebar-logo-text span {
    color: var(--gray-400);
    font-weight: 400;
}

/* Store Selector */
.store-selector {
    padding: 12px;
    border-bottom: 1px solid var(--dark-700);
}

.store-selector-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: var(--dark-800);
    border: 1px solid var(--dark-700);
    border-radius: var(--radius);
    color: white;
}

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

.store-icon {
    width: 28px;
    height: 28px;
    background: var(--success);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
}

.store-info {
    flex: 1;
    text-align: left;
    min-width: 0;
}

.store-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.store-url {
    font-size: 11px;
    color: var(--gray-400);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.store-selector-arrow {
    color: var(--gray-400);
    font-size: 10px;
}

/* Sidebar Nav */
.sidebar-nav {
    flex: 1;
    padding: 8px 0;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 8px;
}

.nav-section-title {
    padding: 8px 16px 4px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--dark-600);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    color: var(--gray-400);
    font-size: 13px;
    font-weight: 400;
    border-left: 2px solid transparent;
}

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

.nav-item.active {
    background: var(--dark-800);
    color: white;
    border-left-color: var(--primary);
}

.nav-item i {
    width: 16px;
    font-size: 13px;
    text-align: center;
}

.nav-badge {
    margin-left: auto;
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 3px;
}

.nav-badge.success {
    background: var(--success);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 8px 12px;
    border-top: 1px solid var(--dark-700);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border-radius: var(--radius);
}

.sidebar-user:hover {
    background: var(--dark-800);
}

.user-avatar {
    width: 28px;
    height: 28px;
    background: var(--dark-600);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    font-weight: 500;
}

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

.user-name {
    color: white;
    font-size: 13px;
    font-weight: 500;
}

.user-email {
    color: var(--gray-400);
    font-size: 11px;
}

/* User Menu Dropdown */
.user-menu {
    position: relative;
}

.user-menu-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border-radius: var(--radius);
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
}

.user-menu-trigger:hover {
    background: var(--dark-800);
}

.user-menu-trigger .user-info {
    flex: 1;
    min-width: 0;
}

.user-menu-arrow {
    color: var(--gray-400);
    font-size: 10px;
    transition: transform 0.2s;
}

.user-menu.open .user-menu-arrow {
    transform: rotate(180deg);
}

.user-menu-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: var(--dark-800);
    border: 1px solid var(--dark-600);
    border-radius: var(--radius-md);
    padding: 6px;
    margin-bottom: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s;
    z-index: 200;
}

.user-menu.open .user-menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius);
    color: var(--gray-300);
    font-size: 13px;
    transition: all 0.15s;
}

.user-menu-item:hover {
    background: var(--dark-700);
    color: white;
}

.user-menu-item i {
    width: 16px;
    font-size: 13px;
    color: var(--gray-400);
}

.user-menu-item:hover i {
    color: white;
}

.user-menu-item-danger:hover {
    background: rgba(229, 57, 53, 0.15);
    color: var(--danger);
}

.user-menu-item-danger:hover i {
    color: var(--danger);
}

.user-menu-divider {
    height: 1px;
    background: var(--dark-600);
    margin: 6px 0;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: var(--gray-50);
    max-width: 100%;
    overflow-x: hidden;
}

/* Header */
.main-header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 0 20px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

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

.page-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--secondary);
}

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

.breadcrumb-separator {
    color: var(--gray-300);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search {
    position: relative;
}

.header-search input {
    width: 220px;
    padding: 7px 11px 7px 30px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 13px;
}

.header-search input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
}

.header-search i {
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 11px;
}

.header-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    color: var(--secondary);
    cursor: pointer;
    position: relative;
}

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

.header-btn .notification-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 6px;
    height: 6px;
    background: var(--danger);
    border-radius: 50%;
}

/* Page Content */
.page-content {
    padding: 20px;
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
}

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

.card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
}

.card-body {
    padding: 16px;
}

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

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 14px;
}

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

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.stat-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.stat-icon.primary { background: #edeafd; color: #5046e5; }
.stat-icon.success { background: #e6f7ef; color: #0d9668; }
.stat-icon.warning { background: #fef4e6; color: #e07a12; }
.stat-icon.info { background: #e6f4fc; color: #0991d1; }

.stat-label {
    font-size: 12px;
    color: var(--secondary);
    margin-bottom: 2px;
}

.stat-value {
    font-size: 22px;
    font-weight: 600;
    color: var(--dark);
    line-height: 1.2;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 500;
    margin-top: 4px;
}

.stat-change.positive { color: var(--success); }
.stat-change.negative { color: var(--danger); }

/* CTA Card */
.cta-card {
    background: var(--dark);
    border: none;
    border-radius: var(--radius-md);
    padding: 24px;
    color: white;
}

.cta-card-content {
    position: relative;
}

@media (max-width: 768px) {
    .cta-card {
        padding: 20px;
    }
}


.cta-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.cta-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 20px;
    max-width: 400px;
    line-height: 1.4;
}

.cta-actions {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.15s;
}

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

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

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

.btn-success:hover {
    background: #047857;
}

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

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

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

.btn-outline-light {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
}

.btn-outline-light:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.35);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--secondary);
}

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

.btn-sm {
    padding: 4px 8px;
    font-size: 11px;
}

.btn-lg {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-icon {
    width: 28px;
    height: 28px;
    padding: 0;
}

.btn-shopify {
    background: #5c8c3e;
    color: white;
}

.btn-shopify:hover {
    background: #4a7232;
}

/* CTA Step Label */
.cta-step {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

/* CTA Action Buttons */
.btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 24px;
    height: 44px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    border: none;
    box-sizing: border-box;
}

.btn-cta img {
    width: 18px;
    height: 18px;
    display: block;
}

.btn-cta-shopify {
    background: linear-gradient(to bottom, #95bf47 0%, #7ab73e 100%);
    color: white;
    box-shadow: 0 2px 0 0 #5a8a2a;
}

.btn-cta-shopify:hover {
    background: linear-gradient(to bottom, #a3ca55 0%, #88c843 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 0 0 #5a8a2a;
    color: white;
}

.btn-cta-shopify:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 0 #5a8a2a;
}

.btn-cta-secondary {
    background: linear-gradient(to bottom, #6366f1 0%, #5046e5 100%);
    color: white;
    box-shadow: 0 2px 0 0 #3730a3;
}

.btn-cta-secondary:hover {
    background: linear-gradient(to bottom, #747bff 0%, #6366f1 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 0 0 #3730a3;
    color: white;
}

.btn-cta-secondary:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 0 #3730a3;
}

/* Shopify CTA Card (Installation page) */
.cta-card-shopify {
    background: linear-gradient(135deg, #95bf47 0%, #6a9a2d 100%);
}

.btn-cta-shopify-white {
    background: white;
    color: #4a7232;
    box-shadow: 0 3px 0 0 #c0c0c0, 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-cta-shopify-white:hover {
    background: #f8f8f8;
    transform: translateY(-1px);
    box-shadow: 0 4px 0 0 #c0c0c0, 0 6px 12px rgba(0, 0, 0, 0.12);
    color: #3d5f28;
}

.btn-cta-shopify-white:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 0 #c0c0c0, 0 2px 4px rgba(0, 0, 0, 0.08);
}

.cta-icon-box {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

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

.table-container {
    overflow-x: auto;
}

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

.data-table th {
    text-align: left;
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--secondary);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.data-table td {
    padding: 11px 14px;
    font-size: 13px;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

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

.user-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-cell-avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    font-size: 10px;
    font-weight: 500;
}

.user-cell-name {
    font-weight: 500;
    color: var(--dark);
    font-size: 13px;
}

.user-cell-email {
    font-size: 12px;
    color: var(--secondary);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 3px;
}

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

.status-badge.active {
    background: #e6f7ef;
    color: #0a7c55;
}
.status-badge.active::before { background: #0d9668; }

.status-badge.pending {
    background: #fef4e6;
    color: #b85c0a;
}
.status-badge.pending::before { background: #e07a12; }

.status-badge.closed {
    background: var(--gray-100);
    color: var(--secondary);
}
.status-badge.closed::before { background: var(--gray-400); }

.status-badge.new {
    background: #edeafd;
    color: #4338b5;
}
.status-badge.new::before { background: #5046e5; }

/* ============================================
   CONVERSATIONS
   ============================================ */

.conversation-list {
    display: flex;
    flex-direction: column;
}

.conversation-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
}

.conversation-item:hover {
    background: var(--gray-50);
}

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

.conversation-item.unread {
    background: #fafaff;
}

.conversation-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    font-size: 11px;
    font-weight: 500;
    flex-shrink: 0;
}

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

.conversation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2px;
}

.conversation-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--dark);
}

.conversation-time {
    font-size: 11px;
    color: var(--gray-400);
}

.conversation-preview {
    font-size: 12px;
    color: var(--secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
}

.conversation-item.unread .conversation-preview {
    color: var(--dark);
}

.conversation-meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

.conversation-tag {
    font-size: 10px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.conversation-tag.ai {
    background: #edeafd;
    color: #4338b5;
}

.conversation-tag.human {
    background: #fef4e6;
    color: #b85c0a;
}

/* Conversation Detail */
.conversation-detail {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 16px;
    height: calc(100vh - var(--header-height) - 40px);
}

.chat-container {
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.chat-header {
    padding: 10px 14px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-messages {
    flex: 1;
    padding: 14px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--gray-50);
}

.message {
    display: flex;
    gap: 8px;
    max-width: 70%;
}

.message.incoming { align-self: flex-start; }
.message.outgoing { align-self: flex-end; flex-direction: row-reverse; }

.message-avatar {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    font-size: 10px;
    flex-shrink: 0;
}

.message.outgoing .message-avatar {
    background: var(--primary);
    color: white;
}

.message-bubble {
    padding: 9px 12px;
    border-radius: var(--radius);
    font-size: 13px;
    line-height: 1.45;
}

.message.incoming .message-bubble {
    background: white;
    border: 1px solid var(--gray-200);
}

.message.outgoing .message-bubble {
    background: var(--primary);
    color: white;
}

.message-time {
    font-size: 9px;
    color: var(--gray-400);
    margin-top: 2px;
}

.message.outgoing .message-time { text-align: right; }

.chat-input {
    padding: 10px 14px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 8px;
}

.chat-input input {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 12px;
}

.chat-input input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Customer Sidebar */
.customer-sidebar {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.customer-header {
    padding: 14px;
    text-align: center;
    border-bottom: 1px solid var(--gray-200);
}

.customer-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    font-size: 14px;
    font-weight: 500;
    margin: 0 auto 8px;
}

.customer-name {
    font-size: 14px;
    font-weight: 600;
}

.customer-email {
    font-size: 12px;
    color: var(--secondary);
}

.customer-section {
    padding: 12px 14px;
    border-bottom: 1px solid var(--gray-100);
}

.customer-section:last-child { border-bottom: none; }

.customer-section-title {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--secondary);
    margin-bottom: 8px;
}

.customer-detail {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 12px;
}

.customer-detail-label { color: var(--secondary); }
.customer-detail-value { font-weight: 500; }

/* ============================================
   FORMS
   ============================================ */

.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 5px;
}

.form-label-hint {
    font-weight: 400;
    color: var(--secondary);
}

.form-control {
    width: 100%;
    padding: 8px 11px;
    font-size: 13px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

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

.form-hint {
    font-size: 10px;
    color: var(--secondary);
    margin-top: 4px;
}

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

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

.toggle-info h4 {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 2px;
}

.toggle-info p {
    font-size: 12px;
    color: var(--secondary);
}

.toggle-switch {
    position: relative;
    width: 36px;
    height: 20px;
}

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

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

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: 0.2s;
}

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

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(16px);
}

/* ============================================
   SETTINGS
   ============================================ */

.settings-layout {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
}

.settings-nav {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 8px;
    height: fit-content;
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--secondary);
}

.settings-nav-item:hover {
    background: var(--gray-50);
    color: var(--dark);
}

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

.settings-nav-item i {
    width: 14px;
    font-size: 12px;
}

.settings-section {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.settings-section-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-200);
}

.settings-section-title {
    font-size: 14px;
    font-weight: 600;
}

.settings-section-description {
    font-size: 12px;
    color: var(--secondary);
    margin-top: 2px;
}

.settings-section-body {
    padding: 16px;
}

.avatar-upload {
    display: flex;
    align-items: center;
    gap: 14px;
}

.avatar-upload-preview {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    font-size: 16px;
    font-weight: 500;
}

.avatar-upload-hint {
    font-size: 10px;
    color: var(--secondary);
    margin-top: 4px;
}

/* ============================================
   BILLING
   ============================================ */

.billing-overview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.plan-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.plan-card.current {
    border-color: var(--primary);
}

.plan-card.recommended {
    border-color: var(--success);
}

.plan-badge {
    display: inline-block;
    padding: 2px 6px;
    font-size: 9px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-radius: 2px;
    margin-bottom: 8px;
}

.plan-badge.current {
    background: #eef2ff;
    color: var(--primary);
}

.plan-badge.recommended {
    background: #ecfdf5;
    color: var(--success);
}

.plan-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.plan-price {
    margin-bottom: 12px;
}

.plan-price .amount {
    font-size: 30px;
    font-weight: 600;
}

.plan-price .period {
    font-size: 12px;
    color: var(--secondary);
}

.plan-features {
    text-align: left;
    margin-bottom: 12px;
}

.plan-feature {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    font-size: 12px;
    color: var(--secondary);
}

.plan-feature i {
    color: var(--success);
    font-size: 10px;
}

/* ============================================
   INSTALLATION
   ============================================ */

.installation-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.install-step {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 14px;
}

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

.step-number {
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

.step-title {
    font-size: 14px;
    font-weight: 500;
}

.install-step-content {
    padding-left: 34px;
}

.code-block {
    background: var(--dark);
    border-radius: var(--radius);
    padding: 10px 12px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 11px;
    color: var(--gray-300);
    overflow-x: auto;
}

.code-block-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--dark-700);
}

.code-block-lang {
    font-size: 9px;
    color: var(--gray-400);
    text-transform: uppercase;
}

.code-copy-btn {
    background: var(--dark-700);
    border: none;
    color: var(--gray-400);
    padding: 2px 6px;
    font-size: 10px;
    border-radius: 2px;
    cursor: pointer;
}

.code-copy-btn:hover {
    background: var(--dark-600);
    color: white;
}

/* ============================================
   AI SETTINGS
   ============================================ */

.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.knowledge-card {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 14px;
}

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

.knowledge-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-bottom: 10px;
}

.knowledge-icon.products { background: #edeafd; color: #5046e5; }
.knowledge-icon.faqs { background: #e6f7ef; color: #0d9668; }
.knowledge-icon.policies { background: #fef4e6; color: #e07a12; }
.knowledge-icon.brand { background: #e6f4fc; color: #0991d1; }

.knowledge-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.knowledge-description {
    font-size: 12px;
    color: var(--secondary);
    margin-bottom: 8px;
}

.knowledge-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #0a7c55;
}

.personality-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.personality-option {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 12px;
    text-align: center;
    cursor: pointer;
}

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

.personality-option.selected {
    border-color: var(--primary);
    background: #fafaff;
}

.personality-emoji {
    font-size: 20px;
    margin-bottom: 6px;
}

.personality-name {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 2px;
}

.personality-description {
    font-size: 11px;
    color: var(--secondary);
}

.personality-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 14px;
    color: var(--secondary);
}

.personality-option.selected .personality-icon {
    background: var(--primary);
    color: white;
}

/* Widget Preview */
.widget-preview-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    min-height: 250px;
}

.widget-preview {
    width: 280px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.widget-preview-header {
    background: var(--primary);
    color: white;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-preview-avatar {
    font-size: 20px;
}

.widget-preview-name {
    font-weight: 600;
    font-size: 14px;
}

.widget-preview-messages {
    padding: 16px;
    min-height: 120px;
}

.widget-preview-message {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.4;
    max-width: 90%;
}

.widget-preview-message.bot {
    background: var(--gray-100);
    border-bottom-left-radius: 4px;
}

/* FAQ List */
.faq-list {
    display: flex;
    flex-direction: column;
}

.faq-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-100);
}

.faq-item:hover {
    background: var(--gray-50);
}

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

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

.faq-question {
    font-size: 13px;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 4px;
}

.faq-answer {
    font-size: 12px;
    color: var(--secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.faq-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

/* Search Box */
.search-box {
    position: relative;
}

.search-box .search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 12px;
    pointer-events: none;
}

.search-box .form-control {
    padding-left: 32px;
}

/* Modal Styles */
.modal-content {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
}

.modal-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-200);
}

.modal-title {
    font-size: 15px;
    font-weight: 600;
}

.modal-body {
    padding: 16px;
}

.modal-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--gray-200);
    gap: 8px;
}

/* ============================================
   STORES
   ============================================ */

.stores-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.store-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
}

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

.store-card-header {
    padding: 14px;
    background: var(--dark);
    color: white;
}

.store-card-icon {
    width: 36px;
    height: 36px;
    background: white;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.store-card-icon i {
    font-size: 16px;
    color: var(--success);
}

.store-card-name {
    font-size: 14px;
    font-weight: 500;
}

.store-card-url {
    font-size: 11px;
    color: var(--gray-400);
}

.store-card-body {
    padding: 12px 14px;
}

.store-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 12px;
    border-bottom: 1px solid var(--gray-100);
}

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

.store-stat-label { color: var(--secondary); }
.store-stat-value { font-weight: 500; }

.store-card-footer {
    padding: 10px 14px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 6px;
}

.store-card-footer .btn { flex: 1; }

.add-store-card {
    background: var(--gray-50);
    border: 1px dashed var(--gray-300);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    cursor: pointer;
}

.add-store-card:hover {
    border-color: var(--primary);
    background: white;
}

.add-store-icon {
    width: 40px;
    height: 40px;
    background: var(--gray-200);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    margin-bottom: 8px;
}

.add-store-card:hover .add-store-icon {
    background: var(--primary);
    color: white;
}

.add-store-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--secondary);
}

.add-store-card:hover .add-store-text {
    color: var(--primary);
}

/* ============================================
   ANALYTICS
   ============================================ */

.filter-tabs {
    display: flex;
    gap: 2px;
    background: var(--gray-100);
    padding: 2px;
    border-radius: var(--radius);
}

.filter-tab {
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--secondary);
    border-radius: 3px;
    cursor: pointer;
}

.filter-tab:hover { color: var(--dark); }

.filter-tab.active {
    background: white;
    color: var(--dark);
    box-shadow: var(--shadow-sm);
}

.chart-placeholder {
    background: var(--gray-50);
    border-radius: var(--radius);
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    font-size: 11px;
}

.analytics-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state-icon {
    width: 48px;
    height: 48px;
    background: var(--gray-100);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    color: var(--secondary);
}

.empty-state-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.empty-state-description {
    font-size: 12px;
    color: var(--secondary);
    margin-bottom: 12px;
}

/* ============================================
   UTILITIES
   ============================================ */

.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--secondary); }

.bg-light { background: var(--gray-50); }
.border-0 { border: none !important; }
.h-100 { height: 100%; }

.form-control-color {
    padding: 4px;
    height: 38px;
    cursor: pointer;
}

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }

.py-3 { padding-top: 12px; padding-bottom: 12px; }
.p-0 { padding: 0; }
.p-3 { padding: 12px; }

.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.row { display: flex; flex-wrap: wrap; margin: -6px; }
.row > * { padding: 6px; }
.col-md-4 { width: 33.333%; }
.col-md-6 { width: 50%; }
.col-lg-4 { width: 33.333%; }
.col-lg-5 { width: 41.666%; }
.col-lg-6 { width: 50%; }
.col-lg-7 { width: 58.333%; }
.col-lg-8 { width: 66.666%; }

.g-3 { margin: -6px; }
.g-3 > * { padding: 6px; }
.g-4 { margin: -8px; }
.g-4 > * { padding: 8px; }

hr {
    border: none;
    border-top: 1px solid var(--gray-200);
    margin: 12px 0;
}

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

/* Mobile menu toggle (checkbox hack) */
.mobile-menu-toggle {
    display: none;
}

.mobile-header {
    display: none;
}

@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .billing-overview { grid-template-columns: 1fr; }
    .stores-grid { grid-template-columns: repeat(2, 1fr); }
    .conversation-detail {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 500px;
    }
    .chat-container {
        min-height: 500px;
    }
    .chat-messages {
        min-height: 350px;
    }
    .customer-sidebar { display: none; }
    .analytics-grid { grid-template-columns: 1fr; }
    .knowledge-grid { grid-template-columns: 1fr; }
}

@media (max-width: 992px) {
    :root {
        --sidebar-width: 260px;
    }

    /* Mobile header */
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 16px;
        background: var(--dark);
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 52px;
        z-index: 200;
    }

    .mobile-header .sidebar-logo {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .mobile-menu-btn {
        width: 36px;
        height: 36px;
        background: var(--dark-700);
        border: none;
        border-radius: var(--radius);
        color: white;
        font-size: 18px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-menu-btn:hover {
        background: var(--dark-600);
    }

    /* Sidebar as overlay */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        width: var(--sidebar-width);
        top: 52px;
        height: calc(100vh - 52px);
    }

    .sidebar-header {
        display: none;
    }

    .sidebar-footer {
        margin-top: auto;
    }

    /* Overlay background */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 52px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99;
        cursor: pointer;
    }

    /* Toggle state */
    .mobile-menu-toggle:checked ~ .sidebar-overlay {
        display: block;
    }

    .mobile-menu-toggle:checked ~ .dashboard-wrapper .sidebar {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding-top: 52px;
    }

    .main-header {
        position: sticky;
        top: 52px;
    }

    .settings-layout { grid-template-columns: 1fr; }
    .settings-nav {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }
    .settings-nav-item {
        flex: 1;
        min-width: calc(50% - 4px);
        justify-content: center;
    }
    .personality-grid { grid-template-columns: 1fr; }
    .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8 { width: 100%; }

    /* Header adjustments */
    .header-right {
        flex-wrap: wrap;
        gap: 6px;
    }

    .filter-tabs {
        order: 10;
        width: 100%;
        justify-content: center;
    }

    .header-search {
        width: 100%;
        order: 9;
    }

    .header-search input {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .stats-grid { grid-template-columns: 1fr; }
    .page-content { padding: 12px; }
    .main-header {
        padding: 10px 12px;
        height: auto;
        min-height: var(--header-height);
        flex-wrap: wrap;
        gap: 10px;
    }
    .header-left {
        width: 100%;
    }
    .header-right {
        width: 100%;
        justify-content: flex-start;
    }
    .header-search { display: none; }
    .stores-grid { grid-template-columns: 1fr; }
    .cta-actions {
        flex-direction: column;
        width: 100%;
    }
    .cta-actions .btn-cta {
        width: 100%;
        justify-content: center;
    }
    .cta-title { font-size: 18px; }
    .cta-description { font-size: 13px; }
    .col-md-4, .col-md-6 { width: 100%; }

    /* Tables scroll horizontally */
    .table-container {
        margin: 0 -12px;
        padding: 0 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table {
        min-width: 600px;
    }

    /* Cards */
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .card-header .btn {
        align-self: flex-start;
    }

    /* Conversation list items */
    .conversation-list .conversation-item {
        padding: 10px 12px;
    }

    .conversation-preview {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Chat container */
    .conversation-detail {
        height: auto;
        min-height: auto;
    }

    .chat-container {
        min-height: 450px;
    }

    .chat-messages {
        min-height: 350px;
        max-height: none;
        padding: 10px;
    }

    .message {
        max-width: 90%;
    }

    .message-bubble {
        font-size: 13px;
        padding: 8px 10px;
    }

    .chat-header {
        padding: 8px 12px;
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Settings nav as grid */
    .settings-nav {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .settings-nav-item {
        min-width: 0;
        padding: 10px 6px;
        font-size: 11px;
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }

    .settings-nav-item i {
        font-size: 16px;
    }

    /* Settings section header with button */
    .settings-section-header {
        flex-direction: column;
        gap: 10px;
    }

    .settings-section-header .btn {
        align-self: flex-start;
    }

    /* Plan cards */
    .plan-price .amount {
        font-size: 24px;
    }

    /* Filter tabs scroll */
    .filter-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-shrink: 0;
    }

    .filter-tab {
        white-space: nowrap;
        padding: 5px 10px;
        font-size: 11px;
    }

    /* Analytics header fixes */
    .main-header .form-control {
        font-size: 12px;
        padding: 6px 8px;
    }

    /* Flex wrap for dense headers */
    .d-flex.align-center.justify-between {
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Card body filters */
    .card-body .d-flex.align-center.justify-between {
        flex-direction: column;
        align-items: stretch;
    }

    .card-body .d-flex.align-center.justify-between .filter-tabs {
        order: 1;
        margin-bottom: 8px;
    }

    .card-body .d-flex.align-center.justify-between .d-flex.gap-2 {
        order: 2;
        flex-wrap: wrap;
    }

    .card-body .d-flex.gap-2 select {
        flex: 1;
        min-width: 120px;
    }

    /* Breadcrumb */
    .breadcrumb {
        font-size: 11px;
    }

    /* Row fix */
    .row {
        margin: -4px;
    }
    .row > * {
        padding: 4px;
    }

    /* Toggle groups */
    .toggle-group {
        padding: 12px 0;
    }

    .toggle-info h4 {
        font-size: 13px;
    }

    .toggle-info p {
        font-size: 11px;
    }

    /* Knowledge cards */
    .knowledge-card {
        padding: 12px;
    }

    .knowledge-description {
        font-size: 11px;
    }

    /* Personality options */
    .personality-option {
        padding: 10px;
    }

    .personality-description {
        font-size: 10px;
    }

    /* Store cards */
    .store-card-footer {
        flex-direction: column;
    }

    .store-card-footer .btn {
        width: 100%;
    }

    /* Avatar upload */
    .avatar-upload {
        flex-direction: column;
        text-align: center;
    }

    /* Billing card */
    .plan-features {
        margin-bottom: 16px;
    }

    .plan-feature {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 15px;
    }

    .cta-card {
        padding: 16px;
    }

    .cta-title {
        font-size: 16px;
    }

    .stat-card {
        padding: 12px;
    }

    .stat-value {
        font-size: 18px;
    }

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

    .btn-cta {
        height: 40px;
        padding: 0 16px;
        font-size: 13px;
    }

    /* Billing stats wrap */
    .d-flex.gap-4 {
        flex-wrap: wrap;
        gap: 12px;
    }

    .d-flex.gap-4 > div {
        min-width: calc(50% - 6px);
    }

    /* Large price text */
    [style*="font-size: 2.5rem"] {
        font-size: 1.75rem !important;
    }
}

/* ============================================
   SPINNER
   ============================================ */

.spinner-border {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border .75s linear infinite;
}

.spinner-border-sm {
    width: 0.875rem;
    height: 0.875rem;
    border-width: 2px;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

.me-1 {
    margin-right: 0.25rem;
}

/* ============================================
   STORE SELECTOR DROPDOWN
   ============================================ */

.store-selector {
    position: relative;
}

.store-selector-btn {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}

.store-selector-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 8px;
    right: 8px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 100;
    padding: 4px;
    margin-top: 4px;
}

.store-selector.open .store-selector-dropdown {
    display: block;
}

.store-selector-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: var(--dark);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.store-selector-item:hover {
    background: var(--gray-100);
}

.store-selector-item.active {
    background: var(--gray-100);
    font-weight: 500;
}

.store-selector-item i:last-child {
    margin-left: auto;
    color: var(--success);
}

.store-selector-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 4px 0;
}

.store-selector-add {
    color: var(--primary);
}

.store-selector-add:hover {
    background: #f0f0ff;
}
