:root {
  --accent: #ff5e00;
  --accent-soft: rgba(255, 94, 0, 0.12);
  --accent-glow: rgba(255, 94, 0, 0.26);
  --grey-900: #0f0f10;
  --grey-800: #17171a;
  --grey-700: #1f1f24;
  --grey-600: #2a2a30;
  --grey-500: #3b3b42;
  --grey-400: #53535c;
  --grey-300: #72727c;
  --grey-200: #9b9ba6;
  --grey-100: #cfd0d6;
  --grey-050: #f1f2f5;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-elevated: 0 18px 45px rgba(0,0,0,0.35);
  --shadow-soft: 0 10px 20px rgba(0,0,0,0.22);
  --transition: 220ms cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: radial-gradient(900px 600px at 10% 10%, rgba(255, 94, 0, 0.15), transparent 60%),
              radial-gradient(700px 500px at 90% 20%, rgba(255, 94, 0, 0.08), transparent 60%),
              linear-gradient(135deg, #0b0b0d, #1a1a1f 45%, #141417 100%);
  color: var(--grey-050);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

/* .app-shell {
  width: min(1250px, 100%);
  min-height: 720px;
  background: rgba(15, 15, 16, 0.85);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-elevated);
  overflow: hidden;
  position: relative;
} */

.auth-view {
  display: grid;
  place-items: center;
  padding: 60px 30px;
}

.auth-card {
  width: min(480px, 100%);
  background: linear-gradient(180deg, rgba(31, 31, 36, 0.92), rgba(20, 20, 23, 0.88));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-soft);
  padding: 38px;
  display: grid;
  gap: 28px;
  position: relative;
  overflow: hidden;
}

.auth-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(430px 180px at -20% -20%, rgba(255, 94, 0, 0.28), transparent 65%);
  pointer-events: none;
}

.brand {
  display: flex;
  gap: 18px;
  align-items: center;
}

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--accent), #ff7f2e);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 20px;
  color: #0c0c0d;
  box-shadow: 0 15px 30px rgba(255, 94, 0, 0.3);
}

.brand-copy h1 {
  font-size: 24px;
  font-weight: 600;
}

.brand-copy p {
  color: var(--grey-200);
  margin-top: 6px;
}

.auth-form {
  display: grid;
  gap: 20px;
}

.form-field {
  display: grid;
  gap: 10px;
}

.form-field label {
  color: var(--grey-100);
  font-weight: 500;
}

.form-field input,
.form-field textarea,
.form-field select {
  background: rgba(28, 28, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--grey-050);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 94, 0, 0.15);
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent), #ff7628);
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  color: #0c0c0d;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  /* box-shadow: 0 15px 30px rgba(255, 94, 0, 0.24); */
}

.primary-btn:hover {
  transform: translateY(-1px);
  /* box-shadow: 0 18px 40px rgba(255, 94, 0, 0.34); */
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  color: var(--grey-050);
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.ghost-btn:hover {
  border-color: var(--accent);
  background: rgba(255, 94, 0, 0.12);
}

.form-status {
  min-height: 18px;
  font-size: 14px;
}

.form-status.error {
  color: #ff8b6b;
}

.form-status.success {
  color: #4ecdc4;
}

.dashboard {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 720px;
}

.hidden {
  display: none !important;
}

.sidebar {
  background: rgba(20, 20, 23, 0.95);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 30px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.sidebar-brand .logo {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(138deg, rgba(255, 94, 0, 0.4), transparent);
  border: 1px solid rgba(255, 94, 0, 0.45);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--accent);
}

.sidebar-copy .title {
  font-size: 18px;
  font-weight: 600;
}

.sidebar-copy .subtitle {
  color: var(--grey-200);
  font-size: 13px;
}

.sidebar-nav {
  display: grid;
  gap: 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  color: var(--grey-100);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.nav-item .icon {
  font-size: 18px;
}

.nav-item:hover,
.nav-item.active {
  border-color: rgba(255, 94, 0, 0.8);
  background: rgba(255, 94, 0, 0.14);
  color: var(--grey-050);
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
}

.workspace {
  background: rgba(18, 18, 21, 0.82);
  padding: 34px;
  display: grid;
  gap: 24px;
  position: relative;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-info h2 {
  font-size: 24px;
  font-weight: 600;
}

.topbar-info p {
  color: var(--grey-200);
  margin-top: 4px;
}

.user-badge {
  background: rgba(255, 94, 0, 0.16);
  color: var(--accent);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 600;
  border: 1px solid rgba(255, 94, 0, 0.3);
}

.toast {
  position: absolute;
  top: 90px;
  right: 34px;
  min-width: 240px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: rgba(36, 36, 42, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity var(--transition), transform var(--transition);
}

.toast.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.panel {
  background: rgba(23, 23, 28, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: none;
  width: 1000px;
}

.panel.active {
  display: block;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.panel-header h3 {
  font-size: 20px;
  font-weight: 600;
}

.panel-header p {
  color: var(--grey-200);
  margin-top: 4px;
}

.panel-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.panel-tools input[type="search"] {
  min-width: 220px;
}

.table-wrap {
  overflow: auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead {
  background: rgba(255, 255, 255, 0.04);
}

thead th {
  text-align: left;
  padding: 14px 16px;
  color: var(--grey-100);
  font-weight: 500;
}

tbody td {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--grey-100);
  width: 20px;
}

tbody tr:hover {
  background: rgba(255, 94, 0, 0.08);
}

tbody .empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--grey-200);
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--grey-100);
}

.badge.brand-METZELER { color: #8ae2a2; background: rgba(138, 226, 162, 0.12); }
.badge.brand-MICHELIN  { color: #7ab5ff; background: rgba(122, 181, 255, 0.12); }
.badge.brand-PIRELLI   { color: #ff9f84; background: rgba(255, 159, 132, 0.12); }

.grid-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 18px;
}

.grid-form .span-2 {
  grid-column: span 2;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.contact-message {
  max-width: 260px;
  word-break: break-word;
  color: var(--grey-100);
}

@media (max-width: 1100px) {
  .dashboard {
    grid-template-columns: 220px 1fr;
  }

  .workspace {
    padding: 24px;
  }
}

@media (max-width: 900px) {
  body {
    padding: 20px;
  }

  .dashboard {
    grid-template-columns: 1fr;
  }

  .sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
  }

  .sidebar-nav {
    flex: 1 1 100%;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .workspace {
    padding: 20px;
  }

  .panel-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .grid-form {
    grid-template-columns: 1fr;
  }

  .grid-form .span-2 {
    grid-column: span 1;
  }
}

@media (max-width: 600px) {
  .app-shell {
    min-height: auto;
  }

  .auth-card {
    padding: 28px;
  }

  .sidebar {
    padding: 20px 16px;
  }
}