/* =========================
   GLOBAL THEME – GoGarageFlow
   SmartFlow Systems LTD (trading as GoGarageFlow)
   ========================= */

:root {
  --primary: #115e59;
  --primary-light: #0f766e;
  --primary-soft: #ccfbf1;
  --secondary: #14b8a6;
  --accent: #f97316;
  --danger: #b91c1c;
  --background: #f8fafc;
  --card: #ffffff;
  --border: #e2e8f0;
  --border-soft: #e5e7eb;
  --muted: #64748b;
  --muted-soft: #cbd5f5;
  --text: #0f172a;
  --text-soft: #1e293b;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 22px 45px rgba(15, 23, 42, 0.12);
}

/* RESET BASIC */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(circle at top, #e0f2fe 0, #f8fafc 40%, #f8fafc 100%);
  color: var(--text);
  min-height: 100vh;
}

/* LINKS */

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* LAYOUT SHELL – folosit în toate paginile interne (admin, mechanic, display etc.) */

.app-shell {
  max-width: 1320px;
  margin: 18px auto;
  padding: 0 16px 24px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* SIDEBAR */

.sidebar {
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: radial-gradient(circle at 25% 25%, #a7f3d0, #0f766e 55%, #022c22 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ecfeff;
  box-shadow: 0 0 0 2px var(--primary-soft);
}

.sidebar-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-title-main {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.sidebar-title-sub {
  font-size: 11px;
  color: var(--muted);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.sidebar-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin: 6px 6px 4px;
}

.sidebar-link {
  border-radius: 999px;
  padding: 7px 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s ease-out;
}

.sidebar-link i {
  width: 16px;
  text-align: center;
  color: var(--primary-light);
}

.sidebar-link span {
  flex: 1;
}

.sidebar-link small {
  font-size: 10px;
  color: #94a3b8;
}

.sidebar-link:hover {
  border-color: var(--primary-soft);
  background: #ecfeff;
  color: var(--primary-light);
}

.sidebar-link.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #ecfeff;
  border-color: transparent;
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.4);
}

.sidebar-link.active i {
  color: #a7f3d0;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  font-size: 11px;
  color: var(--muted);
}

/* TOP BAR */

.main-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.top-bar {
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #0f766e, #115e59);
  color: #ecfeff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-strong);
}

.top-bar-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.top-bar-title {
  font-size: 18px;
  font-weight: 700;
}

.top-bar-subtitle {
  font-size: 12px;
  opacity: 0.9;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  border: 1px solid rgba(248, 250, 252, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.16);
}

.pill i {
  font-size: 12px;
}

.pill-ghost {
  background: rgba(15, 23, 42, 0.08);
}

.pill-env-test {
  border-color: #f97316;
}

.pill-env-demo {
  border-color: #22c55e;
}

.pill-env-live {
  border-color: #38bdf8;
}

/* CONTENT LAYOUT */

.cards-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.4fr);
  gap: 12px;
}

@media (max-width: 1100px) {
  .cards-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.card-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-title-main {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-title-main i {
  color: var(--primary-light);
}

.card-title-sub {
  font-size: 11px;
  color: var(--muted);
}

.card-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* BUTTONS */

.btn {
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease-out;
  white-space: nowrap;
}

.btn i {
  font-size: 12px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.45);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 11px 26px rgba(15, 118, 110, 0.6);
}

.btn-soft {
  background: #f1f5f9;
  color: var(--muted);
  border: 1px solid var(--border-soft);
}

.btn-soft:hover {
  background: #e2e8f0;
  color: var(--text-soft);
}

.btn-ghost {
  background: transparent;
  color: #e2e8f0;
  border: 1px solid rgba(248, 250, 252, 0.45);
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 0.18);
}

.btn-danger {
  background: #fee2e2;
  color: var(--danger);
  border: 1px solid #fecaca;
}

.btn-danger:hover {
  background: #fecaca;
}

/* TABLES */

