/* MIURA portal mockups — tenant admin + employee */
@import url('miura-design-system.css');

:root {
  --sidebar: 248px;
  --tenant-accent: #C5A059;
}

body {
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at 20% 0%, #0c0c0e 0%, #050505 55%);
}

.top-link {
  text-align: center; padding: 12px 16px; background: var(--card);
  border-bottom: 1px solid rgba(197,160,89,.12); font-size: 0.85rem; color: var(--muted);
}
.top-link a { color: var(--gold-bright); font-weight: 600; text-decoration: none; }

.layout { display: flex; flex: 1; min-height: calc(100vh - 45px); }
.sidebar {
  width: var(--sidebar); background: var(--bg);
  border-right: 1px solid rgba(197,160,89,.12); padding: 20px 0; flex-shrink: 0;
}
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 0 20px 20px; border-bottom: 1px solid rgba(255,255,255,.04); margin-bottom: 4px; }
.sidebar .brand img { width: 28px; height: 28px; animation: gold-icon-glint 4.8s ease-in-out infinite; }
.sidebar .brand span.name { font-size: 1.05rem; letter-spacing: .04em; font-weight: 600; }
.sidebar .brand small { display: block; font-size: 0.65rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-top: 2px; }
.nav-group { font-size: 0.65rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted2); padding: 18px 20px 8px; }
.nav-item {
  display: block; width: 100%; text-align: left; padding: 11px 20px;
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 0.875rem; font-weight: 500; border-right: 3px solid transparent;
}
.nav-item:hover { background: rgba(255,255,255,.03); color: var(--text); }
.nav-item.active { background: rgba(197,160,89,.08); border-right-color: var(--gold); font-weight: 600; }
.main { flex: 1; padding: 28px 36px; overflow-y: auto; }
.screen { display: none; }
.screen.active { display: block; }
.header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.header h1 { font-size: 1.65rem; font-weight: 600; }
.header p { color: var(--muted); font-size: 0.875rem; margin-top: 6px; }
.btn { padding: 10px 18px; border-radius: var(--radius); font-weight: 700; cursor: pointer; border: none; font-size: 0.8rem; letter-spacing: .04em; }
.btn-ghost { background: var(--card); color: var(--text); border: 1px solid rgba(197,160,89,.25); }
.kpi-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 24px; }
.kpi-card { background: var(--card); border: 1px solid rgba(255,255,255,.06); border-radius: var(--radius); padding: 18px; }
.kpi-card label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.kpi-card strong { display: block; font-size: 1.6rem; margin-top: 8px; color: var(--gold-bright); }
.kpi-card span { font-size: 0.75rem; color: var(--muted); }
.panel { background: var(--card); border: 1px solid rgba(255,255,255,.06); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.panel h2 { font-size: 1rem; margin-bottom: 8px; font-family: var(--font-display); }
.panel-sub { color: var(--muted); font-size: 0.8rem; margin-bottom: 16px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.data-table th { text-align: left; color: var(--muted2); font-size: 0.7rem; text-transform: uppercase; letter-spacing: .08em; padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.06); }
.data-table td { padding: 12px; border-bottom: 1px solid rgba(255,255,255,.04); }
.data-table tr:hover td { background: rgba(255,255,255,.02); }
.badge { display: inline-block; font-size: 0.65rem; font-weight: 700; letter-spacing: .06em; padding: 3px 8px; border-radius: 4px; text-transform: uppercase; }
.badge-ok { background: rgba(67,160,71,.15); color: var(--success); }
.badge-warn { background: rgba(255,152,0,.15); color: var(--warn); }
.badge-muted { background: rgba(255,255,255,.06); color: var(--muted); }
.split { display: grid; grid-template-columns: 1fr 320px; gap: 20px; }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; } }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 0.72rem; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .06em; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; background: var(--card2); border: 1px solid rgba(255,255,255,.08);
  color: var(--text); padding: 10px 12px; border-radius: 6px; font-size: 0.875rem;
}
.preview-phone {
  background: #000; border-radius: 24px; padding: 12px; border: 2px solid rgba(197,160,89,.25);
  min-height: 420px;
}
.preview-phone .bar { height: 44px; background: linear-gradient(135deg, #9A7B3A, #E8C872); border-radius: 12px 12px 0 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; color: #1a1408; font-family: var(--font-display); }
.preview-phone .body { padding: 16px; }
.module-toggle { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.module-toggle img { width: 24px; height: 24px; margin-right: 10px; animation: gold-icon-glint 4.8s ease-in-out infinite; }
.module-toggle .left { display: flex; align-items: center; }
.toggle { width: 44px; height: 24px; border-radius: 99px; background: var(--success); position: relative; cursor: pointer; flex-shrink: 0; }
.toggle.off { background: var(--muted2); }
.toggle::after { content: ''; position: absolute; top: 3px; left: 22px; width: 18px; height: 18px; border-radius: 50%; background: #fff; }
.toggle.off::after { left: 3px; }
.task-card { background: var(--card2); border-left: 3px solid var(--gold); padding: 14px; border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: 10px; cursor: pointer; }
.task-card:hover { background: rgba(197,160,89,.06); }
.task-card strong { display: block; font-size: 0.88rem; }
.task-card small { color: var(--muted); font-size: 0.75rem; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--card2); padding: 6px 10px; border-radius: 99px; font-size: 0.8rem; margin: 4px 4px 0 0; }
.user-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }

/* Tenant branding — save feedback */
.branding-toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(12px);
  z-index: 9999; padding: 12px 20px; border-radius: 8px; font-size: 0.875rem; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
  box-shadow: 0 8px 32px rgba(0,0,0,.45); max-width: min(92vw, 420px); text-align: center;
}
.branding-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.branding-toast-ok { background: rgba(67,160,71,.95); color: #fff; border: 1px solid rgba(255,255,255,.15); }
.branding-toast-err { background: rgba(180,50,50,.95); color: #fff; border: 1px solid rgba(255,255,255,.15); }
#branding-status { font-weight: 600; min-height: 1.25rem; }
#branding-save-btn.is-saving { opacity: 0.75; cursor: wait; }
#branding-save-btn:disabled { opacity: 0.65; cursor: not-allowed; }
.branding-hint { display: block; margin-top: 6px; color: var(--warn, #fbbf24); font-size: 0.75rem; }
.branding-logo-progress { margin-top: 8px; height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.branding-logo-progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold, #C9A227), #E8C872); transition: width .15s ease; }
.preview-phone .preview-logo-wrap { text-align: center; padding: 12px 0 4px; }
.preview-phone .preview-logo-wrap img { max-height: 36px; max-width: 120px; object-fit: contain; }
