/* MobilePhoto AI SaaS — app.css */
:root {
  --bg: #0d0f14; --card: #161b27; --border: #252d42;
  --acc: #e8a838; --acc2: #c47c1f; --text: #dde3f0; --muted: #7a8aad;
  --green: #2ecc71; --red: #e74c3c; --blue: #3b82f6;
  --r: 12px; --sidebar: 240px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }
a { color: var(--acc); text-decoration: none; }

/* ── Sidebar ── */
.sidebar { position: fixed; top: 0; left: 0; width: var(--sidebar); height: 100vh; background: var(--card); border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow-y: auto; z-index: 100; }
.sidebar-logo { display: flex; align-items: center; gap: 10px; padding: 20px 18px; border-bottom: 1px solid var(--border); }
.logo-icon { font-size: 1.5rem; }
.logo-text { font-size: 1rem; font-weight: 700; color: var(--acc); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; }
.user-name { font-size: .84rem; font-weight: 600; }
.user-role { font-size: .72rem; color: var(--muted); }
.sidebar-nav { list-style: none; padding: 10px 0; flex: 1; }
.sidebar-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 18px; color: var(--muted); font-size: .87rem; transition: all .18s; border-radius: 0; }
.sidebar-nav a:hover, .sidebar-nav a.active { color: var(--text); background: rgba(255,255,255,.05); }
.sidebar-nav a.active { color: var(--acc); border-left: 3px solid var(--acc); }
.nav-icon { font-size: 1rem; width: 20px; text-align: center; }
.nav-logout { color: var(--red) !important; }
.nav-divider { height: 1px; background: var(--border); margin: 8px 0; }
.sidebar-usage { padding: 14px 18px; border-top: 1px solid var(--border); }
.usage-label { font-size: .72rem; color: var(--muted); margin-bottom: 6px; }
.usage-bar { background: var(--border); border-radius: 20px; height: 5px; overflow: hidden; margin-bottom: 4px; }
.usage-fill { height: 100%; background: var(--acc); border-radius: 20px; }
.usage-text { font-size: .7rem; color: var(--muted); }

/* ── Layout ── */
.main-wrap { margin-left: var(--sidebar); min-height: 100vh; }
.main-content { padding: 28px 32px; max-width: 1400px; }

/* ── Page Header ── */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.page-header h1 { font-size: 1.5rem; font-weight: 700; }
.page-sub { color: var(--muted); font-size: .9rem; margin-top: 3px; }

/* ── Cards ── */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 22px; margin-bottom: 16px; }

