/* ==========================================================================
   CASTORINNI OS — ADMIN SUITE DESIGN SYSTEM
   Apple / iOS-Inspired Luxury E-Commerce Administrative Dashboard
   ========================================================================== */

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

:root {
  /* Paleta Dark Luxury & Identidade Castorinni */
  --bg-app: #08090d;
  --bg-sidebar: #06070a;
  --bg-header: rgba(13, 23, 15, 0.88);
  --bg-surface: #101218;
  --bg-surface-elevated: #161922;
  --bg-surface-card: #13151e;
  --bg-surface-hover: #1c202c;
  --bg-glass: rgba(18, 20, 28, 0.75);

  /* Verde Garrafa Nobre da Marca */
  --green-castorinni: #0d170f;
  --green-castorinni-light: #162a1b;
  --green-accent: #10b981;

  /* Dourado Metálico de Acento */
  --gold-primary: #d4af37;
  --gold-light: #f5de8c;
  --gold-dark: #967624;
  --gold-gradient: linear-gradient(135deg, #fced9e 0%, #d4af37 50%, #967624 100%);
  --gold-border: rgba(212, 175, 55, 0.22);
  --gold-glow: 0 0 20px rgba(212, 175, 55, 0.2);

  /* Status Colors */
  --color-success: #34c759;
  --color-warning: #ff9f0a;
  --color-danger: #ff453a;
  --color-info: #0a84ff;
  --color-purple: #bf5af2;

  /* Textos & Tons Neutros */
  --text-pure: #ffffff;
  --text-main: #f0f2f5;
  --text-muted: #8e95a5;
  --text-dim: #5c6272;

  /* Bordas & Raios iOS */
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-card: rgba(212, 175, 55, 0.18);
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  /* Sombras iOS */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-floating: 0 20px 50px rgba(0, 0, 0, 0.65);

  /* Tipografia */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-cinzel: 'Cinzel', serif;

  /* Layout */
  --sidebar-width: 260px;
  --header-height: 68px;
  --transition-smooth: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Mode Overrides */
[data-theme="light"] {
  --bg-app: #f2f3f7;
  --bg-sidebar: #ffffff;
  --bg-header: rgba(255, 255, 255, 0.92);
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f8f9fc;
  --bg-surface-card: #ffffff;
  --bg-surface-hover: #edf0f7;
  --bg-glass: rgba(255, 255, 255, 0.85);

  --text-pure: #11141a;
  --text-main: #1e222d;
  --text-muted: #647087;
  --text-dim: #94a0b8;

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-card: rgba(212, 175, 55, 0.35);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-floating: 0 12px 35px rgba(0, 0, 0, 0.12);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

/* ==========================================================================
   LAYOUT PRINCIPAL
   ========================================================================== */
.admin-layout {
  display: flex;
  width: 100vw;
  min-height: 100vh;
}

/* --- SIDEBAR FIXA (DESKTOP) --- */
.admin-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  overflow-y: auto;
  scrollbar-width: none;
  transition: var(--transition-smooth);
}

.admin-sidebar::-webkit-scrollbar {
  display: none;
}

.sidebar-brand {
  padding: 1.25rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, rgba(13, 23, 15, 0.5) 0%, transparent 100%);
}

.sidebar-logo-img {
  height: 38px;
  object-fit: contain;
}

.sidebar-brand-text h1 {
  font-family: var(--font-cinzel);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-pure);
  line-height: 1.1;
}

.sidebar-brand-text span {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.sidebar-nav-group {
  padding: 1.25rem 0.85rem;
  flex: 1;
}

.nav-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0.4rem 0.75rem;
  margin-top: 0.85rem;
  margin-bottom: 0.25rem;
}

.nav-section-title:first-child {
  margin-top: 0;
}

.sidebar-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  user-select: none;
}

.nav-item-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-item-icon {
  font-size: 1.1rem;
  color: var(--text-dim);
  transition: var(--transition-smooth);
  width: 20px;
  text-align: center;
}

.sidebar-nav-item:hover {
  background: var(--bg-surface-hover);
  color: var(--text-pure);
}

.sidebar-nav-item:hover .nav-item-icon {
  color: var(--gold-light);
}

.sidebar-nav-item.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.14) 0%, rgba(13, 23, 15, 0.4) 100%);
  color: var(--gold-light);
  font-weight: 600;
  border: 1px solid var(--gold-border);
}

.sidebar-nav-item.active .nav-item-icon {
  color: var(--gold-primary);
}

.nav-badge-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.nav-badge-pill.danger {
  background: var(--color-danger);
  color: #fff;
}

