.debug-panel {
  display: none;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.debug-panel input {
  width: 120px;
  padding: 10px 12px;
  border: 1px solid rgba(232, 232, 232, 1);
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 14px;
}

.debug-panel .btn {
  padding: 10px 12px;
}

.debug-enabled .debug-panel {
  display: flex;
}
/* ============================================
   SIGNEO - Mobile Styles
   Styles spécifiques pour les écrans mobiles (<= 768px)
   ============================================ */

body {
  background: rgba(255, 255, 255, 1);
  overflow-x: hidden;
  width: 100%;
  --mobile-bottom-nav-height: calc(66px + env(safe-area-inset-bottom));
}

/* ============================================
   Mobile Header (Logo + Settings)
   ============================================ */
.mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  padding-top: max(12px, env(safe-area-inset-top));
  background: rgba(255, 255, 255, 1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(242, 242, 242, 1);
}

.mobile-header-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.mobile-logo-img {
  height: 28px;
  width: auto;
}

.mobile-header-settings {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: transparent;
  color: rgba(0, 0, 0, 0.5);
  text-decoration: none;
  transition: all var(--transition-base);
}

.mobile-header-settings.active {
  background: rgba(242, 242, 242, 1);
  color: rgba(0, 0, 0, 1);
}

.mobile-header-settings .material-symbols-rounded {
  font-size: 24px;
}

.layout-desktop {
  display: block;
  padding: 0;
  padding-top: calc(52px + env(safe-area-inset-top));
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.sidebar-desktop {
  display: none;
}

.main-desktop {
  display: block;
}

.main-shell {
  margin-top: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

/* ============================================
   Container & Layout
   ============================================ */
.container {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding: 20px;
  padding-bottom: calc(var(--mobile-bottom-nav-height) + 14px);
  overflow-x: hidden;
  box-sizing: border-box;
}

/* ============================================
   Header
   ============================================ */
header {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: flex-start;
  padding: var(--space-4);
  border-radius: var(--radius-xl);
  box-shadow: none;
  background: transparent;
  border: none;
  margin-bottom: var(--space-4);
}

header::before {
  display: none;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.header-logo {
  height: 36px;
  width: auto;
  display: block;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.header-subtitle {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: var(--space-1);
}

/* Navigation desktop cachée sur mobile */
.header-actions {
  display: none;
}

/* ============================================
   Cards & Containers
   ============================================ */
.form-container,
.history-container,
.settings-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.form-header {
  display: none;
}

/* Cacher les titres h2 sur mobile car le mobile-header affiche déjà le contexte */
.history-container h2,
.settings-container h2 {
  display: none;
}

.form-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.auto-save-status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--success-500);
  font-size: 0.8125rem;
  font-weight: 500;
  background: var(--success-50);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
}

.inline-status {
  min-height: 24px;
  margin: var(--space-3) 0 var(--space-4);
  color: var(--success-600);
  font-weight: 600;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* ============================================
   Accordion Sections
   ============================================ */
.accordion-section {
  overflow: hidden;
}

.section-header-accordion {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding-bottom: 32px;
  user-select: none;
  transition: all var(--transition-base);
}

.section-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-check-wrapper {
  display: none;
  align-items: center;
  gap: 8px;
}

.accordion-section.validated .section-check-wrapper {
  display: flex;
}

.check-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  animation: checkPop 0.3s ease;
}

@keyframes checkPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.check-separator {
  width: 2px;
  height: 16px;
  border-radius: 64px;
  background: rgba(232, 232, 232, 1);
}

.section-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.invoice-card .section-title {
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  font-family: var(--font-sans);
  color: rgba(0, 0, 0, 1);
}

.accordion-arrow {
  font-size: 24px;
  transform: rotate(-180deg);
  color: rgba(0, 0, 0, 1);
  transition: transform var(--transition-base);
}

.accordion-section.collapsed .accordion-arrow {
  transform: rotate(0deg);
  color: rgba(0, 0, 0, 0.5);
}

.accordion-content {
  max-height: 2000px;
  overflow: hidden;
  transition: max-height var(--transition-slow), opacity var(--transition-base);
  opacity: 1;
}

.accordion-section.collapsed .accordion-content {
  max-height: 0;
  opacity: 0;
}

.accordion-section.collapsed .section-header-accordion {
  margin-bottom: 0;
  padding-bottom: var(--space-2);
}

/* Section validated state */
.accordion-section.validated {
  border-color: var(--success-500);
}

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

.form-row + .form-row {
  margin-top: 32px;
}

/* ============================================
   Form Sections
   ============================================ */
.form-section {
  padding: 32px 0 32px 0;
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-light);
}

.form-section h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--primary-600);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
}

