/* =========================================================
   TailorEase - Master Stylesheet
   Luxury-modern: Navy + Warm Gold + Cream
   ========================================================= */
:root {
  --primary: #0A1628;
  --primary-light: #12213A;
  --accent: #C9963B;
  --accent-light: #F0C87A;
  --accent-dark: #A47A28;
  --surface: #F7F4EE;
  --surface-card: #FFFFFF;
  --surface-dark: #12213A;
  --text: #1A1A2E;
  --text-muted: #6B7280;
  --border: rgba(201,150,59,0.15);
  --success: #2ECC71;
  --danger: #E74C3C;
  --warning: #F39C12;
  --info: #3498DB;
  --shadow-card: 0 4px 24px rgba(10,22,40,0.08);
  --shadow-lg: 0 12px 40px rgba(10,22,40,0.12);
  --radius-card: 16px;
  --radius-btn: 50px;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--surface);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4,h5 { font-family: var(--font-display); font-weight: 700; color: var(--primary); letter-spacing: -0.01em; }
h1 { font-size: 2.5rem; line-height: 1.15; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }
.lead { font-size: 1.125rem; color: var(--text-muted); }

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }

/* =========================================================
   Page fade-in
   ========================================================= */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
main, .te-page { animation: fadeIn .35s ease both; }

/* =========================================================
   Top Navigation (Public)
   ========================================================= */
.te-navbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.te-navbar .container {
  display: flex; align-items: center; justify-content: space-between;
}
.te-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--primary);
  display: flex; align-items: center; gap: 10px;
}
.te-brand .brand-mark {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--surface-dark) 100%);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  font-weight: 700;
}
.te-nav-links { display: flex; gap: 28px; align-items: center; }
.te-nav-links a { color: var(--primary); font-weight: 500; }

/* =========================================================
   Buttons
   ========================================================= */
.btn { font-family: var(--font-body); font-weight: 500; transition: all .2s ease; }
.btn-primary, .te-btn {
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
  border-radius: var(--radius-btn);
  padding: 10px 28px;
  font-weight: 500;
}
.btn-primary:hover, .te-btn:hover {
  background: var(--surface-dark); border-color: var(--surface-dark); color: #fff;
  transform: translateY(-1px); box-shadow: var(--shadow-card);
}
.te-btn-gold {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  color: #1a1300;
  border: none;
  border-radius: var(--radius-btn);
  padding: 11px 30px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.te-btn-gold:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(201,150,59,0.35); color: #1a1300; }
.te-btn-outline {
  background: transparent; color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: 8px; padding: 9px 24px; font-weight: 500;
}
.te-btn-outline:hover { background: var(--primary); color: #fff; }
.te-btn-ghost { background: transparent; color: var(--primary); border: none; padding: 8px 14px; }
.te-btn-ghost:hover { color: var(--accent); }
.te-btn-sm { padding: 6px 14px; font-size: 0.875rem; }
.te-btn-danger { background: var(--danger); color: #fff; border: none; border-radius: 8px; padding: 8px 18px; }
.te-btn-success { background: var(--success); color: #fff; border: none; border-radius: 8px; padding: 8px 18px; }

/* =========================================================
   Cards
   ========================================================= */
.te-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
  transition: box-shadow .2s, transform .2s;
}
.te-card:hover { box-shadow: var(--shadow-lg); }
.te-card-flat { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 24px; }
.te-card h3, .te-card h4 { margin-top: 0; }

.te-stat-card {
  background: linear-gradient(135deg, #fff 0%, #fdfbf7 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 22px;
  display: flex; flex-direction: column; gap: 6px;
  position: relative;
  overflow: hidden;
}
.te-stat-card::after {
  content: ''; position: absolute; top: -20px; right: -20px;
  width: 80px; height: 80px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,150,59,0.18), transparent 70%);
}
.te-stat-card .stat-label { color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
.te-stat-card .stat-value { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--primary); }
.te-stat-card .stat-icon { position: absolute; top: 18px; right: 18px; color: var(--accent); }

/* =========================================================
   Forms
   ========================================================= */
.te-form-group { margin-bottom: 18px; position: relative; }
.te-form-group label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 6px; font-weight: 500; }
.te-form-group input,
.te-form-group select,
.te-form-group textarea {
  width: 100%;
  background: #fff;
  border: 1.5px solid #e8e3d8;
  border-radius: 10px;
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.te-form-group input:focus,
.te-form-group select:focus,
.te-form-group textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,150,59,0.18);
}
.te-form-group .error-text { color: var(--danger); font-size: 0.8rem; margin-top: 4px; }
.te-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .te-form-row { grid-template-columns: 1fr; } }

/* =========================================================
   Tables
   ========================================================= */
