/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
svg { overflow: hidden; vertical-align: middle; }

:root {
    --primary:        #e84b3c;
    --primary-dark:   #c7392e;
    --primary-light:  #fdecea;
    --sidebar-bg:     #1a1f2e;
    --sidebar-hover:  #252b3d;
    --sidebar-active: #2d3450;
    --sidebar-text:   #8b92a9;
    --sidebar-active-text: #ffffff;
    --body-bg:        #f3f4f8;
    --card-bg:        #ffffff;
    --text:           #1e2333;
    --text-light:     #6b7280;
    --border:         #e5e7eb;
    --border-light:   #f0f1f4;
    --success:        #16a34a;
    --success-bg:     #dcfce7;
    --warning:        #ca8a04;
    --warning-bg:     #fef9c3;
    --danger:         #dc2626;
    --danger-bg:      #fee2e2;
    --info:           #2563eb;
    --info-bg:        #dbeafe;
    --purple:         #7c3aed;
    --purple-bg:      #ede9fe;
    --radius:         8px;
    --shadow:         0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md:      0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
    --transition:     150ms ease;
}

html { font-size: 15px; -webkit-font-smoothing: antialiased; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Helvetica, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--body-bg);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
code { font-family: 'SF Mono', Consolas, monospace; font-size: .85em; background: var(--border-light); padding: .15em .35em; border-radius: 4px; }
ul { list-style: none; }

/* ===== AUTH LAYOUT ===== */
.auth-body, .layout-auth { background: var(--sidebar-bg); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem; }

.auth-wrap { width: 100%; max-width: 400px; }

