/* Layan.ai — social scheduler: composer, live preview, calendar, queue */
.soc-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .soc-grid { grid-template-columns: 1fr; } }
.soc-input { width: 100%; font: inherit; font-size: var(--fs-sm); color: var(--paper); background: rgba(2, 9, 31, 0.55); border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 9px 12px; outline: none; transition: border-color var(--t-fast); }
.soc-input:focus { border-color: var(--signal); }
textarea.soc-input { min-height: 110px; resize: vertical; line-height: 1.45; }
.soc-field { display: grid; gap: 6px; font-size: var(--fs-xs); color: var(--muted); }
.soc-field .count { justify-self: end; font-family: var(--font-mono); font-size: 0.66rem; }
.soc-field .count.is-over { color: var(--bad); }
.soc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 600px) { .soc-row { grid-template-columns: 1fr; } }

/* platform chips */
.plats { display: flex; flex-wrap: wrap; gap: 6px; }
.plat { --h: 214; display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-xs); font-weight: 500; padding: 6px 11px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); color: var(--frost); background: rgba(170, 206, 253, 0.06); transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast); }
.plat::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: hsl(var(--h) 85% 62%); box-shadow: 0 0 8px hsl(var(--h) 85% 62% / 0.7); }
.plat.is-on { background: rgba(37, 78, 193, 0.35); color: var(--paper); border-color: rgba(96, 157, 252, 0.6); }
.plat small { color: var(--muted); font-family: var(--font-mono); font-size: 0.62rem; }

/* AI writer */
.writer { display: grid; gap: 8px; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid rgba(96, 157, 252, 0.3); background: linear-gradient(135deg, rgba(37, 78, 193, 0.18), rgba(7, 20, 51, 0.5)); }
.writer-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: var(--fs-sm); font-weight: 600; }
.tones { display: flex; flex-wrap: wrap; gap: 6px; }
.tones button { font-size: var(--fs-xs); padding: 5px 10px; border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--frost); background: rgba(2, 9, 31, 0.4); }
.tones button.is-on { background: var(--cobalt); color: #fff; border-color: var(--cobalt); }
.writer-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--muted); }
.soc-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.soc-actions .muted { margin-left: auto; font-size: var(--fs-xs); }

/* phone preview */
.phone { width: min(320px, 100%); margin: 0 auto; border-radius: 34px; border: 1px solid var(--line-strong); background: #05122F; padding: 14px 12px 20px; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.04); display: grid; gap: 10px; min-height: 420px; align-content: start; }
.phone-top { display: flex; align-items: center; gap: 10px; font-size: var(--fs-xs); }
.phone-top .avatar { --h: 214; width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0, hsl(var(--h) 95% 78%) 18%, hsl(var(--h) 90% 55%) 50%, hsl(var(--h) 80% 30%) 100%); flex-shrink: 0; }
.phone-top b { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--paper); }
.phone-top span { color: var(--muted); }
.phone-media { aspect-ratio: 1; border-radius: 12px; background: rgba(170, 206, 253, 0.06); border: 1px dashed var(--line-strong); display: grid; place-items: center; font-size: var(--fs-xs); color: var(--muted); overflow: hidden; text-align: center; padding: 10px; }
.phone-media img { width: 100%; height: 100%; object-fit: cover; }
.phone-media.is-video { aspect-ratio: 9 / 16; background: linear-gradient(180deg, rgba(37, 78, 193, 0.3), rgba(2, 9, 31, 0.8)); border-style: solid; }
.phone-text { font-size: var(--fs-sm); color: var(--paper-2); white-space: pre-wrap; line-height: 1.45; word-break: break-word; }
.phone-text b { display: block; font-weight: 600; color: var(--paper); margin-bottom: 4px; }
.phone-text .tags { color: var(--signal); }
.phone-text .over { background: rgba(255, 107, 122, 0.25); border-radius: 3px; }
.phone-foot { display: flex; gap: 14px; font-size: var(--fs-xs); color: var(--muted); }
.preview-tabs { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.preview-tabs button { font-size: var(--fs-xs); padding: 4px 9px; border-radius: var(--r-pill); color: var(--frost); }
.preview-tabs button.is-on { background: rgba(96, 157, 252, 0.18); color: var(--paper); }

/* calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cal-head .btn-sm { height: 30px; padding: 0 10px; }
.cal-title { font-size: var(--fs-md); font-weight: 600; min-width: 150px; text-align: center; }
.cal-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.cal-filters select { font: inherit; font-size: var(--fs-xs); color: var(--paper); background: rgba(2, 9, 31, 0.55); border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: 5px 10px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { font-size: 0.66rem; font-family: var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); text-align: center; padding: 4px 0; }
.cal-day { min-height: 84px; border-radius: var(--r-sm); border: 1px solid var(--line); background: rgba(2, 9, 31, 0.4); padding: 5px 6px; display: grid; gap: 3px; align-content: start; min-width: 0; }
.cal-day.is-out { opacity: 0.4; }
.cal-day.is-today { border-color: rgba(96, 157, 252, 0.6); }
.cal-day > time { font-size: var(--fs-xs); color: var(--muted); font-family: var(--font-mono); }
.cal-post { --h: 214; display: flex; align-items: center; gap: 5px; font-size: 0.68rem; line-height: 1.2; padding: 3px 6px; border-radius: 4px; background: rgba(170, 206, 253, 0.08); color: var(--paper-2); text-align: left; min-width: 0; width: 100%; border: 1px solid transparent; }
.cal-post::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: hsl(var(--h) 85% 62%); flex-shrink: 0; }
.cal-post span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-post[data-status="draft"] { border-style: dashed; border-color: var(--line-strong); }
.cal-post[data-status="scheduled"] { border-color: rgba(242, 184, 75, 0.5); }
.cal-post[data-status="published"] { border-color: rgba(61, 220, 151, 0.5); }
.cal-post[data-status="failed"] { border-color: rgba(255, 107, 122, 0.6); }
.cal-post.is-sel { background: rgba(37, 78, 193, 0.35); color: var(--paper); }
@media (max-width: 700px) { .cal-day { min-height: 56px; } .cal-post span { display: none; } }

/* queue list and detail */
.queue-list { display: grid; gap: 6px; }
.qp { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 9px 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: rgba(2, 9, 31, 0.45); text-align: left; width: 100%; }
.qp.is-sel { border-color: rgba(96, 157, 252, 0.6); }
.qp .dot { --h: 214; width: 8px; height: 8px; border-radius: 50%; background: hsl(var(--h) 85% 62%); box-shadow: 0 0 8px hsl(var(--h) 85% 62% / 0.7); }
.qp-main { display: grid; gap: 2px; min-width: 0; }
.qp-title { font-size: var(--fs-sm); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qp-meta { font-size: var(--fs-xs); color: var(--muted); }
.detail { display: grid; gap: 10px; }
.detail-text { font-size: var(--fs-sm); color: var(--paper-2); white-space: pre-wrap; max-height: 160px; overflow: auto; }
.gate { display: grid; gap: 6px; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid rgba(242, 184, 75, 0.4); background: rgba(242, 184, 75, 0.08); font-size: var(--fs-xs); color: var(--paper-2); }
.gate b { color: var(--warn); font-weight: 600; }
.empty { font-size: var(--fs-sm); color: var(--muted); padding: 10px 0; }