.nav-badge-pill.gold {
  background: var(--gold-gradient);
  color: #000;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-user-mini {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: #000;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-details h5 {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-pure);
}

.user-details span {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: capitalize;
}

/* ==========================================================================
   CONTEÚDO PRINCIPAL
   ========================================================================== */
.admin-main-wrap {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: calc(100vw - var(--sidebar-width));
}

/* --- TOPBAR / HEADER NATIVO --- */
.admin-topbar {
  height: var(--header-height);
  background: var(--bg-header);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1;
  max-width: 480px;
}

/* Busca Global iOS Style */
.global-search-box {
  position: relative;
  width: 100%;
}

.search-icon-fixed {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 0.95rem;
  pointer-events: none;
}

.global-search-input {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0.55rem 1rem 0.55rem 2.6rem;
  font-size: 0.85rem;
  color: var(--text-pure);
  transition: var(--transition-smooth);
}

.global-search-input:focus {
  outline: none;
  border-color: var(--gold-primary);
  background: var(--bg-surface);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.search-shortcut-tag {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Kitchen Status Pill */
.store-status-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: var(--transition-smooth);
}

.store-status-toggle.open {
  background: rgba(52, 199, 89, 0.12);
  color: #34c759;
  border: 1px solid rgba(52, 199, 89, 0.3);
}

.store-status-toggle.closed {
  background: rgba(255, 69, 58, 0.12);
  color: #ff453a;
  border: 1px solid rgba(255, 69, 58, 0.3);
}

.status-dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

/* Topbar Icon Buttons */
.topbar-action-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.topbar-action-btn:hover {
  color: var(--text-pure);
  border-color: var(--gold-border);
  background: var(--bg-surface-hover);
}

.btn-badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--color-danger);
  border-radius: 50%;
  border: 2px solid var(--bg-surface);
}

/* --- ÁREA DE CONTEÚDO PRINCIPAL (VIEWS) --- */
.admin-content-viewport {
  padding: 2rem;
  flex: 1;
}

.view-section {
  display: none;
  animation: viewFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.view-section.active {
  display: block;
}

@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* View Header */
.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.view-title-group h2 {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-pure);
  letter-spacing: 0.02em;
  margin-bottom: 0.25rem;
}

.view-title-group p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.view-actions-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   COMPONENTES NATIVOS ESTILO iOS
   ========================================================================== */

/* --- iOS SEGMENTED CONTROL & FILTER TABS --- */
.ios-segmented-control,
.ios-segment-control,
.filter-tabs {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px;
  gap: 4px;
  user-select: none;
  flex-wrap: wrap;
}

.ios-segment-btn,
.filter-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.48rem 1rem;
  border-radius: calc(var(--radius-sm) - 3px);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  outline: none;
}

.ios-segment-btn:hover,
.filter-tab-btn:hover {
  color: var(--text-pure);
  background: rgba(255, 255, 255, 0.05);
}

.ios-segment-btn.active,
.filter-tab-btn.active {
  background: var(--bg-surface);
  color: var(--gold-light);
  border-color: var(--gold-border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* --- iOS CARDS --- */
.ios-card {
  background: var(--bg-surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
}

.ios-card.gold-accent {
  border-color: var(--gold-border);
}

.ios-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.ios-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-pure);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* --- KPI STAT CARDS --- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.kpi-card {
  background: var(--bg-surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold-border);
}

.kpi-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.kpi-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.kpi-icon-badge {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}

.kpi-value {
  font-family: var(--font-serif);
  font-size: 1.95rem;
  font-weight: 700;
  color: var(--text-pure);
  margin-bottom: 0.4rem;
  line-height: 1;
}

.kpi-trend {
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.kpi-trend.up {
  color: var(--color-success);
}

.kpi-trend.down {
  color: var(--color-danger);
}

.kpi-trend-note {
  color: var(--text-dim);
  font-size: 0.72rem;
  margin-left: 0.35rem;
}

/* --- BOTÕES PREMIUM & AÇÕES DE TABELA --- */
button {
  font-family: var(--font-sans);
  border: none;
  background: transparent;
  outline: none;
  cursor: pointer;
}

.btn-ios {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.btn-ios-primary {
  background: var(--gold-gradient);
  color: #08090d;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
}

.btn-ios-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
}

.btn-ios-secondary {
  background: var(--bg-surface-elevated);
  border-color: var(--border-subtle);
  color: var(--text-main);
}

.btn-ios-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--gold-border);
  color: var(--text-pure);
}

.btn-ios-danger {
  background: rgba(255, 69, 58, 0.15);
  border-color: rgba(255, 69, 58, 0.3);
  color: var(--color-danger);
}

.btn-ios-danger:hover {
  background: var(--color-danger);
  color: #fff;
}

.btn-ios-sm {
  padding: 0.38rem 0.8rem;
  font-size: 0.75rem;
}

/* Botões de Ação em Linhas de Tabelas (Editar / Excluir) */
.btn-table-action,
.btn-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-xs);
  background: #141722;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #b0b8c8;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.btn-table-action:hover,