.form-section h3::before {
  content: "";
  width: 4px;
  height: 18px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
}

.form-section > h3 {
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-light);
}

/* ============================================
   Items Container
   ============================================ */
#itemsContainer {
  margin-bottom: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.item-row {
  transition: all var(--transition-base);
  position: relative;
}

.item-row + .item-row {
  margin-top: 32px;
}

.item-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.item-row .btn-remove {
  width: 100%;
  justify-content: center;
  margin-top: var(--space-2);
}

.total-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

#addItemBtn + .total-wrapper {
  border-top: 1px solid rgba(232, 232, 232, 1);
  padding-top: 20px;
  margin-top: 20px;
}

.total-label {
  font-weight: 400;
  font-size: 14px;
  font-family: var(--font-sans);
  padding-left: 16px;
  line-height: 1;
  color: rgba(0, 0, 0, 1);
}

.total-section {
  background: transparent;
  color: rgba(0, 0, 0, 1);
  border: 1px solid rgba(232, 232, 232, 1);
  padding: 32px 16px;
  border-radius: 24px;
  text-align: left;
  box-shadow: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.total-section strong {
  display: flex;
  align-items: center;
  width: 100%;
  font-size: 16px;
  gap: 2px;
  font-weight: 500;
  line-height: 1;
}

#totalGeneral {
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
}

/* ============================================
   Signature
   ============================================ */
.signature-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

#signatureCanvas {
  border: 2px dashed rgba(162, 162, 162, 1);
  border-radius: 24px;
  cursor: crosshair;
  background: rgba(251, 251, 251, 1);
  max-width: 100%;
  transition: all var(--transition-base);
}

/* ============================================
   Form Actions
   ============================================ */
.form-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border-light);
}

.form-actions .btn {
  width: 100%;
  justify-content: center;
  padding: var(--space-4) var(--space-5);
}

/* ============================================
   History
   ============================================ */
.history-container,
.settings-container {
  padding-top: 0;
}

/* ============================================
   Empty State (Mobile)
   ============================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  white-space: normal;
  flex-wrap: wrap;
  align-content: center;
}

.empty-state-icon {
  display: none;
}

.empty-state-content {
  display: flex;
  flex-direction: column;
  align-content: center;
  align-items: center;
  gap: var(--space-1);
  flex-wrap: wrap;
  white-space: normal;
}

.empty-state-content h3 {
  display: flex !important;
  align-items: center;
  gap: var(--space-2);
  white-space: normal;
}

.empty-state-content h3::before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  background: url("../svg/icon/document.svg") center/contain no-repeat;
  flex-shrink: 0;
}

.empty-state h3,
.empty-state p {
  white-space: normal;
  display: block;
  text-align: center;
}

/* ============================================
   Invoice Card Design with Folded Corner
   ============================================ */

/* Liste en colonne sur mobile */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* Invoice Card */
.history-item {
  background: #ffffff;
  padding: 0;
  border-radius: 24px;
  border: 1px solid #e8e8e8;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-base);
  box-shadow: none;
  position: relative;
  overflow: hidden;
}

.invoice-shell {
  padding: 16px;
  padding-bottom: 0 !important;
  background: transparent;
  position: relative;
}

.invoice-card {
  position: relative;
  padding: 16px;
  background: transparent;
  border-radius: 12px 12px 0px 0px;
  height: 150px;
  width: 80%;
  cursor: pointer;
  transition: all var(--transition-base);
}

.invoice-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid #e8e8e8;
  border-bottom: none;
  border-radius: inherit;
  pointer-events: none;
  transition: all var(--transition-base);
}

/* Invoice Header with folded corner effect */
.invoice-header {
  background: transparent;
  padding: 0;
  border: none;
  position: relative;
  min-height: auto;
  overflow: visible;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  color: rgba(0, 0, 0, 1);
}

.invoice-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.corner-sheet {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 48px;
  height: 48px;
  z-index: 100;
  transition: all var(--transition-base);
}

.corner-sheet .fold {
  transition: all var(--transition-base);
}

.invoice-title-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}

