:root {
  --navy: #0e1b4d;
  --navy-light: #16225c;
  --accent: #e32402;
  --accent-light: rgba(227, 36, 2, 0.08);
  --gray-bg: #f5f6fa;
  --border: rgba(14, 27, 77, 0.12);
  --text-muted: rgba(14, 27, 77, 0.65);
  --radius: 14px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--gray-bg);
  color: var(--navy);
  -webkit-font-smoothing: antialiased;
}

.avutuk-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: #ffffff;
  display: flex;
  flex-direction: column;
}

.avutuk-auth-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 24px;
}

.avutuk-logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--navy);
  text-align: center;
  margin-bottom: 8px;
}

.avutuk-logo span { color: var(--accent); }

.avutuk-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 32px;
}

.avutuk-field {
  margin-bottom: 18px;
}

.avutuk-field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--navy);
}

.avutuk-field input,
.avutuk-field select,
.avutuk-field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--navy);
}

.avutuk-field input:focus,
.avutuk-field select:focus,
.avutuk-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.avutuk-btn {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 40px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
  transition: opacity 0.15s ease;
}

.avutuk-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.avutuk-btn:hover:not(:disabled) { opacity: 0.92; }

.avutuk-btn--secondary {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--border);
}

.avutuk-btn--small {
  width: auto;
  padding: 9px 18px;
  font-size: 0.9rem;
}

.avutuk-link {
  text-align: center;
  margin-top: 18px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.avutuk-link a { color: var(--accent); font-weight: 600; text-decoration: none; }

.avutuk-error {
  background: #fdecea;
  color: #b3261e;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 16px;
  display: none;
}

.avutuk-error.is-visible { display: block; }

.avutuk-success-note {
  background: rgba(46, 160, 67, 0.1);
  color: #1f7a34;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

/* Layout applicatif (une fois connecte) */
.avutuk-topbar {
  background: var(--navy);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.avutuk-topbar__title { font-weight: 700; font-size: 1.05rem; }

.avutuk-topbar__logout {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  cursor: pointer;
}

.avutuk-main {
  flex: 1;
  padding: 20px;
  padding-bottom: 90px;
}

.avutuk-bottom-nav {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  max-width: 480px;
  margin: 0 auto;
}

.avutuk-bottom-nav a {
  flex: 1;
  text-align: center;
  padding: 10px 2px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
}

.avutuk-bottom-nav a.is-active { color: var(--accent); }
.avutuk-bottom-nav a .icon { display: block; font-size: 1.2rem; margin-bottom: 2px; }

.avutuk-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
}

.avutuk-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.avutuk-stat-card {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 16px;
}

.avutuk-stat-card__value { font-size: 1.4rem; font-weight: 700; }
.avutuk-stat-card__label { font-size: 0.78rem; color: rgba(255,255,255,0.7); margin-top: 4px; }

.avutuk-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 20px 0 12px;
}

.avutuk-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}

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

.avutuk-list-item__title { font-weight: 600; font-size: 0.98rem; }
.avutuk-list-item__meta { font-size: 0.85rem; color: var(--text-muted); margin-top: 2px; }

.avutuk-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 40px;
  white-space: nowrap;
}

.avutuk-badge--draft { background: rgba(14,27,77,0.08); color: var(--navy); }
.avutuk-badge--active { background: rgba(46,160,67,0.12); color: #1f7a34; }
.avutuk-badge--prepare { background: rgba(255,180,0,0.15); color: #a86a00; }
.avutuk-badge--shipped { background: rgba(71,112,219,0.12); color: #4770db; }
.avutuk-badge--delivered { background: rgba(46,160,67,0.12); color: #1f7a34; }
.avutuk-badge--dispute { background: #fdecea; color: #b3261e; }

.avutuk-fab {
  position: fixed;
  bottom: 78px;
  right: calc(50% - 240px + 20px);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.6rem;
  border: none;
  box-shadow: 0 4px 14px rgba(227,36,2,0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media screen and (max-width: 520px) {
  .avutuk-fab { right: 20px; }
}

.avutuk-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.avutuk-loading {
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.avutuk-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14,27,77,0.5);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
}

.avutuk-modal-overlay.is-open { display: flex; }

.avutuk-modal {
  background: #fff;
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 20px 20px 0 0;
  padding: 24px;
}

.avutuk-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.avutuk-modal__close {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
}

.avutuk-otp-input {
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: 0.3em;
  font-weight: 700;
}