.table-wrap {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.table-scroll {
  max-height: 320px;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

thead {
  background: #e2f3f4;
}

th,
td {
  padding: 7px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

tbody tr:hover {
  background: #ecfeff;
}

/* STATUS CHIPS */

.chip {
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chip i {
  font-size: 9px;
}

.chip-waiting {
  background: #fef3c7;
  color: #92400e;
}

.chip-progress {
  background: #dcfce7;
  color: #166534;
}

.chip-hold {
  background: #ffedd5;
  color: #9a3412;
}

.chip-done {
  background: #e5e7eb;
  color: #374151;
}

.chip-urgent {
  background: #fee2e2;
  color: #b91c1c;
}

/* TAGS / BADGES */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.badge-green {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #166534;
}

.badge-orange {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

/* MISC */

.small-text {
  font-size: 11px;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.highlight-number {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-light);
}

.highlight-label {
  font-size: 11px;
  color: var(--muted);
}

/* SCROLLBAR */

.table-scroll::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.table-scroll::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: #e5e7eb;
  border-radius: 999px;
}

.table-scroll::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: #9ca3af;
  border-radius: 999px;
}

.table-scroll::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}

/* =========================
   START ADDITION — ALIAS for current GoGarageFlow2 markup
   (no HTML/JS refactor needed)
   ========================= */

/* Our current layout uses .app, .main, .topbar; your theme uses .app-shell, .main-area, .top-bar */
.app {
  max-width: 1320px;
  margin: 18px auto;
  padding: 0 16px 24px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
}

@media (max-width: 980px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Sidebar nav mapping: our buttons become your sidebar links */
.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.nav .section {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin: 6px 6px 4px;
}

.nav button.btn {
  border-radius: 999px;
  padding: 7px 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s ease-out;
  background: transparent;
}

.nav button.btn:hover {
  border-color: var(--primary-soft);
  background: #ecfeff;
  color: var(--primary-light);
}

.nav button.btn.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #ecfeff;
  border-color: transparent;
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.4);
}

.nav button.btn.locked {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

/* Top bar mapping */
.topbar {
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #0f766e, #115e59);
  color: #ecfeff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-strong);
}

.topbar .breadcrumbs {
  font-size: 12px;
  opacity: 0.9;
}

.topbar .pageTitle {
  font-size: 18px;
  font-weight: 700;
}

/* ✅ NEW: Topbar meta pills (Garage / Plan / User) */
.topbar .left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.topbar .topbarMeta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.topbar .topbarMeta .pill {
  background: rgba(15, 23, 42, 0.12);
  border-color: rgba(236, 254, 255, 0.35);
}

@media (max-width: 900px) {
  .topbar {
    align-items: flex-start;
  }
}

/* Main area mapping */
.main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

/* Grid helper stays compatible */
.grid {
  display: grid;
  gap: 12px;
}

@media (min-width: 1100px) {
  .grid.cols-2 {
    grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.4fr);
  }
}

@media (min-width: 980px) {
  .grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* =========================
   END ADDITION — ALIAS
   ========================= */

/* =========================
   START ADDITION — FULLSCREEN + FONT SCALE
   ========================= */

/* 1️⃣ Fullscreen layout (remove boxed look) */
.app {
  max-width: none; /* era 1320px */
  margin: 0; /* full width */
  padding: 12px 16px 16px;
  min-height: 100vh;
  align-items: stretch;
}

/* Sidebar full height */
.sidebar {
  border-radius: 0;
  height: calc(100vh - 24px);
}

/* Topbar edge-to-edge */
.topbar {
  border-radius: var(--radius-lg);
}

/* Main area stretches */
.main {
  min-height: calc(100vh - 24px);
}

/* 2️⃣ Font scale – exact “primul style”, dar cu tema ta */
html {
  font-size: 15.5px; /* default e 16, dar aici scalează tot elegant */
}

.h1 {
  font-size: 30px;
}
.h2 {
  font-size: 20px;
}

.p,
.badge,
.pill {
  font-size: 13.5px;
}

.btn {
  font-size: 13px;
  padding: 7px 14px;
}

.table th,
.table td {
  font-size: 13px;
  padding: 9px 10px;
}

/* Sidebar text mai mare */
.nav button.btn {
  font-size: 13.5px;
}

/* Topbar title mai mare */
.topbar .pageTitle {
  font-size: 21px;
}

/* =========================
   END ADDITION — FULLSCREEN + FONT SCALE
   ========================= */
