/* AI CLOCK Workspace — Phase 2 scaffold v0.1 */
:root {
  --orange: #FF7A00;
  --blue: #0057FF;
  --ink: #1a1a1a;
  --muted: #6b7280;
  --bg: #f7f6f3;
  --card: #ffffff;
  --line: #e8e4dc;
  --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0 0 .4rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.error { color: #c0392b; font-size: .9rem; }
.success { color: #1e7e34; font-size: .95rem; }

/* ---------- auth ---------- */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  background: linear-gradient(135deg, #fff7ef, #eef3ff);
}
.auth-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 12px 40px rgba(0,0,0,.08);
}
.brand { text-align: center; margin-bottom: 1.2rem; }
.brand .logo { width: 64px; height: 64px; }
.brand h1 { letter-spacing: 2px; font-size: 1.6rem; }
.tagline { color: var(--muted); font-size: .95rem; }
.auth-tabs { display: flex; gap: .5rem; margin-bottom: 1rem; }
.auth-tab {
  flex: 1; padding: .6rem; border: 1px solid var(--line);
  background: none; border-radius: 10px; cursor: pointer; font-size: .95rem;
}
.auth-tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- layout ---------- */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: .7rem 1.2rem; background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.brand.small { display: flex; align-items: center; gap: .5rem; font-weight: 800; letter-spacing: 1.5px; }
.brand.small .logo { width: 34px; height: 34px; }
.user-box { display: flex; align-items: center; gap: .6rem; }
.user-email { font-size: .85rem; color: var(--muted); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mainnav {
  display: flex; gap: .4rem; padding: .6rem 1.2rem;
  background: var(--card); border-bottom: 1px solid var(--line);
  overflow-x: auto; position: sticky; top: 57px; z-index: 9;
}
.nav-btn {
  border: 1px solid var(--line); background: none; border-radius: 999px;
  padding: .55rem 1rem; font-size: .92rem; cursor: pointer; white-space: nowrap;
}
.nav-btn.active { background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 700; }

.demo-banner {
  background: #fff8e6; border-bottom: 1px solid #f0dfae;
  padding: .6rem 1.2rem; font-size: .9rem;
}
.linklike { background: none; border: none; color: var(--blue); text-decoration: underline; cursor: pointer; font-size: inherit; padding: 0; }

.content { flex: 1; padding: 1.2rem; max-width: 1080px; width: 100%; margin: 0 auto; }
.view-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.foot { text-align: center; padding: 1.4rem; font-size: .85rem; }

/* ---------- cards & grid ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.2rem; margin-bottom: 1.2rem;
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.proj-card { display: flex; flex-direction: column; gap: .5rem; }
.proj-card h3 { font-size: 1.05rem; }
.badges { display: flex; gap: .4rem; flex-wrap: wrap; }
.badge {
  font-size: .75rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px;
  background: #eef2ff; color: var(--blue); text-transform: capitalize;
}
.badge.type-campaign { background: #fff3e6; color: #b25b00; }
.badge.type-content { background: #e9f7ef; color: #1e7e34; }
.badge.type-ad { background: #fdecec; color: #c0392b; }
.badge.status-paused { background: #f1f1f1; color: var(--muted); }
.badge.status-done { background: #e9f7ef; color: #1e7e34; }
.proj-goal { font-size: .9rem; color: var(--muted); }
.proj-tags { display: flex; gap: .3rem; flex-wrap: wrap; }
.tag { font-size: .75rem; background: #f4f1ea; border-radius: 6px; padding: .15rem .5rem; color: #6b5f4d; }
.proj-date { font-size: .78rem; color: var(--muted); }
.proj-actions { display: flex; gap: .5rem; margin-top: auto; padding-top: .5rem; }

/* ---------- forms ---------- */
label { display: block; font-size: .9rem; font-weight: 600; margin: .8rem 0; }
input, select, textarea {
  display: block; width: 100%; margin-top: .35rem;
  padding: .65rem .8rem; font-size: 1rem; font-family: inherit;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--orange); border-color: var(--orange); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

.btn {
  border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: .65rem 1.1rem; font-size: .95rem; cursor: pointer; font-weight: 600;
}
.btn.primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.primary:hover { filter: brightness(.95); }
.btn.ghost { background: transparent; }
.btn.small { padding: .4rem .7rem; font-size: .85rem; }
#demo-enter { width: 100%; margin-top: .8rem; }

.chips { display: flex; gap: .4rem; flex-wrap: wrap; margin: .8rem 0; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: .35rem .8rem; font-size: .85rem; cursor: pointer;
}
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.seg { display: flex; gap: .5rem; margin-bottom: .5rem; }
.seg-btn {
  flex: 1; padding: .7rem; border: 1px solid var(--line); background: #fff;
  border-radius: 10px; font-size: 1rem; cursor: pointer;
}
.seg-btn.active { border-color: var(--orange); background: #fff7ef; font-weight: 700; }

.media-result {
  margin-top: 1rem; border: 1px dashed var(--line); border-radius: 10px;
  padding: 1rem; background: #faf9f7;
}
.progress { height: 10px; background: #eee; border-radius: 999px; overflow: hidden; margin: .6rem 0; }
.progress > div { height: 100%; width: 40%; background: var(--blue); border-radius: 999px; animation: slide 1.2s infinite ease-in-out; }
@keyframes slide { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }

.caption-preview {
  border-left: 4px solid var(--orange); margin: 1rem 0 0; padding: .8rem 1rem;
  background: #fffdf8; border-radius: 0 10px 10px 0; white-space: pre-wrap; font-size: .95rem;
}
.steps { font-size: .92rem; color: var(--muted); }
.steps code { background: #f4f1ea; padding: .1rem .4rem; border-radius: 6px; font-size: .85rem; }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 50;
}
.modal { width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; margin: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1rem; }

[hidden] { display: none !important; }

/* AI Assistant view */
.suggestions { margin: .5rem 0 0 1.1rem; padding: 0; }
.suggestions li { margin: .45rem 0; color: var(--muted, #666); font-style: italic; }
elevenlabs-convai { display: block; margin: 1rem auto; }

/* Social accounts */
.social-row { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .65rem 0; border-bottom: 1px solid rgba(0,0,0,.08); }
.social-row:last-of-type { border-bottom: none; }
.social-right { display: flex; align-items: center; gap: .5rem; white-space: nowrap; }
