@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
:root{--brand:#3039ad;--brand2:#252d94;--teal:#0e9f9a;--ink:#15213a;--muted:#71809a;--line:#e3e7ee;--canvas:#f4f6f9;--white:#fff;--green:#18a66a;--red:#e34f5f;--blue:#2c8df4;--shadow:0 1px 2px rgba(16,24,40,.04)}
*{box-sizing:border-box}body{margin:0;background:var(--canvas);color:var(--ink);font-family:Inter,Arial,sans-serif;font-size:13px}a{color:inherit;text-decoration:none}button,input,textarea,select{font:inherit}.shell{min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:248px;background:#fff;border-right:1px solid var(--line);display:flex;flex-direction:column;padding:22px 16px;z-index:10}.brand{display:flex;align-items:center;gap:10px;font-size:18px;font-weight:800;letter-spacing:-.5px;color:#101a32;padding:3px 8px 27px}.brand small{display:block;color:#75819a;font-size:10px;letter-spacing:.5px;font-weight:600;margin-top:3px}.brand-mark{width:34px;height:34px;display:grid;place-items:center;background:#edf0ff;color:var(--brand);border-radius:10px;font-size:25px}.side-label{font-size:10px;letter-spacing:1.1px;font-weight:800;color:#8a95a9;padding:10px 12px}.sidebar nav{display:grid;gap:5px}.sidebar nav a{display:flex;align-items:center;gap:13px;padding:12px 13px;border-radius:8px;color:#273653;font-weight:600;transition:.15s}.sidebar nav a:hover{background:#f6f7ff}.sidebar nav a.active{background:#eef0ff;color:var(--brand);box-shadow:inset 3px 0 var(--brand)}.sidebar-bottom{margin-top:auto;border-top:1px solid var(--line);padding:18px 6px 0;display:flex;align-items:center;gap:10px}.mini-brand{background:#f4e8bf;color:#785a0b;width:36px;height:36px;border-radius:10px;display:grid;place-items:center;font-weight:800}.sidebar-bottom b,.sidebar-bottom small{display:block}.sidebar-bottom small{font-size:11px;color:var(--muted);margin-top:4px}.main{margin-left:248px;min-height:100vh;display:flex;flex-direction:column}.topbar{height:62px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 30px;position:sticky;top:0;z-index:5}.crumb{color:#7d8aa0}.crumb span{padding:0 9px;color:#c2c8d2}.top-actions{display:flex;align-items:center;gap:10px;color:#73809a;font-size:11px}.secure-dot{width:7px;height:7px;border-radius:50%;background:#18b777}.avatar{width:32px;height:32px;border-radius:50%;background:var(--brand);color:#fff;display:grid;place-items:center;font-weight:800;margin-left:10px}.content{padding:26px 28px 36px;flex:1;max-width:1800px;width:100%;margin:0 auto}.page-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:22px}.page-heading h1{font-size:24px;letter-spacing:-.8px;margin:5px 0 0;font-weight:800}.eyebrow{font-size:10px;letter-spacing:1.5px;font-weight:800;color:#8994aa}.btn{border:1px solid transparent;border-radius:6px;min-height:37px;padding:0 14px;display:inline-flex;align-items:center;justify-content:center;gap:7px;font-weight:700;cursor:pointer;white-space:nowrap;transition:.15s}.btn.primary{background:var(--brand);color:#fff;box-shadow:0 2px 3px #3039ad20}.btn.primary:hover{background:var(--brand2)}.btn.outline{background:#fff;border-color:#dfe4ed;color:#33415e}.btn.outline:hover{border-color:#aab5ca}.btn.full{width:100%}.btn.tiny{min-height:28px;padding:0 9px;font-size:11px}.btn.danger-outline{border-color:#f2c9ce;background:#fff;color:#d43d50}.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:17px;margin-bottom:22px}.stat-card,.panel{background:#fff;border:1px solid #e0e5ec;border-radius:7px;box-shadow:var(--shadow)}.stat-card{padding:18px 19px;min-height:148px;position:relative;overflow:hidden}.stat-top{display:flex;align-items:center;justify-content:space-between}.stat-icon{height:38px;width:38px;border-radius:50%;display:grid;place-items:center;font-size:19px;font-weight:800}.stat-icon.indigo{background:#eff0ff;color:var(--brand)}.stat-icon.green{background:#e8f8ef;color:var(--green)}.stat-icon.blue{background:#eaf4ff;color:var(--blue)}.stat-icon.red{background:#fff0f1;color:var(--red)}.trend{font-size:9px;font-weight:800;letter-spacing:.4px;border-radius:4px;padding:5px 7px}.trend.neutral{background:#f1f3f7;color:#7d879a}.green-t{background:#e8f8ef;color:#138d58}.blue-t{background:#eaf4ff;color:#247ad3}.red-t{background:#fff0f1;color:#d83f4e}.stat-label{font-size:12px;color:var(--muted);margin-top:14px}.stat-value{font-size:27px;font-weight:800;letter-spacing:-1px;margin-top:3px}.stat-foot{font-size:10px;color:#8994a6;margin-top:6px}.dashboard-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:20px;margin-bottom:20px}.panel{min-width:0;overflow:hidden}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:19px 20px;border-bottom:1px solid var(--line)}.panel-head h2{margin:0;font-size:15px;font-weight:800;letter-spacing:-.25px}.panel-head p{margin:6px 0 0;color:var(--muted);font-size:11px}.text-link{color:var(--brand);font-size:11px;font-weight:700;white-space:nowrap}.account-list{padding:4px 20px}.account-row{display:flex;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid #f0f2f6}.account-row:last-child{border-bottom:0}.platform-icon{width:40px;height:40px;border-radius:10px;display:grid;place-items:center;font-size:20px;font-weight:800;flex-shrink:0}.platform-icon.facebook{background:#edf3ff;color:#1877f2}.platform-icon.instagram{background:#fff0f6;color:#c13584}.platform-icon.x{background:#f0f2f5;color:#111}.platform-icon.youtube{background:#fff0f0;color:#f03}.account-info{min-width:0;flex:1}.account-info b,.account-info small{display:block}.account-info b{font-size:12px}.account-info small{font-size:10px;color:var(--muted);margin-top:4px}.status-pill{display:inline-flex;align-items:center;gap:5px;border-radius:4px;padding:5px 7px;font-size:10px;font-weight:700;white-space:nowrap;background:#f1f3f7;color:#68758b}.status-pill.connected,.status-pill.published{background:#e8f8ef;color:#168653}.status-pill.pending,.status-pill.draft{background:#fff6e5;color:#a66b0a}.status-pill.scheduled,.status-pill.queued{background:#eaf4ff;color:#2878c8}.status-pill.failed{background:#fff0f1;color:#d43e4f}.status-pill.partial{background:#fff4e8;color:#b66a15}.status-pill.cancelled{background:#f0f1f4;color:#69758a}.panel-bottom{padding:13px 20px 18px;border-top:1px solid #f0f2f6}.quick-create{padding:23px 22px 20px;text-align:center}.quick-illustration{height:52px;width:52px;border-radius:15px;background:#eef0ff;color:var(--brand);display:grid;place-items:center;font-size:27px;margin:0 auto 14px}.quick-create h3{font-size:14px;margin:0 0 8px}.quick-create p{font-size:11px;color:var(--muted);line-height:1.7;max-width:280px;margin:0 auto 18px}.tip-box{margin:0 20px 18px;background:#f6f7fc;border:1px solid #eaedf5;border-radius:6px;padding:12px 14px}.tip-box b{font-size:11px}.tip-box p{font-size:10px;line-height:1.6;color:#697791;margin:5px 0 0}.recent-panel{margin-bottom:20px}.empty-state{text-align:center;padding:35px 15px}.empty-icon{font-size:25px;color:#9aa5bc;margin-bottom:9px}.empty-state b{font-size:13px}.empty-state p,.muted-empty{color:var(--muted);font-size:11px;margin:7px 0 16px}.table-wrap{width:100%;overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:left;white-space:normal}th{font-size:10px;text-transform:uppercase;letter-spacing:.5px;color:#8490a5;background:#fafbfd;font-weight:800}th,td{padding:13px 18px;border-bottom:1px solid #edf0f4}td{font-size:11px;color:#53627d}td b{display:block;color:#18243d;font-size:11px}td small.subline{display:block;color:#929cb0;font-size:10px;margin-top:5px;max-width:330px}.compose-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,.75fr);gap:20px;align-items:start}.panel-body{padding:22px}.panel-body label,.auth-card label{display:block;font-size:11px;font-weight:700;margin:0 0 8px}.optional{font-weight:500;color:#99a2b3;margin-left:5px}.panel-body input[type=text],.panel-body textarea,.panel-body input[type=datetime-local],.auth-card input{width:100%;border:1px solid #dfe4ec;border-radius:6px;padding:11px 12px;color:var(--ink);outline:0;margin-bottom:18px;background:#fff}.panel-body textarea{resize:vertical;min-height:140px;line-height:1.6}.panel-body input:focus,.panel-body textarea:focus,.auth-card input:focus{border-color:#747de0;box-shadow:0 0 0 3px #3039ad12}.field-hint{display:flex;justify-content:space-between;font-size:10px;color:#8a96aa;margin:-10px 0 22px}.upload-box{border:1px dashed #cbd3e0;border-radius:7px;padding:15px;margin-bottom:22px;background:#fbfcfe}.upload-box input{max-width:100%;font-size:11px}.upload-box small{display:block;color:#8591a5;line-height:1.5;margin-top:8px}.file-name{font-size:11px;color:var(--brand);margin-top:7px}.panel-subhead{border-top:1px solid #edf0f4;padding-top:19px;margin:18px 0 13px;display:flex;justify-content:space-between}.panel-subhead h3{font-size:13px;margin:0}.panel-subhead p{font-size:10px;color:var(--muted);margin:5px 0 0}.step-label{font-size:9px;color:#7d89a0;letter-spacing:1px;font-weight:800}.platform-select{display:grid;grid-template-columns:1fr 1fr;gap:9px}.platform-choice{display:flex!important;align-items:center;gap:10px;border:1px solid #e2e6ed;border-radius:7px;padding:11px;cursor:pointer;margin:0!important;min-width:0}.platform-choice:has(input:checked){border-color:#858ce0;background:#f8f8ff}.platform-choice input{accent-color:var(--brand)}.platform-choice .platform-icon{width:34px;height:34px;font-size:17px}.choice-copy{flex:1;min-width:0}.choice-copy b,.choice-copy small{display:block}.choice-copy b{font-size:11px}.choice-copy small{font-size:9px;color:var(--muted);margin-top:4px}.status-mini{font-size:8px;color:#9a6a17;background:#fff5e3;padding:4px 5px;border-radius:4px;white-space:nowrap}.status-mini.ok{color:#168653;background:#e8f8ef}.mode-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.mode-choice{display:flex!important;align-items:flex-start;gap:8px;border:1px solid #e1e6ee;border-radius:7px;padding:12px 9px;cursor:pointer;margin:0!important}.mode-choice:has(input:checked){border-color:#8289dc;background:#f8f8ff}.mode-choice input{accent-color:var(--brand);margin-top:2px}.mode-choice b,.mode-choice small{display:block}.mode-choice b{font-size:10px}.mode-choice small{font-size:9px;color:var(--muted);margin-top:5px}.schedule-field{margin-top:16px}.hidden{display:none!important}.form-actions{display:flex;justify-content:flex-end;gap:9px;border-top:1px solid #edf0f4;padding-top:18px;margin-top:22px}.preview-panel{position:sticky;top:82px}.round-icon{height:32px;width:32px;border-radius:9px;background:#eef0ff;color:var(--brand);display:grid;place-items:center}.preview-card{margin:20px;border:1px solid #e4e8ef;border-radius:8px;overflow:hidden}.preview-brand{display:flex;align-items:center;gap:9px;padding:12px}.small-mark{width:29px;height:29px;font-size:19px}.preview-brand b,.preview-brand small{display:block;font-size:10px}.preview-brand small{font-size:9px;color:var(--muted);margin-top:3px}.preview-media{height:190px;background:#f2f4f8;color:#a0aabd;display:grid;place-items:center;font-size:11px;overflow:hidden}.preview-media img,.preview-media video{width:100%;height:100%;object-fit:contain}.preview-caption{padding:14px;font-size:11px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}.preview-panel .tip-box{margin-top:0}.filters{display:flex;gap:7px;padding:14px 20px;border-bottom:1px solid #edf0f4;flex-wrap:wrap}.filter-chip{font-size:10px;font-weight:700;color:#65728a;background:#f4f6f9;padding:7px 10px;border-radius:5px}.filter-chip.active{background:#eef0ff;color:var(--brand)}.action-group{display:flex;gap:6px}.logs-panel{margin-top:20px}.log-list{padding:4px 20px}.log-row{display:flex;gap:11px;align-items:flex-start;padding:13px 0;border-bottom:1px solid #f0f2f6}.log-row:last-child{border-bottom:0}.log-dot{width:8px;height:8px;border-radius:50%;background:#8b97aa;margin-top:5px;flex-shrink:0}.log-dot.error{background:var(--red)}.log-dot.success{background:var(--green)}.log-dot.warning{background:#efa72f}.log-row div{flex:1}.log-row b{font-size:10px}.log-row p{font-size:10px;color:var(--muted);margin:5px 0 0;line-height:1.5}.log-row time{font-size:9px;color:#98a2b3;white-space:nowrap}.notice{padding:11px 13px;border-radius:6px;font-size:11px;line-height:1.6;margin-bottom:17px}.notice.info{background:#edf5ff;color:#245f9d;border:1px solid #d8e9ff}.notice.error{background:#fff0f1;color:#b93343;border:1px solid #f8d9dd}.notice.success{background:#eaf9f0;color:#147a4c;border:1px solid #d3f0df}.account-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.account-card{padding:20px}.account-card-top{display:flex;justify-content:space-between;align-items:center}.platform-icon.large{width:48px;height:48px;font-size:24px}.account-card h2{font-size:15px;margin:17px 0 8px}.account-card p{font-size:11px;line-height:1.7;color:var(--muted);min-height:54px;margin:0}.provider-status{display:flex;align-items:center;gap:8px;border-top:1px solid #edf0f4;margin-top:17px;padding-top:14px;font-size:10px;color:#6e7b92}.status-dot{width:7px;height:7px;border-radius:50%;background:#e6a32e}.status-dot.good{background:var(--green)}.account-card-bottom{margin-top:16px}.setup-panel{margin-top:20px}.setup-panel .panel-body li{font-size:11px;line-height:1.8;color:#53627d;padding:4px 0}.footer{padding:14px 28px;border-top:1px solid var(--line);font-size:10px;color:#8994a6;display:flex;justify-content:space-between}.auth-body{min-height:100vh;display:grid;place-items:center;padding:22px;background:linear-gradient(135deg,#3039ad 0%,#252d94 42%,#f4f6f9 42%,#fff 100%)}.auth-card{width:min(100%,430px);background:#fff;border:1px solid #e1e5ed;border-radius:10px;padding:32px;box-shadow:0 15px 50px #101b3520}.auth-brand{padding:0 0 26px}.auth-card h1{font-size:23px;margin:0 0 8px}.auth-card>p{font-size:11px;color:var(--muted);line-height:1.7;margin:0 0 24px}.auth-card input{margin-bottom:18px}.auth-card small{display:block;color:var(--muted);font-size:10px;margin-top:-10px;margin-bottom:20px}.auth-foot{text-align:center;color:#9aa3b4;font-size:10px;margin-top:20px}
@media(max-width:1200px){.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-grid{grid-template-columns:1fr}.compose-layout{grid-template-columns:1fr}.preview-panel{position:static}.preview-card{max-width:520px}.account-cards{grid-template-columns:1fr 1fr}}
@media(max-width:760px){.sidebar{width:65px;padding:17px 8px}.brand{padding:0 6px 25px}.brand>span:last-child,.side-label,.sidebar nav a span,.sidebar-bottom>div:last-child{display:none}.brand-mark{width:38px}.sidebar nav a{justify-content:center;padding:13px 0;font-size:17px}.sidebar-bottom{justify-content:center;padding:15px 0 0}.main{margin-left:65px}.topbar{height:55px;padding:0 14px}.top-actions>span:not(.secure-dot){display:none}.content{padding:20px 13px}.page-heading h1{font-size:20px}.stats-grid{gap:10px}.stat-card{padding:13px;min-height:132px}.stat-value{font-size:23px}.stat-foot{line-height:1.4}.panel-head{padding:15px}.account-list{padding:4px 14px}.account-row{gap:8px}.platform-icon{width:34px;height:34px;font-size:17px}.status-pill{font-size:9px;padding:4px 5px}.quick-create{padding:20px 15px}.tip-box{margin-left:14px;margin-right:14px}.platform-select{grid-template-columns:1fr}.mode-grid{grid-template-columns:1fr}.mode-choice{align-items:center}.account-cards{grid-template-columns:1fr}.panel-body{padding:16px}.page-heading .btn{padding:0 10px;font-size:10px}.footer{padding:13px;gap:10px}.log-row{flex-wrap:wrap}.auth-body{background:linear-gradient(150deg,#3039ad 0%,#252d94 25%,#f4f6f9 25%,#fff 100%)}.auth-card{padding:24px}.filters{padding:12px;gap:5px}.filter-chip{padding:7px 8px}th,td{padding:11px 12px}}

/* Media-aware composer controls and aspect-ratio faithful previews */
.format-select{width:100%;border:1px solid #dfe4ec;border-radius:6px;padding:11px 12px;background:#fff;color:var(--ink);margin-bottom:18px}
.format-select:focus{outline:0;border-color:#747de0;box-shadow:0 0 0 3px #3039ad12}
.upload-box{display:flex;flex-direction:column;gap:8px}.upload-box input[type=file]{width:100%;padding:7px 0}
.preview-media{height:auto;min-height:120px;max-height:420px;width:100%;aspect-ratio:1/1;margin:0 auto;background:#f2f4f8;display:flex;align-items:center;justify-content:center;overflow:hidden;gap:6px}
.preview-media img,.preview-media video{display:block;width:100%;height:100%;max-height:420px;object-fit:contain}
.preview-media-grid{height:auto;max-height:none;aspect-ratio:auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;padding:6px;gap:6px}
.preview-item{min-width:0;overflow:hidden;background:#e9edf4;border-radius:5px;display:flex;align-items:center;justify-content:center}
.preview-item .media-ratio-box{width:100%;max-height:260px;display:flex;align-items:center;justify-content:center;overflow:hidden;aspect-ratio:1/1}
.preview-item img,.preview-item video{width:100%;height:100%;max-height:260px;object-fit:contain;background:#eef1f6}
.media-thumbs{display:flex;gap:8px;flex-wrap:wrap;margin-top:6px}.media-thumb{width:92px;min-width:0;border:1px solid #e0e5ed;border-radius:6px;padding:4px;background:#fff;overflow:hidden}.media-thumb .media-ratio-box{width:100%;aspect-ratio:1/1;display:grid;place-items:center;overflow:hidden;background:#f0f2f6}.media-thumb img,.media-thumb video{width:100%;height:100%;object-fit:contain}.media-thumb span{display:block;font-size:9px;color:#68758b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:4px}
.platform-icon.threads{background:#f1f2f5;color:#111}.platform-icon.youtube{background:#fff0f1;color:#e62117}.platform-icon.x{background:#f2f3f5;color:#111}
@media(max-width:760px){.preview-media-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.media-thumb{width:76px}}