.auth-brand {
    display: flex; align-items: center; justify-content: center; gap: .6rem;
    margin-bottom: 1.75rem;
}
.auth-logo-icon {
    width: 36px; height: 36px; border-radius: 8px;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.1rem;
}
.auth-logo-text { color: #fff; font-size: 1.15rem; font-weight: 700; letter-spacing: -.015em; }

.auth-card {
    background: #fff; border-radius: 12px; padding: 2rem;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.auth-title { font-size: 1.35rem; font-weight: 700; text-align: center; margin-bottom: 1.5rem; }

/* ===== MAIN LAYOUT ===== */
.layout-wrap { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
    width: 260px; min-height: 100vh; background: var(--sidebar-bg);
    display: flex; flex-direction: column; position: fixed; top: 0; left: 0;
    z-index: 100; transition: transform var(--transition);
}
.sidebar-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
    display: flex; align-items: center; gap: .65rem;
}
.sidebar-logo-link {
    display: flex; align-items: center; gap: .65rem;
    text-decoration: none;
}
.sidebar-logo-icon {
    width: 32px; height: 32px; border-radius: 7px;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1rem; flex-shrink: 0;
}
.sidebar-logo-text { color: #fff; font-size: 1rem; font-weight: 700; letter-spacing: -.015em; }

.sidebar-nav { flex: 1; padding: .5rem 0; overflow-y: auto; }

.nav-section { padding: 1rem 1.5rem .35rem; }
.nav-label {
    color: rgba(255,255,255,.3); font-size: .65rem; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase;
}
.nav-item {
    display: flex; align-items: center; gap: .6rem;
    padding: .55rem 1.5rem; color: var(--sidebar-text);
    font-size: .875rem; font-weight: 500; transition: background var(--transition), color var(--transition);
    text-decoration: none;
}
.nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.nav-item.active { background: var(--sidebar-active); color: var(--sidebar-active-text); }
.nav-item svg { flex-shrink: 0; opacity: .7; }
.nav-item.active svg { opacity: 1; }
.nav-item:hover svg { opacity: 1; }

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,.06);
}
.user-info { display: flex; align-items: center; gap: .6rem; margin-bottom: .75rem; }
.user-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: .75rem; font-weight: 700; flex-shrink: 0;
}
.user-name { font-size: .8rem; font-weight: 600; color: #fff; }
.user-role { font-size: .7rem; color: var(--sidebar-text); }
.btn-logout {
    width: 100%; padding: .45rem; background: transparent;
    border: 1px solid rgba(255,255,255,.12); color: var(--sidebar-text);
    border-radius: 6px; font-size: .8rem; cursor: pointer;
    transition: var(--transition); text-align: center;
}
.btn-logout:hover { background: rgba(255,255,255,.05); color: #fff; }

/* Main content */
.main-wrap { margin-left: 260px; flex: 1; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
    background: var(--card-bg); border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: .75rem; position: sticky; top: 0; z-index: 50;
}
.sidebar-toggle {
    background: none; border: none; cursor: pointer; padding: .25rem;
    color: var(--text-light); display: flex; align-items: center; justify-content: center;
    border-radius: 4px;
}
.sidebar-toggle:hover { color: var(--text); background: var(--body-bg); }
.page-title { font-size: 1.1rem; font-weight: 700; }
.main-content { padding: 1.5rem; flex: 1; }

/* ===== CARDS ===== */
.card { background: var(--card-bg); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); margin-bottom: 1.25rem; }
.card-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-title { font-size: .95rem; font-weight: 700; margin: 0; }
.card-body { padding: 1.25rem; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    padding: .55rem 1.1rem; border-radius: 6px; font-size: .875rem; font-weight: 600;
    cursor: pointer; border: 1px solid transparent; transition: var(--transition);
    text-decoration: none; line-height: 1.4; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { background: var(--body-bg); }
.btn-danger-outline { background: transparent; color: var(--danger); border-color: #fca5a5; }
.btn-danger-outline:hover { background: var(--danger-bg); }
.btn-sm { padding: .35rem .8rem; font-size: .8rem; }
.btn-block { width: 100%; margin-top: .75rem; }
.btn-disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* ===== BADGES ===== */
.badge {
    display: inline-flex; align-items: center; gap: .25rem;
    padding: .2em .6em; font-size: .72rem; font-weight: 700;
    border-radius: 999px; text-transform: uppercase; letter-spacing: .03em;
}
.badge-green  { background: var(--success-bg); color: var(--success); }
.badge-red    { background: var(--danger-bg);  color: var(--danger); }
.badge-orange { background: var(--warning-bg); color: var(--warning); }
.badge-blue   { background: var(--info-bg);    color: var(--info); }
.badge-gray   { background: var(--border);     color: var(--text-light); }
.badge-purple { background: var(--purple-bg);  color: var(--purple); }

/* ===== FORMS ===== */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: .8rem; font-weight: 600; color: var(--text); margin-bottom: .35rem; }
.form-label.required::after { content: ' *'; color: var(--danger); }
.form-control {
    width: 100%; padding: .55rem .75rem; font-size: .875rem;
    border: 1px solid var(--border); border-radius: 6px;
    color: var(--text); background: #fff; transition: border-color var(--transition), box-shadow var(--transition);
    font-family: inherit; line-height: 1.5;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(232,75,60,.12); }
.form-control[readonly] { background: var(--body-bg); color: var(--text-light); }
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { cursor: pointer; }
.form-hint { font-size: .78rem; color: var(--text-light); margin-top: .3rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-section { margin-bottom: 1.75rem; }
.form-section-title { font-size: .875rem; font-weight: 700; color: var(--text); margin-bottom: .1rem; border-bottom: 2px solid var(--primary); padding-bottom: .4rem; margin-bottom: .75rem; }
.form-actions { display: flex; gap: .75rem; align-items: center; padding: 1.25rem; border-top: 1px solid var(--border); margin-top: 1rem; }

/* Checkbox grid */
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .5rem; }
.checkbox-item { display: flex; align-items: center; gap: .45rem; font-size: .875rem; padding: .4rem .5rem; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; transition: var(--transition); }
.checkbox-item:hover { background: var(--body-bg); }
.checkbox-item input[type="checkbox"] { margin: 0; flex-shrink: 0; accent-color: var(--primary); width: 14px; height: 14px; }

/* ===== ALERTS ===== */
.alert {
    padding: .8rem 1rem; border-radius: var(--radius); border-left: 4px solid;
    font-size: .875rem; margin-bottom: 1rem; display: flex; align-items: flex-start; gap: .5rem;
}
.alert-success { background: var(--success-bg); border-color: var(--success); color: #166534; }
.alert-error   { background: var(--danger-bg);  border-color: var(--danger);  color: #991b1b; }
.alert-warning { background: var(--warning-bg); border-color: var(--warning); color: #92400e; }
.alert-info    { background: var(--info-bg);    border-color: var(--info);    color: #1e40af; }
.alert-close { margin-left: auto; cursor: pointer; opacity: .5; background: none; border: none; font-size: 1rem; }

/* ===== TABLES ===== */
.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.data-table th { text-align: left; padding: .6rem 1rem; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-light); background: var(--body-bg); border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: .8rem 1rem; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--body-bg); }

/* ===== DASHBOARD ===== */
.stats-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.25rem; box-shadow: var(--shadow); }
.stat-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-light); margin-bottom: .35rem; }
.stat-value { font-size: 2rem; font-weight: 800; line-height: 1; }
.stat-sub { font-size: .75rem; color: var(--text-light); margin-top: .25rem; }
.dashboard-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

/* ===== BRANDS GRID ===== */
.brands-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.brand-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: visible; transition: box-shadow var(--transition); display: flex; flex-direction: column; }
.brand-card:hover { box-shadow: var(--shadow-md); }
.brand-card-header { padding: 1.25rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .75rem; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; }
.brand-card-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.2rem; flex-shrink: 0; }
.brand-card-info { flex: 1; min-width: 0; }
.brand-card-name { font-size: .95rem; font-weight: 700; margin: 0 0 .15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-card-name a { color: var(--text); text-decoration: none; }
.brand-card-name a:hover { color: var(--primary); }
.brand-card-url { font-size: .78rem; color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-card-url a { color: var(--text-light); }
.brand-card-meta { padding: .6rem 1.25rem; border-bottom: 1px solid var(--border-light); min-height: 2rem; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.meta-tag { font-size: .75rem; background: var(--body-bg); border: 1px solid var(--border); border-radius: 999px; padding: .2em .65em; color: var(--text-light); }
.brand-card-fb { padding: .65rem 1.25rem; border-bottom: 1px solid var(--border-light); font-size: .8rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.fb-status { display: inline-flex; align-items: center; gap: .3rem; }
.fb-status.connected { color: #1877f2; }
.fb-status.disconnected { color: var(--text-light); }
.brand-card-actions { padding: .85rem 1.25rem; background: var(--body-bg); border-top: 1px solid var(--border); display: flex; gap: .5rem; border-radius: 0 0 var(--radius) var(--radius); margin-top: auto; }
.brand-card-body { padding: 1rem 1.25rem; }
.brand-card-footer { padding: .75rem 1.25rem; background: var(--body-bg); border-top: 1px solid var(--border); display: flex; gap: .5rem; }

/* ===== BRAND PROFILE ===== */
.brand-profile-grid { display: grid; grid-template-columns: 1fr 340px; gap: 1.25rem; align-items: start; }
.brand-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.brand-icon { width: 56px; height: 56px; border-radius: 12px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.5rem; flex-shrink: 0; }
.meta-list { display: flex; flex-direction: column; }
.meta-row { display: flex; justify-content: space-between; align-items: flex-start; padding: .55rem 0; border-bottom: 1px solid var(--border-light); font-size: .875rem; gap: 1rem; }
.meta-row:last-child { border-bottom: none; }
.meta-row > span:first-child { color: var(--text-light); flex-shrink: 0; }

/* ===== FB STATUS / CONNECTED ===== */
.fb-connected-panel { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.fb-connected-info { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.fb-page-icon { width: 40px; height: 40px; border-radius: 8px; background: #1877f2; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }

/* ===== POSTS TABLE ===== */
.posts-filters { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.post-caption-cell { max-width: 300px; }
.post-caption-preview { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .875rem; }
.post-flags { display: flex; gap: .5rem; }
.flag-cb { display: flex; align-items: center; gap: .3rem; font-size: .78rem; cursor: pointer; white-space: nowrap; }
.flag-cb input { accent-color: var(--primary); }

/* ===== PAGE SELECTION ===== */
.page-select-option { display: flex; align-items: flex-start; gap: .75rem; padding: .9rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: var(--transition); }
.page-select-option:hover { border-color: var(--primary); background: var(--primary-light); }
.page-select-option input[type=radio] { margin-top: .2rem; accent-color: var(--primary); }
.page-select-info strong { display: block; font-size: .9rem; }
.page-select-info small { color: var(--text-light); font-size: .8rem; }

/* ===== MEMORY ===== */
.memory-grid { display: grid; grid-template-columns: 1fr 340px; gap: 1.25rem; align-items: start; }
.memory-item { padding: .8rem; border: 1px solid var(--border-light); border-radius: var(--radius); background: var(--body-bg); margin-bottom: .5rem; font-size: .875rem; position: relative; }
.memory-item-meta { display: flex; gap: .5rem; align-items: center; margin-top: .4rem; color: var(--text-light); font-size: .75rem; }
.delete-note-btn { position: absolute; right: .5rem; top: .5rem; background: none; border: none; cursor: pointer; color: var(--text-light); font-size: .85rem; padding: .15rem .3rem; }
.delete-note-btn:hover { color: var(--danger); }

/* ===== CAMPAIGN VIEWS ===== */
/* Wizard */
.wizard-steps { display: flex; gap: 0; margin-bottom: 1.5rem; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--card-bg); }
.wizard-step { flex: 1; padding: .75rem 1rem; display: flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 600; color: var(--text-light); border-right: 1px solid var(--border); cursor: default; }
.wizard-step:last-child { border-right: none; }
.wizard-step span { width: 22px; height: 22px; border-radius: 50%; background: var(--border); color: var(--text-light); display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 800; flex-shrink: 0; }
.wizard-step.active { background: var(--primary-light); color: var(--primary); }
.wizard-step.active span { background: var(--primary); color: #fff; }
.wizard-step.done { color: var(--success); }
.wizard-step.done span { background: var(--success-bg); color: var(--success); }
.wizard-panel { display: none; }
.wizard-panel.active { display: block; }
.wizard-nav { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; }

/* Day settings grid */
.day-settings-grid { display: flex; flex-direction: column; gap: .75rem; }
.day-setting-row { display: grid; grid-template-columns: 160px 1fr 1fr; gap: .75rem; align-items: center; padding: .75rem; background: var(--body-bg); border-radius: var(--radius); }
.day-setting-label { display: flex; flex-direction: column; gap: .1rem; }

/* Campaign show - day rows */
.day-row { display: grid; grid-template-columns: 140px 1fr 140px 160px; gap: 1rem; align-items: center; padding: .9rem 1.25rem; border-bottom: 1px solid var(--border-light); }
.day-row:last-child { border-bottom: none; }
.day-row--approved { background: rgba(22,163,74,.03); }
.day-row--draft   { background: rgba(202,138,4,.03); }
.day-row-num { display: flex; flex-direction: column; gap: .1rem; }
.day-row-type { display: flex; flex-direction: column; gap: .25rem; }
.day-row-status { display: flex; flex-direction: column; gap: .25rem; }
.day-row-actions { display: flex; justify-content: flex-end; }

/* Intelligence grid */
.intel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.intel-block { padding: .9rem; background: var(--body-bg); border-radius: var(--radius); }
.intel-block h4 { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-light); margin-bottom: .5rem; }
.intel-block p { font-size: .875rem; }
.intel-block ul { font-size: .875rem; padding-left: 1.2rem; list-style: disc; }
.intel-block ul li { margin-bottom: .25rem; }
.intel-block--warn { background: var(--warning-bg); }
.intel-block--warn h4 { color: var(--warning); }

/* Post cards (day view) */
.post-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1rem; box-shadow: var(--shadow); overflow: hidden; }
.post-card-header { padding: .85rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; background: var(--body-bg); flex-wrap: wrap; gap: .5rem; }
.post-num { font-size: .875rem; }
.post-card-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.post-card-body { padding: 1.25rem; }
.post-meta-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: .85rem; font-size: .8rem; padding-bottom: .85rem; border-bottom: 1px solid var(--border-light); }
.post-caption { font-size: .9rem; white-space: pre-wrap; line-height: 1.6; }
.post-cta { margin-top: .6rem; font-size: .8rem; color: var(--primary); font-weight: 600; }
.post-hashtags { margin-top: .35rem; font-size: .8rem; color: var(--info); }
.post-reasoning { margin-top: .75rem; }
.post-reasoning summary { font-size: .78rem; color: var(--text-light); cursor: pointer; }
.post-reasoning p { font-size: .8rem; color: var(--text-light); margin-top: .5rem; }
.post-team-notes { margin-top: .5rem; font-size: .8rem; color: var(--warning); background: var(--warning-bg); padding: .4rem .65rem; border-radius: 4px; }

/* ===== SETTINGS ===== */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }

/* ===== NOTICE / EMPTY / ERROR PAGES ===== */
.notice-card { background: var(--info-bg); border: 1px solid #bfdbfe; border-radius: var(--radius); padding: .85rem 1rem; font-size: .875rem; color: #1e40af; }
.restriction-block { padding: .5rem .75rem; background: var(--warning-bg); border-left: 3px solid var(--warning); border-radius: 0 4px 4px 0; font-size: .8rem; margin-top: .25rem; }

.empty-state { text-align: center; padding: 3rem 1.5rem; color: var(--text-light); }
.empty-icon { font-size: 2.5rem; margin-bottom: .75rem; line-height: 1; display: block; width: auto; height: auto; max-width: none; }
.empty-icon svg { width: 40px; height: 40px; display: block; margin: 0 auto; }
.empty-state p { font-size: .9rem; margin-bottom: 1rem; }

.error-page { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vh; text-align: center; padding: 2rem; }
.error-code { font-size: 5rem; font-weight: 900; color: var(--border); line-height: 1; margin-bottom: .5rem; }
.error-page h1 { font-size: 1.5rem; margin-bottom: .5rem; }

/* ===== PAGE ACTIONS ===== */
.page-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.25rem; }

/* ===== MISC UTILITIES ===== */
.text-light { color: var(--text-light); }
.text-link  { color: var(--primary); text-decoration: underline; }
.text-nowrap { white-space: nowrap; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-sm { font-size: .8rem; }
.font-bold { font-weight: 700; }
.d-flex { display: flex; }
.gap-sm { gap: .5rem; }
.gap-md { gap: 1rem; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mb-0 { margin-bottom: 0; }

/* ===== MODAL ===== */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 999; }
.modal-box { background: #fff; border-radius: 12px; padding: 0; width: 100%; max-width: 420px; box-shadow: 0 25px 80px rgba(0,0,0,.25); overflow: hidden; }

/* ===== SPINNER ===== */
.spinner {
    width: 36px; height: 36px; border-radius: 50%;
    border: 3px solid var(--border); border-top-color: var(--primary);
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-wrap { margin-left: 0; }
    .brand-profile-grid,
    .memory-grid,
    .dashboard-columns,
    .settings-grid,
    .intel-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .day-row { grid-template-columns: 1fr 1fr; }
    .day-setting-row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .brands-grid { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: 1fr 1fr; }
    .wizard-steps { flex-direction: column; }
    .wizard-step { border-right: none; border-bottom: 1px solid var(--border); }
}
