/* ============================================
   DentoPlan — Professional Medical Design
   Colors: #1E40AF (primary), #3B82F6 (secondary), #EFF6FF (light)
   ============================================ */

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #F8FAFC;
  color: #1E293B;
  line-height: 1.6;
  min-height: 100vh;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
  background: white;
  border-bottom: 1px solid #E2E8F0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  height: 64px;
  gap: 2rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.125rem;
  color: #1E293B;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  flex: 1;
}

.nav-link {
  text-decoration: none;
  color: #64748B;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: all 0.15s;
}

.nav-link:hover {
  color: #1E40AF;
  background: #EFF6FF;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.nav-user-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1E293B;
}

.nav-logout {
  color: #94A3B8 !important;
  font-size: 0.8125rem !important;
}

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: #64748B;
  padding: 0.5rem;
}

/* ============================================
   Flash Messages
   ============================================ */
.flash {
  padding: 0.875rem 0;
  font-size: 0.875rem;
  font-weight: 500;
}

.flash .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flash-success {
  background: #F0FDF4;
  color: #166534;
  border-bottom: 1px solid #BBF7D0;
}

.flash-error {
  background: #FEF2F2;
  color: #991B1B;
  border-bottom: 1px solid #FECACA;
}

.flash-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
  padding: 0 0.25rem;
}

/* ============================================
   Page Content
   ============================================ */
.main-content {
  min-height: calc(100vh - 64px);
}

.page-content {
  padding: 2rem 1.5rem;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.2;
}

.page-subtitle {
  color: #64748B;
  font-size: 0.9375rem;
  margin-top: 0.25rem;
}

.page-header-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.4;
}

.btn-primary {
  background: #1E40AF;
  color: white;
  border-color: #1E40AF;
}

.btn-primary:hover {
  background: #1E3A8A;
  border-color: #1E3A8A;
}

.btn-outline {
  background: white;
  color: #374151;
  border-color: #D1D5DB;
}

.btn-outline:hover {
  background: #F9FAFB;
  border-color: #9CA3AF;
}

.btn-ghost {
  background: transparent;
  color: #64748B;
  border-color: transparent;
  padding: 0.5rem 0.75rem;
}

.btn-ghost:hover {
  background: #F1F5F9;
  color: #334155;
}

.btn-danger {
  color: #DC2626 !important;
}

.btn-danger:hover {
  background: #FEF2F2 !important;
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1rem;
  border-radius: 10px;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  border-radius: 6px;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ============================================
   Cards
   ============================================ */
.card {
  background: white;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #F1F5F9;
}

.card-header h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: #0F172A;
}

/* ============================================
   Stats Grid
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-blue {
  background: #EFF6FF;
  color: #1E40AF;
}

.stat-icon-green {
  background: #F0FDF4;
  color: #16A34A;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8125rem;
  color: #64748B;
  font-weight: 500;
}

/* ============================================
   Quick Actions
   ============================================ */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.action-card {
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #1E293B;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.15s;
}

.action-card:hover {
  border-color: #3B82F6;
  background: #EFF6FF;
}

/* ============================================
   Tables
   ============================================ */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

.table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748B;
  padding: 0.875rem 1.5rem;
  border-bottom: 1px solid #E2E8F0;
  white-space: nowrap;
}

.table td {
  padding: 1rem 1.5rem;
  font-size: 0.875rem;
  border-bottom: 1px solid #F1F5F9;
  color: #334155;
}

.table tbody tr:hover {
  background: #F8FAFC;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table-actions {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  justify-content: flex-end;
}

/* ============================================
   Badges
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 20px;
  white-space: nowrap;
}

.badge-draft {
  background: #F1F5F9;
  color: #475569;
}

.badge-sent {
  background: #EFF6FF;
  color: #1E40AF;
}

.badge-accepted {
  background: #F0FDF4;
  color: #16A34A;
}

.badge-visited {
  background: #FFF7ED;
  color: #C2410C;
}

.badge-question_asked {
  background: #F5F3FF;
  color: #6D28D9;
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.empty-state p {
  color: #64748B;
  font-size: 0.9375rem;
}

/* ============================================
   Forms
   ============================================ */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.375rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  background: white;
  color: #1E293B;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input::placeholder {
  color: #9CA3AF;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-row-4 {
  grid-template-columns: repeat(4, 1fr);
}

.input-euro {
  position: relative;
}

.input-euro input {
  padding-right: 2rem;
}

.input-suffix {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  font-size: 0.875rem;
  pointer-events: none;
}

