/* ============================================
   VENDOFY SELLER DASHBOARD - COMPLETE STYLES
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
    --primary: #6C63FF;
    --secondary: #00B894;
    --accent: #FF6B81;
    --dark: #2D3436;
    --darker: #1e1e2d;
    --gray: #636e72;
    --light-gray: #dfe6e9;
    --light: #f8f9fa;
    --danger: #ff4757;
    --warning: #ffa502;
    --success: #00B894;
    --info: #74b9ff;
    --white: #ffffff;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --transition: all 0.3s ease;
    --gradient-1: linear-gradient(135deg, #6C63FF, #00B894);
    --gradient-2: linear-gradient(135deg, #FF6B81, #ffa502);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f6fa;
    color: var(--dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: #5a52d5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

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

.btn-danger:hover {
    background: #e0414f;
}

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

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

/* ---------- Forms ---------- */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--light-gray);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    background: white;
    color: var(--dark);
}

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

.form-control:disabled {
    background: var(--light);
    cursor: not-allowed;
}

select.form-control {
    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='%23636e72' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

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

input[type="file"].form-control {
    padding: 8px 12px;
}

/* ---------- Auth Input Group ---------- */
.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    z-index: 1;
}

.input-group .form-control {
    padding-left: 48px;
}

/* ---------- Alerts ---------- */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-danger {
    background: rgba(255, 71, 87, 0.08);
    border: 1px solid rgba(255, 71, 87, 0.2);
    color: #d63354;
}

.alert-success {
    background: rgba(0, 184, 148, 0.08);
    border: 1px solid rgba(0, 184, 148, 0.2);
    color: #008a6a;
}

.alert-warning {
    background: rgba(255, 165, 2, 0.08);
    border: 1px solid rgba(255, 165, 2, 0.2);
    color: #997004;
}

.alert-info {
    background: rgba(116, 185, 255, 0.08);
    border: 1px solid rgba(116, 185, 255, 0.2);
    color: #0d7a8a;
}

/* ---------- Auth Pages ---------- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.auth-bg {
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(108, 99, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 217, 165, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 10%, rgba(255, 107, 138, 0.1) 0%, transparent 50%);
    z-index: 0;
}

.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    box-shadow: var(--shadow-lg);
}

.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--dark);
}

.auth-card h2 {
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4px;
}

.auth-card .subtitle {
    text-align: center;
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
}

.auth-footer a {
    color: white;
    font-weight: 600;
    text-decoration: underline;
}

/* ============================================
   SELLER DASHBOARD LAYOUT
   ============================================ */

.seller-body {
    background: #f5f6fa;
    min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: var(--darker);
    color: white;
    z-index: 1000;
    overflow-y: auto;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-header a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
}

.sidebar-store {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: rgba(108, 99, 255, 0.1);
}

.sidebar-store-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-store-url {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar-store-url a {
    color: var(--secondary);
}

.sidebar-store-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 8px;
}

.status-active { background: rgba(0, 217, 165, 0.2); color: #00D9A5; }
.status-inactive { background: rgba(255, 193, 7, 0.2); color: #ffc107; }
.status-suspended { background: rgba(255, 107, 138, 0.2); color: #FF6B8A; }

/* Sidebar Nav */
.sidebar-nav {
    padding: 16px 0;
    flex: 1;
}

.sidebar-nav-section {
    padding: 8px 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.4);
    margin-top: 8px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    transition: var(--transition);
    border-left: 3px solid transparent;
    position: relative;
}

.sidebar-nav a:hover {
    background: rgba(255,255,255,0.05);
    color: white;
}

.sidebar-nav a.active {
    background: rgba(108, 99, 255, 0.15);
    color: white;
    border-left-color: var(--primary);
}

.sidebar-nav a i {
    width: 22px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-nav .badge {
    margin-left: auto;
    background: var(--accent);
    color: white;
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    transition: var(--transition);
}

.sidebar-footer a:hover {
    color: var(--danger);
}

/* ---------- Main Content ---------- */
.main-content {
    margin-left: 260px;
    min-height: 100vh;
    transition: var(--transition);
}

/* ---------- Topbar ---------- */
.topbar {
    background: white;
    padding: 16px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 16px;
}

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--dark);
    padding: 8px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.menu-toggle:hover {
    background: var(--light);
}

.topbar-search {
    position: relative;
}

.topbar-search input {
    width: 300px;
    padding: 10px 16px 10px 40px;
    border: 1px solid var(--light-gray);
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: var(--transition);
    font-family: inherit;
}

.topbar-search input:focus {
    outline: none;
    border-color: var(--primary);
    width: 350px;
}

.topbar-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

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

.topbar-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    font-size: 1rem;
}

.topbar-icon:hover {
    background: var(--primary);
    color: white;
}

.topbar-icon .count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: white;
    padding: 2px 6px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 600;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

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

.topbar-user-info {
    line-height: 1.3;
}

.topbar-user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.topbar-user-role {
    font-size: 0.75rem;
    color: var(--gray);
}

/* ---------- Content Area ---------- */
.content-area {
    padding: 30px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
}

.page-header .breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 4px;
    flex-wrap: wrap;
}

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

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: var(--transition);
}

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

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

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.stat-card-icon.blue { background: rgba(108,99,255,0.1); color: var(--primary); }
.stat-card-icon.green { background: rgba(0,217,165,0.1); color: var(--secondary); }
.stat-card-icon.orange { background: rgba(255,193,7,0.1); color: #f0a500; }
.stat-card-icon.red { background: rgba(255,107,138,0.1); color: var(--accent); }

.stat-card-trend {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 50px;
}

.trend-up { background: rgba(0,217,165,0.1); color: var(--secondary); }
.trend-down { background: rgba(255,107,138,0.1); color: var(--accent); }

.stat-card-value {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.stat-card-label {
    font-size: 0.9rem;
    color: var(--gray);
}

/* ---------- Dashboard Grid ---------- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

/* ---------- Panels ---------- */
.panel {
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    overflow: hidden;
}

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

.panel-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.panel-body {
    padding: 20px 24px;
}

/* ---------- Tables ---------- */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

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

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

.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray);
    border-bottom: 1px solid var(--light-gray);
    background: #f8f9fc;
    white-space: nowrap;
}