.btn-action-icon:hover {
  background: #1c2030;
  border-color: var(--gold-border);
  color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.btn-table-action.delete,
.btn-table-action.btn-action-delete,
.btn-action-icon.delete,
.btn-table-action[style*="color: #ff453a"],
.btn-table-action[style*="color: rgb(255, 69, 58)"] {
  color: #ff453a !important;
  background: rgba(255, 69, 58, 0.08);
  border-color: rgba(255, 69, 58, 0.25);
}

.btn-table-action.delete:hover,
.btn-table-action.btn-action-delete:hover,
.btn-action-icon.delete:hover,
.btn-table-action[style*="color: #ff453a"]:hover,
.btn-table-action[style*="color: rgb(255, 69, 58)"]:hover {
  background: #ff453a !important;
  border-color: #ff453a !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(255, 69, 58, 0.45);
}

/* --- iOS TOGGLE SWITCH --- */
.ios-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.ios-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ios-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: var(--transition-smooth);
  border-radius: var(--radius-pill);
}

.ios-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: var(--transition-smooth);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.ios-switch input:checked + .ios-slider {
  background-color: var(--color-success);
}

.ios-switch input:checked + .ios-slider::before {
  transform: translateX(20px);
}

/* --- TABELAS DATA-RICH --- */
.ios-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-card);
}

.ios-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.ios-table th {
  padding: 0.85rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
}

.ios-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  vertical-align: middle;
}

.ios-table tbody tr {
  transition: var(--transition-fast);
}

.ios-table tbody tr:hover {
  background: var(--bg-surface-hover);
}

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

/* Status Badges */
.status-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-pill-badge.novo {
  background: rgba(10, 132, 255, 0.15);
  color: #5ac8fa;
  border: 1px solid rgba(10, 132, 255, 0.3);
}

.status-pill-badge.confirmado {
  background: rgba(191, 90, 242, 0.15);
  color: #d175fc;
  border: 1px solid rgba(191, 90, 242, 0.3);
}

.status-pill-badge.preparando {
  background: rgba(255, 159, 10, 0.15);
  color: #ff9f0a;
  border: 1px solid rgba(255, 159, 10, 0.3);
}

.status-pill-badge.saiu {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-light);
  border: 1px solid var(--gold-border);
}

.status-pill-badge.entregue {
  background: rgba(52, 199, 89, 0.15);
  color: #34c759;
  border: 1px solid rgba(52, 199, 89, 0.3);
}

.status-pill-badge.cancelado {
  background: rgba(255, 69, 58, 0.15);
  color: #ff453a;
  border: 1px solid rgba(255, 69, 58, 0.3);
}

/* ==========================================================================
   SISTEMA DE MODAIS & SHEETS (iOS)
   ========================================================================== */
.ios-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 1.5rem;
}

.ios-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.ios-modal-dialog {
  background: var(--bg-surface-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-floating);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.ios-modal-backdrop.active .ios-modal-dialog {
  transform: scale(1) translateY(0);
}

.ios-modal-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ios-modal-header h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text-pure);
}

.ios-modal-close-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.ios-modal-close-btn:hover {
  color: var(--text-pure);
  background: var(--bg-surface-hover);
}

.ios-modal-body {
  padding: 1.75rem;
  overflow-y: auto;
  flex: 1;
}

.ios-modal-footer {
  padding: 1.25rem 1.75rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Formulários iOS */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.form-control {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  font-size: 0.88rem;
  color: var(--text-pure);
  transition: var(--transition-smooth);
}

.form-control:focus {
  outline: none;
  border-color: var(--gold-primary);
  background: var(--bg-surface);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
}

/* Toast Notifications */
.ios-toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 300;
  pointer-events: none;
}

.ios-toast {
  background: rgba(22, 25, 34, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-floating);
  color: var(--text-pure);
  font-size: 0.85rem;
  min-width: 280px;
  max-width: 400px;
  pointer-events: auto;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ios-toast.success .toast-icon { color: var(--color-success); }
.ios-toast.danger .toast-icon { color: var(--color-danger); }
.ios-toast.warning .toast-icon { color: var(--color-warning); }
.ios-toast.info .toast-icon { color: var(--gold-light); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