.alert {
  padding: 0.875rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.alert-error {
  background: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

/* Search */
.search-form {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem 1.5rem;
}

.search-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrap svg {
  position: absolute;
  left: 0.75rem;
  pointer-events: none;
}

.search-input-wrap .search-input {
  padding-left: 2.5rem;
}

.search-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  background: white;
  color: #1E293B;
  font-family: inherit;
}

.search-input:focus {
  outline: none;
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ============================================
   Filter Bar
   ============================================ */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 20px;
  border: 1px solid #E2E8F0;
  background: white;
  color: #64748B;
  text-decoration: none;
  transition: all 0.15s;
}

.filter-chip:hover {
  border-color: #3B82F6;
  color: #1E40AF;
}

.filter-chip.active {
  background: #1E40AF;
  color: white;
  border-color: #1E40AF;
}

/* ============================================
   Modals
   ============================================ */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.5rem 0;
}

.modal-header h2 {
  font-size: 1.125rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #94A3B8;
  padding: 0.25rem;
  line-height: 1;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 0 1.5rem 1.5rem;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* ============================================
   Auth Pages
   ============================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #EFF6FF 0%, #F8FAFC 100%);
  padding: 2rem 1rem;
}

.auth-card {
  background: white;
  border-radius: 16px;
  border: 1px solid #E2E8F0;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header svg {
  margin-bottom: 0;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
}

.auth-logo-text {
  font-size: 1.375rem;
  font-weight: 700;
  color: #1E40AF;
  letter-spacing: -0.3px;
}

.auth-header h1 {
  font-size: 1.375rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 0.375rem;
}

.auth-header p {
  color: #64748B;
  font-size: 0.9375rem;
}

.auth-form {
  margin-bottom: 1.5rem;
}

.auth-form .btn {
  margin-top: 0.5rem;
}

.auth-footer {
  text-align: center;
  font-size: 0.875rem;
  color: #64748B;
}

.auth-footer a {
  color: #1E40AF;
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* ============================================
   Landing Page
   ============================================ */
.landing {
  background: white;
}

.landing-hero {
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 50%, #EFF6FF 100%);
  padding: 5rem 0 4rem;
}

.hero-content {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.hero-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.hero-logo-text {
  font-size: 2rem;
  font-weight: 800;
  color: #1E40AF;
  letter-spacing: -0.5px;
}

.hero-badge {
  display: inline-block;
  padding: 0.375rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1E40AF;
  background: white;
  border-radius: 20px;
  margin-bottom: 1.5rem;
  border: 1px solid #BFDBFE;
}

.hero-content h1 {
  font-size: 2.75rem;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: #475569;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.landing-features {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 3rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: all 0.2s;
}

.feature-card:hover {
  border-color: #3B82F6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.feature-icon {
  margin-bottom: 1.25rem;
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #0F172A;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.9375rem;
  color: #64748B;
  line-height: 1.6;
}

.landing-footer {
  padding: 2rem 0;
  text-align: center;
  color: #94A3B8;
  font-size: 0.875rem;
  border-top: 1px solid #E2E8F0;
}

/* ============================================
   Step Cards (Quote Creation)
   ============================================ */
.step-card {
  margin-bottom: 1.5rem;
  display: none;
}

.step-card.active {
  display: block;
}

.step-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  border-bottom: 1px solid #F1F5F9;
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1E40AF;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9375rem;
  flex-shrink: 0;
}

.step-header h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #0F172A;
}

.step-body {
  padding: 1.5rem;
}

.step-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #F1F5F9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.step-footer-actions {
  display: flex;
  gap: 0.75rem;
}

/* Autocomplete */
.autocomplete-wrap {
  position: relative;
}

.autocomplete-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  z-index: 50;
  display: none;
  max-height: 250px;
  overflow-y: auto;
}

.autocomplete-results.open {
  display: block;
}

.autocomplete-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-size: 0.875rem;
  border-bottom: 1px solid #F1F5F9;
  transition: background 0.1s;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover {
  background: #EFF6FF;
}

.autocomplete-item strong {
  color: #0F172A;
}

.autocomplete-item span {
  color: #64748B;
  margin-left: 0.5rem;
  font-size: 0.8125rem;
}

/* Selected patient */
.selected-patient-card {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.selected-patient-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.divider-text {
  text-align: center;
  color: #94A3B8;
  font-size: 0.8125rem;
  margin: 1.25rem 0;
  position: relative;
}

.divider-text::before,
.divider-text::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: #E2E8F0;
}

.divider-text::before { left: 0; }
.divider-text::after { right: 0; }

/* Procedures List */
.procedures-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.procedure-item {
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.15s;
}

.procedure-item.selected {
  border-color: #3B82F6;
  background: #FAFBFF;
}

.procedure-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  flex: 1;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #1E40AF;
  cursor: pointer;
  flex-shrink: 0;
}

.procedure-name {
  font-weight: 500;
  color: #1E293B;
  font-size: 0.9375rem;
}

.procedure-default-cost {
  font-weight: 600;
  color: #1E40AF;
  font-size: 0.875rem;
  white-space: nowrap;
}

.procedure-details {
  padding: 0 1rem 1rem;
  border-top: 1px solid #F1F5F9;
  padding-top: 1rem;
  background: #FAFBFF;
}

.procedure-details .form-group {
  margin-bottom: 0.75rem;
}