.data-table td {
    padding: 14px 16px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--light-gray);
    vertical-align: middle;
}

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

.data-table tr:hover td {
    background: #f8f9fc;
}

/* ---------- Badges ---------- */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-primary { background: rgba(108,99,255,0.1); color: var(--primary); }
.badge-success { background: rgba(0,217,165,0.1); color: #008a6a; }
.badge-warning { background: rgba(255,193,7,0.1); color: #997004; }
.badge-danger { background: rgba(255,107,138,0.1); color: #d63354; }
.badge-info { background: rgba(23,162,184,0.1); color: #0d7a8a; }

/* Order Status Badges */
.status-pending { background: rgba(255,193,7,0.1); color: #997004; }
.status-processing { background: rgba(108,99,255,0.1); color: var(--primary); }
.status-shipped { background: rgba(23,162,184,0.1); color: #0d7a8a; }
.status-delivered { background: rgba(0,217,165,0.1); color: #008a6a; }
.status-cancelled { background: rgba(255,107,138,0.1); color: #d63354; }

/* Payment Status */
.payment-paid { background: rgba(0,217,165,0.1); color: #008a6a; }
.payment-pending { background: rgba(255,193,7,0.1); color: #997004; }
.payment-failed { background: rgba(255,107,138,0.1); color: #d63354; }

/* ---------- Action Buttons ---------- */
.action-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.action-btn.view { background: rgba(108,99,255,0.1); color: var(--primary); }
.action-btn.edit { background: rgba(0,217,165,0.1); color: var(--secondary); }
.action-btn.delete { background: rgba(255,107,138,0.1); color: var(--accent); }
.action-btn:hover { transform: scale(1.1); }

/* ---------- Subscription Alert ---------- */
.alert-subscription {
    background: linear-gradient(135deg, rgba(108,99,255,0.1), rgba(255,107,138,0.1));
    border: 1px solid rgba(108,99,255,0.2);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.alert-subscription-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.alert-subscription-content h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.alert-subscription-content p {
    font-size: 0.9rem;
    color: var(--gray);
    margin: 0;
}

/* ---------- Quick Actions ---------- */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.quick-action {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    border: 1px solid var(--light-gray);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.quick-action:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.quick-action i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 8px;
    display: block;
}

.quick-action span {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ---------- Product Cards ---------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.product-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.product-image {
    height: 160px;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

.product-body {
    padding: 16px;
}

.product-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.product-price-current {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.product-price-original {
    font-size: 0.85rem;
    color: var(--gray);
    text-decoration: line-through;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--gray);
}

/* ---------- Store Preview (Empty State) ---------- */
.store-preview {
    border: 2px dashed var(--light-gray);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    text-align: center;
    background: white;
}

.store-preview i {
    font-size: 3rem;
    color: var(--light-gray);
    margin-bottom: 16px;
}

.store-preview h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.store-preview p {
    color: var(--gray);
    margin-bottom: 20px;
}

/* ---------- Plan Cards ---------- */
.plan-card {
    background: white;
    border-radius: var(--radius);
    padding: 28px;
    border: 2px solid var(--light-gray);
    transition: var(--transition);
    position: relative;
}

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

.plan-card.current::before {
    content: 'Current Plan';
    position: absolute;
    top: -12px;
    right: 16px;
    background: var(--gradient-1);
    color: white;
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 20px;
}

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

.modal {
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(-20px);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

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

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--gray);
    padding: 4px;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--light-gray);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.pagination a {
    background: white;
    color: var(--dark);
    border: 1px solid var(--light-gray);
}

.pagination a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination span.current {
    background: var(--primary);
    color: white;
}

/* ---------- Form Switches ---------- */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--light-gray);
    transition: 0.3s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
}

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

input:checked + .slider:before {
    transform: translateX(24px);
}

/* ---------- Filters ---------- */
.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.filters select, .filters input {
    padding: 10px 16px;
    border: 1px solid var(--light-gray);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
}

/* ---------- Testimonials ---------- */
.testimonial-rating {
    color: #ffc107;
    font-size: 0.85rem;
}

/* ---------- Share Page ---------- */
.share-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.share-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    transition: var(--transition);
    flex-shrink: 0;
}

.share-btn:hover {
    transform: scale(1.1);
}

/* ---------- Toast Notification ---------- */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 20px;
    border-radius: var(--radius);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 3000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); color: var(--dark); }

/* ============================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ============================================ */

/* Tablet (up to 1200px) */
@media (max-width: 1200px) {
    .stats-grid { 
        grid-template-columns: repeat(2, 1fr); 
    }
    .dashboard-grid { 
        grid-template-columns: 1fr; 
    }
}

/* Mobile (up to 768px) */
@media (max-width: 768px) {
    /* Sidebar */
    .sidebar { 
        transform: translateX(-100%); 
        width: 280px;
    }
    .sidebar.open { 
        transform: translateX(0); 
        box-shadow: 4px 0 20px rgba(0,0,0,0.2);
    }
    
    /* Main Content */
    .main-content { 
        margin-left: 0; 
    }
    
    /* Topbar */
    .menu-toggle { 
        display: block; 
    }
    .topbar {
        padding: 12px 16px;
    }
    .topbar-search { 
        display: none; 
    }
    .topbar-user-info {
        display: none;
    }
    
    /* Content Area */
    .content-area { 
        padding: 16px; 
    }
    
    /* Page Header */
    .page-header { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 12px;
        margin-bottom: 20px;
    }
    .page-header h1 {
        font-size: 1.3rem;
    }
    
    /* Stats */
    .stats-grid { 
        grid-template-columns: 1fr; 
        gap: 12px;
        margin-bottom: 20px;
    }
    .stat-card {
        padding: 18px;
    }
    .stat-card-value {
        font-size: 1.5rem;
    }
    
    /* Tables */
    .data-table {
        font-size: 0.85rem;
    }
    .data-table th,
    .data-table td {
        padding: 10px 12px;
    }
    
    /* Panels */
    .panel-header,
    .panel-body {
        padding: 16px;
    }
    
    /* Product Grid */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .product-image {
        height: 120px;
    }
    
    /* Forms */
    .form-group {
        margin-bottom: 16px;
    }
    
    /* Grid layouts inside forms - stack on mobile */
    .content-area form div[style*="grid-template-columns: 1fr 1fr"],
    .content-area form div[style*="grid-template-columns:1fr 1fr"],
    .panel-body form > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Form button rows wrap on mobile */
    .content-area form div[style*="display: flex"],
    .panel-body form > div[style*="display: flex"] {
        flex-wrap: wrap !important;
    }
    
    /* Dashboard grid stack */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Pagination */
    .pagination {
        gap: 4px;
    }
    .pagination a, .pagination span {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
    
    /* Alerts */
    .alert-subscription {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }
    
    /* Auth pages */
    .auth-page {
        padding: 12px;
    }
    .auth-card {
        padding: 28px 20px;
    }
    
    /* Share page */
    .share-buttons {
        gap: 8px;
    }
    .share-btn {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
    
    /* Plan cards */
    .plan-card {
        padding: 20px;
    }
    
    /* Quick actions */
    .quick-actions {
        gap: 8px;
    }
    .quick-action {
        padding: 14px;
    }
    
    /* Filters */
    .filters {
        gap: 8px;
    }
    .filters .btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    /* Modal */
    .modal {
        margin: 10px;
    }
    .modal-body {
        padding: 16px;
    }
    .modal-header,
    .modal-footer {
        padding: 14px 16px;
    }
    
    /* Subscriptions page */
    .content-area [style*="grid-template-columns: repeat(auto-fill, minmax(280px, 1fr))"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Store settings - image preview grid */
    .content-area [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* Small Mobile (up to 480px) */
@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header h1 {
        font-size: 1.15rem;
    }
    
    .content-area {
        padding: 12px;
    }
    
    .stat-card-value {
        font-size: 1.3rem;
    }
    
    .topbar-right {
        gap: 10px;
    }
    
    .action-btns {
        gap: 4px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
}

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

.sidebar.open + .sidebar-overlay,
.sidebar-overlay.active {
    display: block;
}

/* Print styles */
@media print {
    .sidebar, .topbar, .menu-toggle, .action-btns {
        display: none !important;
    }
    .main-content {
        margin-left: 0;
    }
}
