/* ========================================
   DENTAL LAB PORTAL — Styles
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700&family=Playfair+Display:wght@600;700&display=swap');

:root {
  --navy: #0f1d35;
  --navy-light: #1a2d4f;
  --blue: #2563eb;
  --blue-light: #3b82f6;
  --teal: #0d9488;
  --gold: #d4a853;
  --cream: #faf8f5;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --green: #059669;
  --red: #dc2626;
  --orange: #ea580c;

  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --radius: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-body);
  color: var(--gray-800);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

/* ========================================
   NAVIGATION
   ======================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(15, 29, 53, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: background 0.3s;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--white);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-logo span { color: var(--gold); }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--white); text-decoration: none; }

.nav-cta {
  background: var(--gold);
  color: var(--navy) !important;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(212,168,83,0.4);
}

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 50%, #1e3a5f 100%);
  position: relative;
  overflow: hidden;
  padding-top: 72px;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(212,168,83,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%; left: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(37,99,235,0.06) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(212,168,83,0.15);
  border: 1px solid rgba(212,168,83,0.3);
  border-radius: 40px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 24px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero h1 em {
  font-style: normal;
  color: var(--gold);
}

.hero p {
  color: rgba(255,255,255,0.7);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 480px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--blue);
  color: white;
}

.btn-primary:hover {
  background: var(--blue-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37,99,235,0.35);
  text-decoration: none;
  color: white;
}

.btn-outline {
  background: transparent;
  color: white;
  border: 1.5px solid rgba(255,255,255,0.25);
}

.btn-outline:hover {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.05);
  text-decoration: none;
  color: white;
}

.btn-gold {
  background: var(--gold);
  color: var(--navy);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212,168,83,0.4);
  text-decoration: none;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-danger { background: var(--red); color: white; }
.btn-success { background: var(--green); color: white; }

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
}

.hero-card .stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--gold);
}

.stat-label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  margin-top: 4px;
}

/* ========================================
   SECTIONS
   ======================================== */
.section {
  padding: 100px 24px;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--navy);
  margin-bottom: 12px;
}

.section-header p {
  color: var(--gray-500);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto;
}

.bg-white { background: var(--white); }

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: all 0.3s;
}

.service-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.service-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--navy);
}

.service-card p {
  color: var(--gray-500);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* How It Works */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 56px; height: 56px;
  background: var(--navy);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.step h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--navy);
}

.step p {
  color: var(--gray-500);
  font-size: 0.9rem;
}

/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-info h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--navy);
  margin-bottom: 20px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-item-icon {
  width: 44px; height: 44px;
  background: var(--blue);
  color: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-item strong {
  display: block;
  font-size: 0.85rem;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.contact-item span {
  font-size: 1rem;
  color: var(--navy);
}

/* Footer */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.5);
  padding: 32px 24px;
  text-align: center;
  font-size: 0.88rem;
}

/* ========================================
   FORMS
   ======================================== */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.form-input::placeholder {
  color: var(--gray-400);
}

textarea.form-input {
  min-height: 100px;
  resize: vertical;
}

select.form-input {
  cursor: pointer;
}

/* ========================================
   AUTH PAGES (Login / Register)
   ======================================== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  padding: 24px;
}

.auth-card {
  background: var(--white);
  border-radius: 16px;
  padding: 48px 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}

.auth-card h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--navy);
  text-align: center;
  margin-bottom: 8px;
}

.auth-card .subtitle {
  text-align: center;
  color: var(--gray-500);
  font-size: 0.92rem;
  margin-bottom: 32px;
}

.auth-card .btn {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--gray-500);
}

/* ========================================
   DASHBOARD
   ======================================== */
.dashboard {
  padding-top: 72px;
  min-height: 100vh;
}

.dash-layout {
  max-width: 1300px;
  margin: 0 auto;
  padding: 32px 24px;
}

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.dash-header h1 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--navy);
}

.dash-tabs {
  display: flex;
  gap: 4px;
  background: var(--gray-100);
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 28px;
}

.dash-tab {
  padding: 10px 20px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  transition: all 0.2s;
}

.dash-tab.active {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}

.dash-tab:hover:not(.active) {
  color: var(--gray-700);
}

/* Stats Cards */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
}

.stat-card .label {
  font-size: 0.82rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-card .value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  margin-top: 4px;
}

.stat-card .value.gold { color: var(--gold); }
.stat-card .value.blue { color: var(--blue); }
.stat-card .value.green { color: var(--green); }

/* Tables */
.table-wrap {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
}

.table-wrap th {
  padding: 14px 20px;
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

.table-wrap td {
  padding: 14px 20px;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--gray-100);
}

.table-wrap tr:last-child td { border-bottom: none; }
.table-wrap tr:hover { background: var(--gray-50); }

/* Status badges */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-new { background: #dbeafe; color: #1d4ed8; }
.badge-in_progress { background: #fef3c7; color: #b45309; }
.badge-ready { background: #d1fae5; color: #047857; }
.badge-sent { background: #e0e7ff; color: #4338ca; }
.badge-cancelled { background: #fee2e2; color: #b91c1c; }

/* ========================================
   MODAL
   ======================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 24px;
}

.modal {
  background: var(--white);
  border-radius: 16px;
  padding: 36px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--navy);
  margin-bottom: 24px;
}

.modal-close {
  float: right;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray-400);
}

/* File upload area */
.upload-area {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 16px;
}

.upload-area:hover, .upload-area.dragover {
  border-color: var(--blue);
  background: rgba(37,99,235,0.03);
}

.upload-area p {
  color: var(--gray-500);
  font-size: 0.92rem;
}

.upload-area .icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.file-list {
  list-style: none;
}

.file-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--gray-50);
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 0.88rem;
}

.file-list li .remove {
  background: none;
  border: none;
  color: var(--red);
  cursor: pointer;
  font-size: 1rem;
}

/* Toast notifications */
.toast {
  position: fixed;
  top: 88px;
  right: 24px;
  padding: 14px 24px;
  border-radius: var(--radius);
  color: white;
  font-weight: 500;
  font-size: 0.9rem;
  z-index: 3000;
  animation: slideIn 0.3s ease;
  box-shadow: var(--shadow-md);
}

.toast-success { background: var(--green); }
.toast-error { background: var(--red); }
.toast-info { background: var(--blue); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Cloud browser */
.cloud-browser {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  min-height: 500px;
}

.cloud-sidebar {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
}

.cloud-sidebar h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-400);
  margin-bottom: 16px;
}

.folder-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--gray-700);
  transition: all 0.15s;
}

.folder-item:hover, .folder-item.active {
  background: var(--blue);
  color: white;
}

.cloud-content {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
}

.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.file-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.file-card:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.file-card .file-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.file-card .file-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-700);
  word-break: break-all;
}

.file-card .file-size {
  font-size: 0.78rem;
  color: var(--gray-400);
  margin-top: 4px;
}

/* Hidden sections */
.hidden { display: none !important; }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero h1 { font-size: 2.2rem; }
  .hero p { margin: 0 auto 32px; }
  .hero-buttons { justify-content: center; }
  .hero-visual { display: none; }

  .contact-grid { grid-template-columns: 1fr; }
  .cloud-browser { grid-template-columns: 1fr; }

  .nav-links { display: none; }
  .nav-mobile-toggle { display: block; }

  .section { padding: 60px 16px; }
  .section-header h2 { font-size: 1.8rem; }

  .auth-card { padding: 32px 24px; }
  .modal { padding: 24px; }
}