.procedure-details .form-group:last-child {
  margin-bottom: 0;
}

/* ============================================
   Devis Document (Preview / View)
   ============================================ */
.devis-document {
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 2.5rem;
  max-width: 800px;
  margin: 0 auto 2rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.devis-preview {
  max-width: 100%;
}

.devis-doc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #1E40AF;
}

.devis-cabinet h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: #1E40AF;
  margin-bottom: 0.25rem;
}

.devis-cabinet p {
  color: #64748B;
  font-size: 0.9375rem;
}

.devis-meta {
  text-align: right;
}

.devis-meta-item {
  margin-bottom: 0.375rem;
}

.devis-meta-label {
  font-size: 0.75rem;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
}

.devis-meta-value {
  font-weight: 600;
  color: #0F172A;
  font-size: 0.9375rem;
}

.devis-patient-info {
  margin-bottom: 2rem;
  padding: 1.25rem;
  background: #F8FAFC;
  border-radius: 8px;
}

.devis-patient-info h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748B;
  margin-bottom: 0.5rem;
}

.devis-patient-info p {
  font-size: 0.9375rem;
  color: #334155;
  line-height: 1.5;
}

.devis-table-wrap {
  margin-bottom: 2rem;
  overflow-x: auto;
}

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

.devis-table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: white;
  background: #1E40AF;
  padding: 0.75rem 1rem;
}

.devis-table th:first-child {
  border-radius: 6px 0 0 0;
}

.devis-table th:last-child {
  border-radius: 0 6px 0 0;
}

.devis-table td {
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  border-bottom: 1px solid #F1F5F9;
  color: #334155;
}

.devis-table tbody tr:last-child td {
  border-bottom: none;
}

.devis-table .text-right {
  text-align: right;
}

/* Totals */
.devis-totals {
  border-top: 2px solid #E2E8F0;
  padding-top: 1.25rem;
  margin-bottom: 1.5rem;
}

.devis-total-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.9375rem;
  color: #475569;
}

.devis-total-final {
  border-top: 2px solid #1E40AF;
  margin-top: 0.75rem;
  padding-top: 0.875rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: #0F172A;
}

.devis-footer-note {
  padding-top: 1.5rem;
  border-top: 1px solid #E2E8F0;
}

.devis-footer-note p {
  font-size: 0.8125rem;
  color: #94A3B8;
  line-height: 1.6;
}

/* ============================================
   Print Actions
   ============================================ */
.print-actions {
  text-align: center;
  margin-bottom: 2rem;
}

/* ============================================
   Utility Classes
   ============================================ */
.text-muted { color: #64748B; }
.text-sm { font-size: 0.8125rem; }
.text-green { color: #16A34A; }
.text-right { text-align: right; }

/* ============================================
   Send Result Banners
   ============================================ */
.send-result-banner {
  padding: 0.875rem 0;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  border-radius: 8px;
}

.send-result-banner .container {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.send-result-success {
  background: #F0FDF4;
  color: #166534;
  border: 1px solid #BBF7D0;
  padding: 0.875rem 1rem;
}

.send-result-warning {
  background: #FFFBEB;
  color: #92400E;
  border: 1px solid #FDE68A;
  padding: 0.875rem 1rem;
}

.send-result-error {
  background: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
  padding: 0.875rem 1rem;
}

/* Spinner animation */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin {
  animation: spin 1s linear infinite;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  .navbar, .flash, .page-header, .page-header-actions, .print-actions, .step-footer, .btn, .send-result-banner, .alert-warning {
    display: none !important;
  }
  body {
    background: white;
  }
  .main-content {
    min-height: auto;
  }
  .devis-document {
    border: none;
    box-shadow: none;
    padding: 0;
    max-width: 100%;
  }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .nav-links, .nav-user {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: white;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #E2E8F0;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }

  .nav-links.open, .nav-user.open {
    display: flex;
  }

  .nav-user.open {
    top: auto;
    border-top: 1px solid #E2E8F0;
    border-bottom: 1px solid #E2E8F0;
  }

  .nav-mobile-toggle {
    display: flex;
    margin-left: auto;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .page-header {
    flex-direction: column;
    gap: 1rem;
  }

  .page-header-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-row-4 {
    grid-template-columns: 1fr 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .devis-document {
    padding: 1.5rem;
  }

  .devis-doc-header {
    flex-direction: column;
    gap: 1rem;
  }

  .devis-meta {
    text-align: left;
  }

  .step-footer-actions {
    flex-direction: column;
  }

  .search-form {
    flex-direction: column;
  }

  .table th, .table td {
    padding: 0.75rem 1rem;
  }
}

@media (max-width: 480px) {
  .form-row-4 {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    justify-content: center;
  }

  .quick-actions {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-two-col {
    grid-template-columns: 1fr !important;
  }

  .conv-two-col {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .quick-actions {
    grid-template-columns: 1fr;
  }
}
