/* Flowtifyy Main Styles */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --fi-primary: #146EF5;
  --fi-primary-dark: #0f5bd4;
  --fi-dark: #0d0f18;
  --fi-dark-sidebar: #111827;
  --fi-sidebar-text: #9ca3af;
  --fi-sidebar-active: #fff;
  --fi-bg: #f0f4f8;
  --fi-surface: #ffffff;
  --fi-border: #e5e7eb;
  --fi-text: #1a1a1a;
  --fi-muted: #6b7280;
  --fi-success: #10b981;
  --fi-warning: #f59e0b;
  --fi-danger: #ef4444;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
}

body { margin: 0; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; color: var(--fi-text); background: var(--fi-bg); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }

a { color: var(--fi-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: var(--radius); font-size: 14px; font-weight: 500; border: none; cursor: pointer; transition: all 0.15s; line-height: 1.5; white-space: nowrap; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--fi-primary); color: #fff; }
.btn-primary:hover { background: var(--fi-primary-dark); }
.btn-secondary { background: #fff; color: var(--fi-text); border: 1px solid var(--fi-border); }
.btn-secondary:hover { background: var(--fi-bg); }
.btn-danger { background: var(--fi-danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-icon { padding: 8px; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--fi-text); margin-bottom: 6px; }
.form-control { width: 100%; padding: 8px 12px; border: 1px solid var(--fi-border); border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; color: var(--fi-text); background: #fff; transition: border-color 0.15s, box-shadow 0.15s; outline: none; }
.form-control:focus { border-color: var(--fi-primary); box-shadow: 0 0 0 3px rgba(20,110,245,0.1); }
.form-control::placeholder { color: var(--fi-muted); }
textarea.form-control { resize: vertical; min-height: 120px; }
select.form-control { 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 d='M6 8L1 3h10z' fill='%236b7280'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

/* Cards */
.card { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--fi-border); }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--fi-border); display: flex; align-items: center; justify-content: space-between; }
.card-body { padding: 20px; }
.card-title { font-size: 15px; font-weight: 600; color: var(--fi-text); margin: 0; }

/* Badges */
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.badge-blue { background: #eff6ff; color: #1d4ed8; }
.badge-green { background: #f0fdf4; color: #15803d; }
.badge-yellow { background: #fffbeb; color: #b45309; }
.badge-red { background: #fef2f2; color: #b91c1c; }
.badge-gray { background: #f9fafb; color: #374151; }
.badge-purple { background: #f5f3ff; color: #6d28d9; }

/* Admin Layout */
.admin-layout { display: flex; min-height: 100vh; }

.sidebar { width: 240px; background: var(--fi-dark-sidebar); color: #fff; display: flex; flex-direction: column; position: fixed; height: 100vh; z-index: 100; flex-shrink: 0; }
.sidebar-logo { padding: 20px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); display: flex; align-items: center; gap: 10px; }
.sidebar-logo img { height: 28px; }
.sidebar-logo-text { font-size: 16px; font-weight: 700; color: #fff; }
.sidebar-nav { flex: 1; padding: 12px 8px; overflow-y: auto; }
.sidebar-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius); color: var(--fi-sidebar-text); font-size: 14px; font-weight: 500; transition: all 0.15s; text-decoration: none; margin-bottom: 2px; }
.sidebar-nav a:hover { background: rgba(255,255,255,0.06); color: #fff; text-decoration: none; }
.sidebar-nav a.active { background: rgba(20,110,245,0.2); color: var(--fi-primary); }
.sidebar-nav a svg { flex-shrink: 0; }
.sidebar-section-title { font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 0.08em; padding: 8px 10px 4px; margin-top: 8px; }
.sidebar-footer { padding: 12px 8px; border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar-shop-info { padding: 8px 10px; margin-bottom: 4px; }
.sidebar-shop-name { font-size: 13px; font-weight: 600; color: #fff; }
.sidebar-shop-link { font-size: 12px; color: var(--fi-sidebar-text); }
.sidebar-footer a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--radius); color: var(--fi-sidebar-text); font-size: 13px; transition: all 0.15s; text-decoration: none; }
.sidebar-footer a:hover { background: rgba(255,255,255,0.06); color: #fff; text-decoration: none; }

.main-content { flex: 1; margin-left: 240px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { background: #fff; border-bottom: 1px solid var(--fi-border); padding: 0 24px; height: 56px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 50; }
.topbar-title { font-size: 16px; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.page-content { padding: 24px; flex: 1; }

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border: 1px solid var(--fi-border); border-radius: var(--radius-lg); padding: 20px; }
.stat-label { font-size: 13px; color: var(--fi-muted); margin-bottom: 8px; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--fi-text); line-height: 1; }
.stat-icon { width: 40px; height: 40px; border-radius: var(--radius); background: #eff6ff; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }

/* Tables */
.table-container { background: #fff; border: 1px solid var(--fi-border); border-radius: var(--radius-lg); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th { padding: 10px 16px; text-align: left; font-size: 12px; font-weight: 600; color: var(--fi-muted); text-transform: uppercase; letter-spacing: 0.05em; background: var(--fi-bg); border-bottom: 1px solid var(--fi-border); }
td { padding: 12px 16px; border-bottom: 1px solid var(--fi-border); font-size: 14px; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--fi-bg); }

/* Tabs */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--fi-border); margin-bottom: 24px; }
.tab { padding: 10px 16px; font-size: 14px; font-weight: 500; color: var(--fi-muted); border-bottom: 2px solid transparent; cursor: pointer; text-decoration: none; transition: all 0.15s; }
.tab:hover { color: var(--fi-text); text-decoration: none; }
.tab.active { color: var(--fi-primary); border-bottom-color: var(--fi-primary); }

/* Alerts */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* Toggle */
.toggle { position: relative; width: 40px; height: 22px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: #d1d5db; border-radius: 22px; transition: .2s; }
.toggle-slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: .2s; }
.toggle input:checked + .toggle-slider { background: var(--fi-primary); }
.toggle input:checked + .toggle-slider:before { transform: translateX(18px); }

/* Utility */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.text-muted { color: var(--fi-muted); }
.text-small { font-size: 12px; }
.font-mono { font-family: 'Courier New', monospace; font-size: 13px; }
.w-full { width: 100%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* Color picker */
.color-picker-group { display: flex; gap: 8px; align-items: center; }
.color-picker-group input[type="color"] { width: 40px; height: 38px; padding: 2px; border: 1px solid var(--fi-border); border-radius: var(--radius-sm); cursor: pointer; }

/* Filters bar */
.filters-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.filters-bar .form-control { width: auto; }

/* Status badges */
.status-new { background: #eff6ff; color: #1d4ed8; }
.status-processing { background: #fffbeb; color: #b45309; }
.status-shipped { background: #f0fdf4; color: #15803d; }
.status-cancelled { background: #fef2f2; color: #b91c1c; }
.payment-pending { background: #fffbeb; color: #b45309; }
.payment-paid { background: #f0fdf4; color: #15803d; }

/* Modal */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal { background: #fff; border-radius: var(--radius-xl); padding: 24px; max-width: 480px; width: 90%; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-title { font-size: 18px; font-weight: 600; margin: 0; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--fi-muted); font-size: 20px; padding: 4px; }

/* Landing page specific */
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: #eff6ff; color: var(--fi-primary); padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 500; margin-bottom: 24px; }
.section-tag { display: inline-block; background: #eff6ff; color: var(--fi-primary); padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; }

/* Code block */
.code-block { background: #1e2130; border-radius: var(--radius); padding: 16px; font-family: 'Courier New', monospace; font-size: 13px; color: #e2e8f0; overflow-x: auto; position: relative; }
.code-block .copy-btn { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,0.1); border: none; color: #e2e8f0; padding: 4px 10px; border-radius: var(--radius-sm); cursor: pointer; font-size: 12px; }
.code-block .copy-btn:hover { background: rgba(255,255,255,0.2); }
.code-kw { color: #7c3aed; }
.code-str { color: #10b981; }
.code-comment { color: #6b7280; }

/* Superadmin accent */
.superadmin-accent { --fi-primary: #7c3aed; --fi-primary-dark: #6d28d9; }
