@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');

:root {
    --bg: #f5f6f8;
    --surface: #ffffff;
    --surface-soft: #f8f9fb;
    --sidebar: #111318;
    --sidebar-soft: #1b1e25;
    --text: #17191e;
    --muted: #737984;
    --line: #e6e8ec;
    --accent: #7158e2;
    --accent-dark: #5d45cb;
    --accent-soft: #eeeafd;
    --green: #18865b;
    --green-soft: #e6f6ee;
    --red: #cb4c56;
    --red-soft: #fcecef;
    --blue: #497ac7;
    --blue-soft: #eaf1fc;
    --shadow: 0 10px 32px rgba(24, 28, 40, .07);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 14px; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 264px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 27px 17px 20px; background: var(--sidebar); color: #fff; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px; font-family: 'Manrope', sans-serif; font-size: 20px; font-weight: 800; letter-spacing: -.7px; }
.brand > span:last-child > span { color: #a895f4; }
.brand-mark { width: 30px; height: 30px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding: 7px; border-radius: 9px; background: linear-gradient(145deg, #9178ef, #6146ce); }
.brand-mark span { display: block; width: 3px; border-radius: 2px; background: #fff; }
.brand-mark span:nth-child(1) { height: 8px; }
.brand-mark span:nth-child(2) { height: 15px; }
.brand-mark span:nth-child(3) { height: 11px; }
.sidebar-heading { display: flex; justify-content: space-between; align-items: center; margin: 42px 10px 14px; color: #9297a3; font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; }
.count-pill { min-width: 22px; padding: 2px 6px; border-radius: 10px; background: #292d35; color: #b8bdc8; text-align: center; }
.add-profile-button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 11px; border: 1px solid #343843; border-radius: 10px; background: var(--sidebar-soft); color: #e8e9ed; font-weight: 600; transition: .2s; }
.add-profile-button:hover { border-color: #6e5ab9; background: #252231; }
.add-profile-button svg { width: 16px; }
.dashboard-nav { display: grid; grid-template-columns: 23px minmax(0, 1fr); gap: 2px 8px; width: 100%; margin-top: 9px; padding: 11px 10px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #a9afba; text-align: left; }
.dashboard-nav svg { grid-row: 1 / 3; align-self: center; width: 19px; height: 19px; }
.dashboard-nav strong { font-size: 12px; font-weight: 600; }
.dashboard-nav span { color: #6f7581; font-size: 10px; }
.dashboard-nav:hover { background: #1b1e24; }
.dashboard-nav.active { border-color: #3e3455; background: #26222f; color: #c7b8fb; }
.profile-list { display: flex; flex-direction: column; gap: 5px; margin-top: 17px; overflow-y: auto; }
.profile-item { display: grid; grid-template-columns: 38px minmax(0, 1fr) 7px; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 0; border-radius: 11px; background: transparent; color: #d8dae0; text-align: left; transition: .2s; }
.profile-item:hover { background: #1b1e24; }
.profile-item.active { background: #26222f; box-shadow: inset 0 0 0 1px #3e3455; }
.avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: #30343d; }
.profile-item-text { min-width: 0; }
.profile-item-text strong, .profile-item-text span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-item-text strong { font-size: 13px; font-weight: 600; }
.profile-item-text span { margin-top: 3px; color: #7f8592; font-size: 11px; }
.profile-status { width: 6px; height: 6px; border-radius: 50%; background: #4b505b; }
.profile-status.success { background: #55b88a; }
.profile-status.error { background: #e36a74; }
.profile-status.refreshing { background: #aa92f1; animation: pulse 1s infinite; }
.sidebar-empty { margin: 25px 10px; color: #808692; line-height: 1.5; }
.sidebar-empty p { margin: 0 0 4px; color: #b8bdc6; font-weight: 500; }
.sidebar-empty span { font-size: 12px; }
.sidebar-footer { margin-top: auto; padding: 18px 10px 0; border-top: 1px solid #272a31; color: #717783; font-size: 11px; }
.connection-row { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; color: #a3a8b2; font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #777; }
.status-dot.ok { background: #4db783; box-shadow: 0 0 0 3px rgba(77, 183, 131, .1); }
.status-dot.error { background: #df626d; }
.disk-info { display: block; margin-top: 6px; color: #9297a3; }
.disk-info.warning { color: #ef7c87; }
.logout-form { margin-top: 12px; }
.logout-button { padding: 0; border: 0; background: transparent; color: #9297a3; font-size: 11px; cursor: pointer; }
.logout-button:hover { color: #fff; }

.main-content { width: 100%; max-width: 1600px; margin: 0 auto; padding: 38px 42px 50px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; }
h1, h2 { font-family: 'Manrope', sans-serif; }
h1 { margin: 0; font-size: clamp(25px, 3vw, 34px); line-height: 1.2; letter-spacing: -1.1px; }
h1 span { color: var(--accent); }
.subtitle { margin: 9px 0 0; color: var(--muted); font-size: 13px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 10px 15px; border-radius: 9px; font-weight: 600; font-size: 12px; transition: .2s; }
.button:disabled, .icon-button:disabled { cursor: wait; opacity: .55; }
.button-primary { border: 1px solid var(--accent); background: var(--accent); color: #fff; box-shadow: 0 5px 14px rgba(113, 88, 226, .2); }
.button-primary:hover { background: var(--accent-dark); }
.button-secondary { border: 1px solid var(--line); background: var(--surface); color: #484d57; }
.button-secondary:hover { border-color: #cfd3da; background: #fafafb; }
.button-compact { min-height: 36px; padding: 8px 11px; }
.button svg { width: 16px; height: 16px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: #646a75; transition: .2s; }
.icon-button:hover { color: var(--accent); border-color: #cfc6ef; }
.icon-button.danger:hover { color: var(--red); border-color: #efcbd0; background: var(--red-soft); }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 31px 0 26px; }
.stat-card { position: relative; padding: 19px 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.stat-card::after { content: ''; position: absolute; top: 18px; right: 18px; width: 6px; height: 6px; border-radius: 50%; background: #c4c8cf; }
.stat-positive::after { background: #45b184; }
.stat-new::after { background: var(--accent); }
.stat-label, .stat-caption { display: block; }
.stat-label { color: #5f6570; font-size: 11px; font-weight: 600; }
.stat-card strong { display: block; margin: 8px 0 4px; font-family: 'Manrope', sans-serif; font-size: 26px; letter-spacing: -.8px; }
.stat-positive strong { color: var(--green); }
.stat-caption { color: #a0a5ae; font-size: 10px; }

.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 390px; padding: 50px 20px; border: 1px dashed #d9dce2; border-radius: 16px; background: rgba(255,255,255,.45); text-align: center; }
.empty-visual { position: relative; width: 100px; height: 105px; margin-bottom: 20px; }
.empty-card { position: absolute; width: 66px; height: 88px; border-radius: 12px; }
.empty-card-back { top: 5px; left: 9px; transform: rotate(-12deg); background: #e4def9; }
.empty-card-front { right: 7px; display: grid; place-items: center; transform: rotate(7deg); background: var(--accent); box-shadow: 0 12px 30px rgba(113, 88, 226, .22); color: #fff; }
.empty-card-front svg { width: 31px; height: 31px; fill: rgba(255,255,255,.16); }
.empty-state h2 { margin: 0 0 9px; font-size: 20px; }
.empty-state p { max-width: 470px; margin: 0 0 22px; color: var(--muted); line-height: 1.6; }

.workspace { overflow: visible; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow); }
.profile-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 23px; border-bottom: 1px solid var(--line); }
.profile-identity { display: flex; align-items: center; gap: 13px; min-width: 0; }
.selected-avatar { width: 52px; height: 52px; border: 2px solid #fff; border-radius: 50%; object-fit: cover; background: #e7e4f2; box-shadow: 0 0 0 1px #e4e2eb; }
.selected-name-row { display: flex; align-items: center; gap: 6px; }
.selected-name-row h2 { max-width: 340px; margin: 0; overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.verified-badge { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: #5697dc; color: #fff; font-size: 10px; }
.profile-identity a { display: inline-block; margin-top: 2px; color: var(--accent); font-size: 11px; }
.profile-identity p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.profile-identity .account-info { color: #9a91ae; font-size: 9px; }
.account-info a { color: var(--accent); }
.profile-actions { display: flex; align-items: center; gap: 8px; }
.refresh-meta { margin-right: 7px; text-align: right; }
.refresh-meta span, .refresh-meta small { display: block; }
.refresh-meta span { color: #5e646e; font-size: 10px; }
.refresh-meta small { margin-top: 3px; color: #9ba0a9; font-size: 9px; }
.export-menu { position: relative; }
.export-options { position: absolute; z-index: 10; top: 43px; right: 0; width: 140px; padding: 5px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: var(--shadow); }
.export-options a { display: block; padding: 9px 10px; border-radius: 6px; font-size: 12px; cursor: pointer; }
.export-options a:hover { background: var(--surface-soft); color: var(--accent); }
.error-banner { margin: 15px 22px 0; padding: 11px 13px; border: 1px solid #f3d1d5; border-radius: 8px; background: var(--red-soft); color: #a64049; font-size: 12px; }
.viral-section { margin: 20px 23px 4px; padding: 17px; overflow: hidden; border: 1px solid #ded5fc; border-radius: 12px; background: linear-gradient(135deg, #f4f0ff, #faf8ff); }
.viral-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 13px; }
.viral-heading .eyebrow { margin-bottom: 4px; }
.viral-heading h2 { margin: 0; font-size: 17px; letter-spacing: -.4px; }
.viral-heading h2 span { display: inline-block; min-width: 23px; padding: 2px 6px; border-radius: 10px; background: var(--accent); color: #fff; font-family: 'DM Sans', sans-serif; font-size: 10px; text-align: center; vertical-align: middle; }
.viral-heading > p { margin: 0; color: #7e739e; font-size: 10px; }
.viral-list { display: flex; gap: 10px; padding: 2px 1px 5px; overflow-x: auto; }
.viral-card { display: grid; grid-template-columns: 67px minmax(0, 1fr); flex: 0 0 235px; gap: 11px; padding: 8px; border: 1px solid #e0d8f5; border-radius: 10px; background: rgba(255,255,255,.88); transition: .2s; }
.viral-card:hover { transform: translateY(-2px); border-color: #bdaaf4; box-shadow: 0 7px 20px rgba(85,57,160,.1); }
.viral-card img { width: 67px; height: 86px; border-radius: 7px; object-fit: cover; background: #e5e0ee; }
.viral-card-content { min-width: 0; padding: 3px 2px 2px 0; }
.viral-percent { display: inline-block; margin-bottom: 6px; color: var(--accent-dark); font-family: 'Manrope', sans-serif; font-size: 15px; font-weight: 800; }
.viral-card-content strong, .viral-card-content span, .viral-card-content small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viral-card-content strong { color: #444050; font-size: 10px; }
.viral-card-content span { margin-top: 5px; color: #777083; font-size: 9px; }
.viral-card-content small { margin-top: 3px; color: #9a8fab; font-size: 9px; }
.used-section { margin: 14px 23px 4px; padding: 15px 17px; border: 1px solid #dfe3e8; border-radius: 12px; background: #f8f9fa; }
.used-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 11px; }
.used-heading h2 { margin: 0; font-size: 15px; }
.used-heading h2 span { display: inline-block; min-width: 21px; padding: 2px 6px; border-radius: 9px; background: #343943; color: #fff; font-family: 'DM Sans', sans-serif; font-size: 9px; text-align: center; }
.used-heading p { margin: 0; color: #8a9099; font-size: 9px; }
.used-heading code { color: #5f6470; }
.used-list { display: flex; gap: 9px; overflow-x: auto; padding-bottom: 3px; }
.used-card { display: grid; grid-template-columns: 48px minmax(0, 1fr); flex: 0 0 210px; gap: 9px; align-items: center; padding: 7px; border: 1px solid #e1e4e8; border-radius: 8px; background: #fff; }
.used-card img { width: 48px; height: 59px; border-radius: 5px; object-fit: cover; background: #e5e7eb; }
.used-card strong, .used-card span, .used-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.used-card strong { color: #4b515b; font-size: 10px; }
.used-card span { margin-top: 3px; color: var(--green); font-size: 9px; font-weight: 700; }
.used-card small { margin-top: 4px; color: #969ca5; font-size: 8px; }
.filter-viral.active { color: var(--accent-dark); background: var(--accent-soft); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 23px; }
.filters { display: flex; gap: 5px; padding: 4px; border-radius: 9px; background: var(--surface-soft); }
.filter { padding: 7px 12px; border: 0; border-radius: 6px; background: transparent; color: #7c828d; font-size: 11px; font-weight: 500; }
.filter:hover { color: var(--text); }
.filter.active { background: #fff; color: var(--text); box-shadow: 0 2px 6px rgba(30,35,45,.07); }
.toolbar-right { display: flex; align-items: center; gap: 13px; }
.toolbar-right .button { font-size: 10px; white-space: nowrap; }
.sort-control { display: flex; align-items: center; gap: 6px; color: #9399a3; font-size: 10px; }
.sort-control select { padding: 6px 25px 6px 7px; border: 0; outline: 0; background: transparent; color: #5c626c; font-size: 11px; cursor: pointer; }
.reels-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; padding: 0 23px 25px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 4px 23px 25px; }
.pagination span { color: var(--muted); font-size: 11px; }
.pagination .button:disabled { cursor: default; opacity: .45; }
.reel-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: transform .2s, box-shadow .2s; }
.reel-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(30,35,45,.09); }
.reel-thumbnail { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #e9e9ee; }
.reel-thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.reel-card:hover .reel-thumbnail img { transform: scale(1.025); }
.reel-thumbnail::after { content: ''; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(8,10,15,.7)); pointer-events: none; }
.reel-badges { position: absolute; z-index: 2; top: 10px; left: 9px; right: 9px; display: flex; align-items: flex-start; justify-content: space-between; gap: 5px; }
.performance-badge, .new-badge { padding: 5px 7px; border-radius: 6px; font-size: 9px; font-weight: 700; backdrop-filter: blur(8px); }
.performance-badge.above { background: rgba(222, 248, 234, .93); color: #137249; }
.performance-badge.below { background: rgba(253, 231, 234, .93); color: #b6414c; }
.performance-badge.normal { background: rgba(240, 241, 244, .93); color: #565e69; }
.performance-badge.no_baseline { background: rgba(240, 241, 244, .93); color: #737984; }
.new-badge { background: rgba(113, 88, 226, .92); color: #fff; }
.used-badge { padding: 5px 8px; border: 1px solid rgba(255,255,255,.65); border-radius: 6px; background: #087a4b; color: #fff; box-shadow: 0 2px 9px rgba(0, 65, 37, .4); font-size: 9px; font-weight: 800; letter-spacing: .7px; line-height: 1; }
.reel-status-group { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.reel-badge-group { display: flex; gap: 4px; }
.reel-duration { position: absolute; z-index: 2; top: 10px; right: 9px; padding: 4px 6px; border-radius: 5px; background: rgba(15,17,22,.55); color: #fff; font-size: 9px; backdrop-filter: blur(6px); }
.reel-badges:has(.new-badge) .reel-duration, .reel-badges:has(.used-badge) .reel-duration { top: 39px; }
.reel-views { position: absolute; z-index: 2; bottom: 11px; left: 11px; color: #fff; }
.reel-views strong { display: block; font-family: 'Manrope', sans-serif; font-size: 20px; line-height: 1.1; letter-spacing: -.4px; }
.reel-views span { font-size: 9px; opacity: .82; }
.reel-play { position: absolute; z-index: 2; right: 11px; bottom: 12px; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; backdrop-filter: blur(6px); }
.reel-play svg { width: 14px; height: 14px; }
.reel-body { padding: 12px; }
.reel-ratio { display: flex; align-items: baseline; justify-content: space-between; gap: 5px; }
.reel-ratio strong { font-family: 'Manrope', sans-serif; font-size: 15px; }
.reel-ratio strong.above { color: var(--green); }
.reel-ratio strong.below { color: var(--red); }
.reel-ratio span { color: #959ba5; font-size: 9px; }
.reel-reach { margin: 5px 0 0; color: #8b919b; font-size: 8px; }
.reel-reach.strong { color: var(--green); font-weight: 600; }
.reel-owner { margin: 7px 0 0; color: var(--accent); font-size: 9px; font-weight: 600; }
.reel-caption { display: -webkit-box; min-height: 32px; margin: 8px 0 10px; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: #686e78; font-size: 10px; line-height: 1.55; }
.reel-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 10px; padding-bottom: 10px; color: #7f8590; font-size: 9px; }
.reel-stats strong { color: #4d535e; font-size: 11px; font-weight: 600; }
.reel-stats small { display: block; margin-top: 1px; color: #9298a2; font-size: 8px; white-space: nowrap; }
.reel-footer { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding-top: 10px; border-top: 1px solid #f0f1f3; }
.reel-date { color: #9ba1aa; font-size: 9px; }
.reel-actions { display: flex; gap: 4px; }
.reel-actions a, .reel-actions button { display: grid; place-items: center; width: 27px; height: 27px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #777e89; }
.reel-actions a:hover, .reel-actions button:hover { background: var(--accent-soft); color: var(--accent); }
.reel-actions button:disabled { cursor: wait; opacity: .5; }
.reel-actions button.used { color: var(--green); }
.reel-actions svg { width: 14px; height: 14px; }
.recent-note { margin: 8px 0 0; color: var(--blue); font-size: 9px; }
.no-results, .loading-state { padding: 60px 20px; color: var(--muted); text-align: center; }
.loading-state { display: flex; align-items: center; justify-content: center; gap: 10px; }
.spinner { width: 17px; height: 17px; border: 2px solid #ddd8f4; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }

.modal { width: min(480px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--text); box-shadow: 0 24px 70px rgba(20,23,32,.22); }
.modal::backdrop { background: rgba(18,20,27,.55); backdrop-filter: blur(3px); }
.modal form { padding: 25px; }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 25px; }
.modal-header h2 { margin: 0; font-size: 20px; letter-spacing: -.5px; }
.form-label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 600; }
.modal input { width: 100%; padding: 12px 13px; border: 1px solid #dcdfe5; border-radius: 9px; outline: none; font-size: 13px; transition: .2s; }
.modal input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-help { margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.form-error { margin-top: 12px; padding: 10px; border-radius: 7px; background: var(--red-soft); color: #a64049; font-size: 11px; line-height: 1.45; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 25px; }
.import-jobs { position: fixed; z-index: 49; right: 24px; bottom: 78px; display: flex; flex-direction: column; gap: 7px; width: min(320px, calc(100vw - 48px)); }
.import-job { display: flex; align-items: center; gap: 9px; padding: 10px 13px; border: 1px solid #dcd6f3; border-radius: 9px; background: #fff; color: #5d6370; box-shadow: 0 8px 24px rgba(30,35,45,.1); font-size: 11px; }
.import-job .spinner { flex: 0 0 auto; width: 14px; height: 14px; }
.toast { position: fixed; z-index: 50; right: 24px; bottom: 24px; max-width: min(400px, calc(100vw - 48px)); padding: 13px 17px; border: 1px solid #343943; border-radius: 10px; background: #20232a; color: #fff; box-shadow: 0 10px 35px rgba(0,0,0,.2); font-size: 12px; line-height: 1.5; }
.toast.error { border-color: #79434a; background: #482c32; }
.is-spinning { animation: spin .8s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; } }

@media (min-width: 1500px) { .reels-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 1150px) { .reels-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .main-content { padding: 30px 27px 45px; } .stats-grid { gap: 10px; } }
@media (max-width: 900px) {
    .app-shell { grid-template-columns: 210px minmax(0, 1fr); }
    .sidebar { padding-left: 11px; padding-right: 11px; }
    .main-content { padding: 26px 20px 40px; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .reels-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .profile-header { align-items: flex-start; }
    .refresh-meta { display: none; }
    .topbar .button { padding: 10px; }
}
@media (max-width: 650px) {
    .app-shell { display: block; }
    .sidebar { position: static; height: auto; padding: 17px; }
    .brand { padding: 0; }
    .sidebar-heading { margin-top: 25px; }
    .profile-list { flex-direction: row; margin-bottom: 4px; overflow-x: auto; }
    .profile-item { min-width: 180px; }
    .sidebar-empty, .sidebar-footer { display: none; }
    .main-content { padding: 25px 15px 35px; }
    .topbar { align-items: flex-start; }
    .topbar .button { width: 38px; min-height: 38px; overflow: hidden; padding: 9px; color: transparent; gap: 0; }
    .topbar .button svg { flex: 0 0 auto; color: #484d57; }
    h1 { font-size: 25px; }
    .subtitle { line-height: 1.5; }
    .stats-grid { margin-top: 24px; }
    .stat-card { padding: 15px; }
    .stat-card strong { font-size: 22px; }
    .profile-header { flex-direction: column; }
    .profile-actions { width: 100%; justify-content: flex-end; }
    .viral-section { margin: 16px 13px 3px; padding: 13px; }
    .viral-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
    .used-section { margin: 12px 13px 3px; padding: 13px; }
    .used-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
    .toolbar { align-items: flex-start; flex-direction: column; }
    .toolbar-right { width: 100%; justify-content: space-between; gap: 8px; }
    .filters { width: 100%; overflow-x: auto; }
    .filter { flex: 1; white-space: nowrap; }
    .sort-control { align-self: flex-end; }
    .reels-grid { gap: 11px; padding: 0 13px 18px; }
    .reel-body { padding: 10px; }
    .reel-ratio { align-items: flex-start; flex-direction: column; }
    .reel-date { max-width: 62px; }
}