.te-table-wrap { overflow-x: auto; border-radius: var(--radius-card); border: 1px solid var(--border); background: #fff; }
.te-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.te-table th {
  background: var(--primary);
  color: #fff;
  font-weight: 500;
  text-align: left;
  padding: 13px 16px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: sticky; top: 0; z-index: 2;
}
.te-table td { padding: 13px 16px; border-bottom: 1px solid #f0ebe1; color: var(--text); }
.te-table tbody tr:nth-child(even) { background: #fafaf7; }
.te-table tbody tr:hover { background: rgba(201,150,59,0.06); }
.te-table tbody tr:last-child td { border-bottom: none; }

/* =========================================================
   Badges
   ========================================================= */
.te-badge {
  display: inline-block; font-size: 0.75rem; font-weight: 500;
  padding: 4px 10px; border-radius: 12px; letter-spacing: 0.02em;
}
.bg-success-soft { background: rgba(46,204,113,0.15); color: #1e7e3c; }
.bg-warning-soft { background: rgba(243,156,18,0.18); color: #a06200; }
.bg-info-soft    { background: rgba(52,152,219,0.15); color: #1a6494; }
.bg-primary-soft { background: rgba(10,22,40,0.10);   color: var(--primary); }
.bg-danger-soft  { background: rgba(231,76,60,0.15);  color: #a93225; }
.bg-muted-soft   { background: rgba(107,114,128,0.15); color: #4a5160; }
.bg-gold-soft    { background: rgba(201,150,59,0.18);  color: var(--accent-dark); }

/* =========================================================
   Dashboard Layout
   ========================================================= */
.te-app { display: flex; min-height: 100vh; background: var(--surface); }
.te-sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--primary);
  color: #fff;
  padding: 22px 0;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  transition: transform .25s ease;
}
.te-sidebar .brand {
  padding: 0 22px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; gap: 10px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 700;
}
.te-sidebar .brand .brand-mark {
  width: 32px; height: 32px;
  background: var(--accent);
  color: var(--primary);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.te-sidebar nav { padding: 14px 12px; flex: 1; }
.te-sidebar nav .nav-section { color: rgba(255,255,255,0.4); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 14px 10px 6px; }
.te-sidebar nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 10px;
  color: rgba(255,255,255,0.78);
  font-size: 0.92rem;
  margin-bottom: 2px;
  transition: all .15s;
}
.te-sidebar nav a:hover { background: rgba(201,150,59,0.12); color: var(--accent-light); }
.te-sidebar nav a.active { background: var(--accent); color: var(--primary); font-weight: 600; }
.te-sidebar nav a.active i { color: var(--primary); }
.te-sidebar nav a i { width: 18px; height: 18px; }

.te-sidebar-footer { padding: 14px 22px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 0.8rem; color: rgba(255,255,255,0.5); }

.te-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.te-topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 30;
}
.te-topbar .page-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--primary); margin: 0; }
.te-user-chip { display: flex; align-items: center; gap: 10px; color: var(--text); }
.te-user-chip img, .te-user-chip .avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}

.te-content { padding: 28px; flex: 1; }

.te-mobile-toggle { display: none; background: transparent; border: none; color: var(--primary); cursor: pointer; }

@media (max-width: 900px) {
  .te-sidebar { position: fixed; transform: translateX(-100%); z-index: 100; }
  .te-sidebar.open { transform: translateX(0); }
  .te-mobile-toggle { display: inline-flex; }
}

/* =========================================================
   Hero Section
   ========================================================= */
.te-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--surface-dark) 100%);
  color: #fff;
  padding: 80px 0 70px;
  position: relative;
  overflow: hidden;
}
.te-hero::before {
  content: ''; position: absolute; top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(201,150,59,0.18), transparent 70%);
  border-radius: 50%;
}
.te-hero .container { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.te-hero h1 { color: #fff; font-size: 3.4rem; line-height: 1.05; }
.te-hero h1 .accent { color: var(--accent-light); font-style: italic; }
.te-hero p { font-size: 1.15rem; color: rgba(255,255,255,0.78); max-width: 540px; }
.te-hero-ctas { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.te-hero-illu { display: flex; justify-content: center; }
.te-hero-illu svg { max-width: 100%; height: auto; }
@media (max-width: 880px) {
  .te-hero { padding: 56px 0 48px; }
  .te-hero .container { grid-template-columns: 1fr; }
  .te-hero h1 { font-size: 2.4rem; }
}

/* =========================================================
   Section helper
   ========================================================= */
.te-section { padding: 70px 0; }
.te-section h2 { text-align: center; margin-bottom: 8px; }
.te-section .section-sub { text-align: center; color: var(--text-muted); margin-bottom: 44px; max-width: 600px; margin-left: auto; margin-right: auto; }

/* =========================================================
   Plans
   ========================================================= */
.te-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 880px) { .te-plans { grid-template-columns: 1fr; } }
.te-plan-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-card); padding: 32px 28px; box-shadow: var(--shadow-card); position: relative; transition: all .2s; }
.te-plan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.te-plan-card.featured { border: 2px solid var(--accent); }
.te-plan-card.featured::before {
  content: 'Most Popular'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: var(--primary);
  padding: 4px 16px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em;
}
.te-plan-card .plan-name { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--primary); margin: 0 0 6px; }
.te-plan-card .plan-price { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; color: var(--primary); margin: 12px 0; }
.te-plan-card .plan-price span { font-size: 1rem; color: var(--text-muted); font-weight: 400; }
.te-plan-card ul { list-style: none; padding: 0; margin: 18px 0 22px; }
.te-plan-card ul li { padding: 6px 0; border-bottom: 1px solid #f3eedf; display: flex; align-items: center; gap: 8px; }
.te-plan-card ul li::before { content: '✓'; color: var(--accent); font-weight: 700; }

/* =========================================================
   Steps / How it works
   ========================================================= */
.te-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 880px) { .te-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .te-steps { grid-template-columns: 1fr; } }
.te-step { background: #fff; border-radius: var(--radius-card); padding: 28px 22px; text-align: center; border: 1px solid var(--border); }
.te-step .step-icon { width: 56px; height: 56px; border-radius: 16px; background: linear-gradient(135deg, var(--accent), var(--accent-light)); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.te-step h4 { margin: 8px 0 6px; }

/* =========================================================
   Auth pages
   ========================================================= */
.te-auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 30px; background: var(--surface); }
.te-auth-card { width: 100%; max-width: 460px; background: #fff; border-radius: var(--radius-card); padding: 40px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.te-auth-card h1 { font-size: 1.9rem; text-align: center; margin: 0 0 6px; }
.te-auth-card .tagline { text-align: center; color: var(--text-muted); margin-bottom: 28px; font-size: 0.92rem; }

/* =========================================================
   Kanban
   ========================================================= */
.te-kanban { display: grid; grid-template-columns: repeat(8, minmax(220px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.te-kanban-col { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px; min-height: 220px; }
.te-kanban-col h5 { font-family: var(--font-body); font-size: 0.82rem; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.05em; margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.te-kanban-card { background: var(--surface); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; border-left: 3px solid var(--accent); font-size: 0.88rem; }
.te-kanban-card strong { display: block; font-weight: 600; color: var(--primary); margin-bottom: 4px; }

/* =========================================================
   Stepper (order tracker)
   ========================================================= */
.te-stepper { display: flex; gap: 0; align-items: center; justify-content: space-between; padding: 14px 0; flex-wrap: wrap; }
.te-stepper .step { flex: 1; text-align: center; position: relative; min-width: 90px; }
.te-stepper .step .dot { width: 32px; height: 32px; border-radius: 50%; background: #eee5cf; color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
.te-stepper .step.done .dot, .te-stepper .step.current .dot { background: var(--accent); color: var(--primary); }
.te-stepper .step .label { font-size: 0.78rem; color: var(--text-muted); margin-top: 6px; }
.te-stepper .step.current .label { color: var(--primary); font-weight: 600; }

/* =========================================================
   Footer
   ========================================================= */
.te-footer { background: var(--primary); color: rgba(255,255,255,0.7); padding: 50px 0 30px; margin-top: 60px; }
.te-footer .container { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 30px; }
@media (max-width: 800px) { .te-footer .container { grid-template-columns: 1fr 1fr; } }
.te-footer h5 { color: #fff; font-family: var(--font-body); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 14px; }
.te-footer a { color: rgba(255,255,255,0.7); display: block; padding: 4px 0; font-size: 0.92rem; }
.te-footer a:hover { color: var(--accent-light); }
.te-footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); margin-top: 36px; padding-top: 18px; text-align: center; font-size: 0.85rem; }

/* =========================================================
   Utilities
   ========================================================= */
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.te-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.te-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.te-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 980px) { .te-grid-3, .te-grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .te-grid-2, .te-grid-3, .te-grid-4 { grid-template-columns: 1fr; } }
.mt-1{margin-top:.5rem}.mt-2{margin-top:1rem}.mt-3{margin-top:1.5rem}.mt-4{margin-top:2rem}
.mb-1{margin-bottom:.5rem}.mb-2{margin-bottom:1rem}.mb-3{margin-bottom:1.5rem}.mb-4{margin-bottom:2rem}
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.gap-2 { gap: 12px; }
.flex-1 { flex: 1; }

/* Flash */
.te-flash { padding: 12px 18px; border-radius: 10px; margin-bottom: 18px; border: 1px solid; font-size: 0.92rem; }
.te-flash.success { background: rgba(46,204,113,0.08); color: #1e7e3c; border-color: rgba(46,204,113,0.4); }
.te-flash.danger  { background: rgba(231,76,60,0.08); color: #a93225; border-color: rgba(231,76,60,0.4); }
.te-flash.warning { background: rgba(243,156,18,0.08); color: #a06200; border-color: rgba(243,156,18,0.4); }
.te-flash.info    { background: rgba(52,152,219,0.08); color: #1a6494; border-color: rgba(52,152,219,0.4); }

/* Print */
@media print {
  .te-sidebar, .te-topbar, .te-mobile-toggle, .no-print { display: none !important; }
  .te-content { padding: 0; }
  body, .te-app, .te-main { background: #fff; }
}