.invoice-meta-lines {
  user-select: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  margin-top: 8px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.invoice-meta-line-row {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  max-width: 100%;
}

.invoice-meta-line {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: #e8e8e8;
  opacity: 0.9;
  flex-shrink: 1;
  min-width: 0;
}

.invoice-meta-line.short {
  width: 40px;
}

.invoice-meta-line.long {
  width: 80px;
}

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

.invoice-more {
  user-select: none;
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 64px;
  background: #ffffff;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 1);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.invoice-more-icon {
  width: 24px;
  height: 24px;
  display: block;
}

.invoice-more:active {
  transform: scale(0.95);
}

.invoice-menu {
  user-select: none;
  display: none;
  position: absolute;
  top: calc(24px + 36px);
  right: 16px;
  min-width: 220px;
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 16px;
  padding: 8px;
  z-index: 120;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.invoice-shell.menu-open .invoice-menu {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.invoice-menu .menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 14px;
  color: rgba(0, 0, 0, 1);
  cursor: pointer;
  border-radius: 12px;
}

.invoice-menu .menu-item.danger {
  color: rgba(220, 38, 38, 1);
}

.invoice-menu .menu-item .material-symbols-rounded {
  font-size: 18px;
  color: rgba(0, 0, 0, 0.65);
}

.invoice-menu .menu-separator {
  height: 1px;
  background: #e8e8e8;
  margin: 6px 0;
}

.invoice-summary {
  background: #f4f4f4;
  padding: 18px 20px;
  display: flex;
  gap: 16px;
  border-top: 1px solid #e8e8e8;
  border-radius: 0 0 24px 24px;
  flex-direction: column;
  z-index: 1;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.summary-label {
  font-family: var(--font-sans);
  color: rgba(0, 0, 0, 0.5);
  font-weight: 400;
  font-size: 16px;
  line-height: 1;
}

.summary-value {
  color: rgba(0, 0, 0, 1);
  font-weight: 400;
  font-size: 16px;
  text-align: right;
  line-height: 1;
  font-family: var(--font-sans);
}

.summary-value.amount {
  font-size: 17px;
}

.invoice-number-label {
  font-size: 14px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.invoice-number {
  padding: 6px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  color: rgba(0, 0, 0, 1);
  word-break: break-all;
  line-height: 1;
}

.invoice-number-prefix {
  color: rgba(0, 0, 0, 0.5);
}

/* Invoice Body */
.invoice-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #ffffff;
}

.invoice-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.invoice-label {
  font-size: 14px;
  color: var(--text-tertiary);
  font-weight: 400;
}

.invoice-value {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
}

.invoice-value.amount {
  font-size: 20px;
  color: var(--text-primary);
  font-weight: 700;
}

.invoice-value.amount .currency {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-left: 4px;
}

/* Invoice Actions */
.invoice-actions {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--border-light);
  background: #f9fafb;
}

/* Override base btn-secondary styles for invoice actions */
.invoice-actions .btn {
  flex: 1;
  padding: 10px 16px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  gap: 6px !important;
}

.invoice-actions .btn-secondary {
  background: #ffffff !important;
  border: 1px solid var(--border-light) !important;
  color: var(--text-primary) !important;
}

.invoice-actions .btn-remove {
  flex: 0 0 auto;
  padding: 10px !important;
  border-radius: 10px !important;
  background: #1f2937 !important;
}

/* Download button in corner */
.invoice-download-btn {
  position: absolute;
  top: 8px;
  right: 56px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  z-index: 1;
}

.invoice-download-btn .material-symbols-rounded {
  font-size: 18px;
}

/* Hide old elements (for backwards compatibility) */
.history-info {
  display: none !important;
}

.history-actions {
  display: none !important;
}

/* ============================================
   Supplier Cards
   ============================================ */
.supplier-card {
  border-radius: 24px;
}

.supplier-card .invoice-summary {
  border-radius: 24px 24px 0 0;
  border-top: none;
}

.supplier-actions {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  background: #ffffff;
  border-top: 1px solid #e8e8e8;
  border-radius: 0 0 24px 24px;
}

.supplier-actions .btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  gap: 6px;
}

.supplier-actions .btn-primary {
  background: rgba(0, 0, 0, 1);
  box-shadow: none;
}

.supplier-actions .btn-primary:hover {
  background: rgba(0, 0, 0, 0.85);
  box-shadow: none;
  transform: none;
}

.supplier-actions .btn-secondary {
  flex: 0 0 auto;
  background: #ffffff;
  border: 1px solid #e8e8e8;
  color: rgba(0, 0, 0, 0.5);
  padding: 12px;
}

.supplier-actions .btn-secondary:hover {
  background: #f4f4f4;
  border-color: #e8e8e8;
  color: rgba(220, 38, 38, 1);
}

.supplier-actions .btn-secondary .material-symbols-rounded {
  font-size: 20px;
}

/* ============================================
   Modal
   ============================================ */
.modal.active {
  padding: var(--space-4);
}

.modal-content {
  padding: var(--space-5);
  margin: 0;
  border-radius: var(--radius-xl);
  max-height: 85vh;
}

.modal-content h2 {
  font-size: 1.125rem;
  margin-bottom: var(--space-5);
}

.close {
  right: var(--space-4);
  top: var(--space-4);
  width: 32px;
  height: 32px;
}

/* ============================================
   Logo Preview
   ============================================ */
.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.logo-container .btn {
  align-self: center;
}

.logo-preview {
  width: 100%;
  min-height: 100px;
  border: 2px dashed rgba(162, 162, 162, 1);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(251, 251, 251, 1);
  padding: var(--space-3);
  transition: all var(--transition-base);
}

.logo-preview:hover {
  border-color: rgba(0, 0, 0, 1);
}

.logo-preview img {
  max-width: 100%;
  max-height: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

/* ============================================
   Numeric Keypad (Hidden on Mobile)
   ============================================ */
.numeric-keypad {
  display: none !important;
}

/* ============================================
   Bottom Navigation (Mobile)
   ============================================ */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  background: rgba(255, 255, 255, 1);
  border-top: 1px solid rgba(242, 242, 242, 1);
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
  gap: 4px;
  z-index: 9999;
  justify-content: space-around;
}

.bottom-nav .nav-item {
  flex: 1;
  max-width: 120px;
  background: transparent;
  border: none;
  border-radius: 64px;
  padding: 6px 12px;
  color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  transition: all var(--transition-base);
  flex-direction: column;
  text-align: center;
  text-decoration: none;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.bottom-nav .nav-item:active {
  transform: scale(0.95);
}

.bottom-nav .nav-item.active {
  color: rgba(0, 0, 0, 1);
  background: rgba(242, 242, 242, 1);
}

/* Icônes et labels - état inactif */
.nav-icon {
  font-size: 24px;
  line-height: 1;
  color: rgba(0, 0, 0, 0.5);
  transition: all var(--transition-base);
}

.nav-icon-svg {
  width: 24px;
  height: 24px;
  display: block;
  color: rgba(0, 0, 0, 0.5);
  transition: all var(--transition-base);
}

/* Icônes et labels - état actif */
.bottom-nav .nav-item.active .nav-icon {
  color: rgba(0, 0, 0, 1);
}

.bottom-nav .nav-item.active .nav-icon-svg {
  color: rgba(0, 0, 0, 1);
}

.bottom-nav .nav-item.active .nav-label {
  color: rgba(0, 0, 0, 1);
}

.nav-icon-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.nav-label {
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1;
  font-weight: 500;
}

/* ============================================
   Mobile Header Actions (settings + user)
   ============================================ */
.mobile-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Mobile User Avatar Button */
.mobile-user-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.mobile-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* Mobile User Panel (slide-up sheet) */
.mobile-user-panel-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 1100;
  backdrop-filter: blur(2px);
}

.mobile-user-panel-backdrop.open {
  display: block;
  animation: backdropFadeIn 0.2s ease;
}

@keyframes backdropFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mobile-user-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--mobile-bottom-nav-height);
  z-index: 1200;
  background: var(--bg-secondary);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.mobile-user-panel.open {
  transform: translateY(0);
}

.mobile-user-panel-inner {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Drag handle */
.mobile-user-panel-inner::before {
  content: '';
  display: block;
  width: 36px;
  height: 4px;
  background: var(--border-medium);
  border-radius: 2px;
  margin: 0 auto 4px;
}

.mobile-user-panel-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.mobile-user-panel-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: white;
  font-weight: 700;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-user-panel-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.mobile-user-panel-role {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

/* ============================================
   Small Phones (< 375px)
   ============================================ */
@media (max-width: 375px) {
  .layout-desktop {
    padding-top: calc(48px + env(safe-area-inset-top));
  }

  .container {
    padding: 16px;
    padding-bottom: calc(var(--mobile-bottom-nav-height) + 14px);
  }

  .mobile-header {
    padding: 10px 16px;
  }

  .mobile-logo-img {
    height: 24px;
  }

  .form-section {
    padding: var(--space-3);
  }

  .btn {
    padding: var(--space-3) var(--space-4);
    font-size: 0.8125rem;
  }

  .nav-label {
    font-size: 11px;
  }
}