/* ── Stats ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 18px; text-align: center; transition: border-color .2s; }
.stat-card:hover { border-color: var(--acc); }
.stat-icon { font-size: 1.6rem; margin-bottom: 8px; }
.stat-num { font-size: 1.9rem; font-weight: 700; color: var(--acc); }
.stat-lbl { color: var(--muted); font-size: .78rem; margin-top: 3px; }
.stat-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .86rem; }
.stat-row:last-child { border: none; }
.stat-val { font-weight: 700; color: var(--acc); }

/* ── Dashboard ── */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.section-title { font-size: .76rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: 12px; }
.action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 20px; }
.action-btn { display: block; padding: 12px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r); color: var(--text); font-size: .87rem; font-weight: 500; text-align: center; transition: all .2s; }
.action-btn:hover, .action-btn.primary:hover { border-color: var(--acc); color: var(--acc); transform: translateY(-1px); }
.action-btn.primary { background: var(--acc); border-color: var(--acc); color: #000; }
.upcoming-item { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.upcoming-date { min-width: 46px; text-align: center; font-size: .8rem; font-weight: 700; color: var(--acc); line-height: 1.3; }
.upcoming-date span { display: block; font-size: .68rem; font-weight: 400; color: var(--muted); }
.upcoming-info strong { font-size: .87rem; display: block; }
.recent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.recent-card { background: var(--card); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.recent-card img { width: 100%; height: 90px; object-fit: cover; display: block; }
.recent-placeholder { height: 90px; display: flex; align-items: center; justify-content: center; font-size: 2rem; background: var(--bg); }
.recent-meta { padding: 6px 8px; display: flex; justify-content: space-between; align-items: center; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border: none; border-radius: 8px; font-size: .88rem; font-weight: 600; cursor: pointer; transition: all .2s; text-decoration: none; }
.btn-primary { background: var(--acc); color: #000; }
.btn-primary:hover { background: var(--acc2); color: #000; }
.btn-secondary { background: transparent; border: 1px solid var(--acc); color: var(--acc); }
.btn-secondary:hover { background: rgba(232,168,56,.1); }
.btn-danger { background: transparent; border: 1px solid var(--red); color: var(--red); }
.btn-danger:hover { background: rgba(231,76,60,.1); }
.btn-full { width: 100%; justify-content: center; }
.btn-sm { padding: 5px 11px; font-size: .76rem; background: var(--border); border: none; color: var(--text); border-radius: 6px; cursor: pointer; transition: all .2s; }
.btn-sm:hover { background: var(--acc); color: #000; }
.btn-icon { background: none; border: none; cursor: pointer; color: var(--muted); font-size: .9rem; padding: 2px 6px; }
.btn-icon:hover { color: var(--red); }
.btn-copy { margin-top: 7px; padding: 6px 13px; font-size: .78rem; background: var(--border); border: none; color: var(--text); border-radius: 6px; cursor: pointer; transition: all .2s; }
.btn-copy:hover { background: var(--acc); color: #000; }

/* ── Forms ── */
.input { width: 100%; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 9px 12px; font-size: .87rem; font-family: inherit; }
.input:focus { outline: none; border-color: var(--acc); }
.textarea { width: 100%; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 9px 12px; font-size: .87rem; resize: vertical; font-family: inherit; }
.textarea:focus { outline: none; border-color: var(--acc); }
.field-label { display: block; font-size: .78rem; color: var(--muted); margin-bottom: 5px; }
.form-row { margin-bottom: 12px; }
.form-row label { display: block; font-size: .78rem; color: var(--muted); margin-bottom: 4px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Alerts ── */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: .87rem; }
.alert-success { background: rgba(46,204,113,.15); color: var(--green); border: 1px solid rgba(46,204,113,.3); }
.alert-error   { background: rgba(231,76,60,.15);  color: var(--red);   border: 1px solid rgba(231,76,60,.3); }
.alert-warn    { background: rgba(232,168,56,.12); color: var(--acc);   border: 1px solid rgba(232,168,56,.3); }

/* ── Badges ── */
.badge { font-size: .7rem; padding: 2px 8px; border-radius: 10px; background: rgba(232,168,56,.15); color: var(--acc); }
.badge.active   { background: rgba(46,204,113,.15); color: var(--green); }
.badge.pending  { background: rgba(232,168,56,.12); color: var(--acc); }
.badge.suspended{ background: rgba(231,76,60,.15);  color: var(--red); }
.badge.admin    { background: rgba(232,168,56,.2);  color: var(--acc); }
.status-pill { font-size: .7rem; padding: 2px 7px; border-radius: 10px; display: inline-block; margin-top: 3px; }
.status-pill.planned  { background: rgba(232,168,56,.15); color: var(--acc); }
.status-pill.ready    { background: rgba(46,204,113,.15);  color: var(--green); }
.status-pill.published{ background: rgba(59,130,246,.15);  color: var(--blue); }

/* ── Tables ── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; padding: 9px 13px; font-size: .75rem; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--border); }
.data-table td { padding: 10px 13px; border-bottom: 1px solid var(--border); font-size: .86rem; vertical-align: middle; }
.data-table tr:hover td { background: rgba(255,255,255,.02); }
.priority-high   { color: var(--red); font-weight: 600; }
.priority-medium { color: var(--acc); }
.priority-low    { color: var(--green); }

/* ── Modal ── */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.72); z-index: 9999; display: flex; align-items: center; justify-content: center; }
.modal-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 26px; width: 90%; max-width: 580px; max-height: 88vh; overflow-y: auto; position: relative; }
.modal-close { position: absolute; top: 12px; right: 14px; background: none; border: none; color: var(--muted); font-size: 1.1rem; cursor: pointer; }
.modal-close:hover { color: var(--text); }

/* ── Analyze ── */
.analyze-layout { display: grid; grid-template-columns: 320px 1fr; gap: 20px; align-items: start; }
.upload-zone { border: 2px dashed var(--border); border-radius: var(--r); padding: 32px 18px; text-align: center; cursor: pointer; transition: all .2s; color: var(--muted); margin-bottom: 14px; }
.upload-zone:hover { border-color: var(--acc); color: var(--acc); background: rgba(232,168,56,.04); }
.upload-icon { font-size: 2.2rem; margin-bottom: 8px; }
.lang-selector { margin-bottom: 14px; }
.lang-btns { display: flex; gap: 6px; }
.lang-btn { flex: 1; padding: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-size: .82rem; text-align: center; transition: all .2s; color: var(--text); }
.lang-btn:has(input:checked) { border-color: var(--acc); color: var(--acc); background: rgba(232,168,56,.1); }
.hint { font-size: .75rem; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.hint a { color: var(--acc); }
.costs-box { background: var(--bg); border-radius: 6px; padding: 7px 10px; font-size: .71rem; color: var(--muted); margin-top: 8px; }

/* ── Tabs ── */
.tabs { display: flex; gap: 3px; margin-bottom: 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tab { padding: 7px 12px; background: none; border: none; color: var(--muted); cursor: pointer; font-size: .82rem; border-bottom: 2px solid transparent; transition: all .2s; margin-bottom: -1px; }
.tab.active { color: var(--acc); border-bottom-color: var(--acc); }
.tab-content { display: none; }
.tab-content.active { display: block; }
.results-card .card { background: var(--card); }

/* ── Caption cards ── */
.caption-card { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 11px 14px; margin-bottom: 7px; cursor: pointer; transition: all .18s; display: flex; align-items: flex-start; gap: 10px; }
.caption-card:hover { border-color: var(--acc); }
.caption-card.selected { border-color: var(--acc); background: rgba(232,168,56,.06); }
.caption-emoji { font-size: 1.2rem; }
.caption-tone { font-size: .68rem; font-weight: 700; text-transform: uppercase; color: var(--acc); background: rgba(232,168,56,.15); padding: 2px 7px; border-radius: 10px; display: inline-block; margin-bottom: 4px; }
.caption-text { font-size: .88rem; color: var(--text); line-height: 1.5; }
.scene-desc { background: rgba(232,168,56,.08); border-left: 3px solid var(--acc); padding: 9px 13px; border-radius: 0 8px 8px 0; font-style: italic; font-size: .88rem; margin-bottom: 14px; }

/* ── Tags ── */
.tags-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.tag { background: rgba(59,130,246,.13); border: 1px solid rgba(59,130,246,.3); color: var(--blue); padding: 4px 9px; border-radius: 20px; font-size: .8rem; }
.tags-checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 5px; margin-bottom: 10px; }
.tag-check { display: flex; align-items: center; gap: 7px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 5px 9px; font-size: .8rem; cursor: pointer; transition: all .15s; }
.tag-check:hover { border-color: var(--acc); }
.tag-check input { accent-color: var(--acc); }
.select-all-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: .83rem; }

/* ── Composition ── */
.score-ring { text-align: center; padding: 16px 0; }
.score-num { font-size: 2.8rem; font-weight: 700; color: var(--acc); }
.score-lbl { color: var(--muted); font-size: .82rem; }
.comp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.comp-box { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
.comp-box h4 { color: var(--acc); font-size: .82rem; margin: 0 0 8px; }
.comp-box div { font-size: .83rem; padding: 2px 0; }

/* ── Profiles ── */
.profile-item { display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px 13px; margin-bottom: 8px; }
.profile-handle { font-weight: 600; color: var(--acc); font-size: .92rem; }
.profile-reason { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.tip-box { background: rgba(232,168,56,.08); border-left: 3px solid var(--acc); padding: 9px 13px; border-radius: 0 8px 8px 0; font-size: .85rem; margin-top: 10px; }
.tip-small { font-size: .75rem; color: var(--muted); margin-top: 5px; }
.copy-section { margin-bottom: 10px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 14px 0; }

/* ── Ideas ── */
.ideas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.idea-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 16px; transition: all .2s; }
.idea-card:hover { border-color: var(--acc); transform: translateY(-2px); }
.idea-icon { font-size: 1.7rem; margin-bottom: 5px; }
.idea-cat { font-size: .68rem; text-transform: uppercase; color: var(--acc); margin-bottom: 7px; }
.idea-card h3 { font-size: .92rem; margin: 0 0 7px; }
.idea-card p { font-size: .81rem; color: var(--muted); line-height: 1.5; margin: 0 0 8px; }

/* ── Audit ── */
.audit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.audit-box { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
.audit-box h4 { color: var(--acc); font-size: .82rem; margin: 0 0 8px; }
.audit-box div { font-size: .83rem; padding: 3px 0; }

/* ── Calendar ── */
.cal-nav { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.cal-nav h2 { font-size: 1.15rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-head { text-align: center; font-size: .7rem; text-transform: uppercase; color: var(--muted); padding: 7px; }
.cal-day { background: var(--card); border: 1px solid var(--border); border-radius: 8px; min-height: 76px; padding: 5px; cursor: pointer; transition: all .2s; }
.cal-day:hover { border-color: var(--acc); }
.cal-day.today { border-color: var(--acc); }
.cal-day.other { opacity: .3; pointer-events: none; }
.cal-day-num { font-size: .75rem; color: var(--muted); margin-bottom: 3px; }
.cal-event { font-size: .65rem; font-weight: 600; border-radius: 4px; padding: 2px 5px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.cal-event.planned  { background: var(--acc); color: #000; }
.cal-event.ready    { background: var(--green); color: #000; }
.cal-event.published{ background: var(--blue); color: #fff; }

/* ── Login ── */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--bg); }
.login-wrap { width: 100%; max-width: 420px; padding: 20px; }
.login-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 40px; text-align: center; }
.login-logo { font-size: 3rem; margin-bottom: 12px; }
.login-title { font-size: 1.5rem; font-weight: 700; color: var(--acc); margin-bottom: 8px; }
.login-sub { color: var(--muted); font-size: .9rem; margin-bottom: 28px; }
.btn-google { display: inline-flex; align-items: center; gap: 10px; padding: 12px 24px; background: #fff; color: #333; border: none; border-radius: 8px; font-size: .92rem; font-weight: 600; cursor: pointer; text-decoration: none; transition: all .2s; }
.btn-google:hover { background: #f0f0f0; transform: translateY(-1px); }
.login-note { color: var(--muted); font-size: .78rem; margin-top: 16px; line-height: 1.6; }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 44px; color: var(--muted); font-size: .93rem; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .sidebar { width: 60px; }
  .sidebar-logo .logo-text, .sidebar-user .user-name, .sidebar-user .user-role, .nav-label, .sidebar-usage { display: none; }
  .sidebar-logo { justify-content: center; padding: 16px; }
  .sidebar-user { justify-content: center; }
  .sidebar-nav a { justify-content: center; padding: 12px; }
  .main-wrap { margin-left: 60px; }
  .analyze-layout, .dash-grid, .comp-grid, .audit-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .main-content { padding: 16px; }
}

/* ── Top15 hashtag selector ── */
.top15-item {
    display:flex;align-items:flex-start;gap:10px;
    background:var(--bg);border:1px solid var(--border);border-radius:8px;
    padding:10px 12px;cursor:pointer;transition:all .15s;
}
.top15-item:hover { border-color: var(--acc); }
.top15-item.selected { border-color: var(--acc); background: rgba(232,168,56,.08); }
.top15-item.disabled { opacity:.4; cursor:not-allowed; }
.top15-item input { accent-color: var(--acc); margin-top:2px; flex-shrink:0; }
.top15-content { flex:1; }

/* ── Lightroom panel ── */
.lr-section { background: var(--bg); border: 1px solid var(--border); border-radius: 9px; padding: 13px; margin-bottom: 12px; }
.lr-section-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .8px; color: var(--acc); margin-bottom: 10px; font-weight: 700; }
.lr-sliders-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 10px; }
.lr-slider-item { background: var(--card); border-radius: 7px; padding: 9px 11px; }
