/* ============================================================
   DOMAINE DU BAYO — Admin Panel · Premium Dark UI
   ============================================================ */

/* ── VARIABLES ── */
:root {
  --forest:        #1a3a0f;
  --forest-mid:    #2d5c1a;
  --forest-light:  #4a8c2a;
  --gold:          #b8952a;
  --gold-light:    #d4af5a;
  --gold-dim:      rgba(184,149,42,.12);

  /* Dark theme (default) */
  --bg:        #080d08;
  --surface:   #0f160f;
  --surface-2: #151e15;
  --surface-3: #1c271c;
  --border:    rgba(255,255,255,.07);
  --border-2:  rgba(255,255,255,.12);
  --text-1:    #e8f0e8;
  --text-2:    #8ba08b;
  --text-3:    #4a5c4a;
  --white:     #0f160f;   /* "white" surfaces in dark = surface color */

  --primary:   #2d6a1f;
  --success:   #4caf50;
  --success-bg:rgba(76,175,80,.12);
  --error:     #ef5350;
  --error-bg:  rgba(239,83,80,.12);
  --warning:   #ff9800;
  --warning-bg:rgba(255,152,0,.12);
  --blue:      #42a5f5;
  --blue-bg:   rgba(66,165,245,.12);
  --pink:      #f48fb1;
  --pink-bg:   rgba(244,143,177,.12);

  --sidebar-w: 260px;
  --header-h:  60px;
  --radius:    8px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --shadow:    0 2px 12px rgba(0,0,0,.4);
  --shadow-lg: 0 16px 56px rgba(0,0,0,.6);
  --glow-gold: 0 0 20px rgba(184,149,42,.2);
  --transition:.2s ease;
}

/* Light mode override */
body.light {
  --bg:        #f3f5f0;
  --surface:   #ffffff;
  --surface-2: #f8faf6;
  --surface-3: #eef2ea;
  --border:    rgba(0,0,0,.08);
  --border-2:  rgba(0,0,0,.14);
  --text-1:    #1a2a1a;
  --text-2:    #4a6050;
  --text-3:    #9aab9a;
  --white:     #ffffff;
  --shadow:    0 2px 12px rgba(0,0,0,.07);
  --shadow-lg: 0 16px 56px rgba(0,0,0,.14);
  --glow-gold: 0 0 20px rgba(184,149,42,.15);
}

/* ── RESET ── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg); color: var(--text-1); line-height: 1.6; overflow-x: hidden;
  transition: background .3s, color .3s;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }
img { display: block; max-width: 100%; }

/* ════════════════════════════════════════════
   LOGIN
════════════════════════════════════════════ */
#login-screen {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: radial-gradient(ellipse at 20% 80%, rgba(26,58,15,.8) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(45,92,26,.4) 0%, transparent 55%),
              #060a06;
  position: relative; overflow: hidden;
}
/* Animated grid background */
#login-screen::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(184,149,42,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(184,149,42,.04) 1px, transparent 1px);
  background-size: 48px 48px;
}
.login-box {
  position: relative; z-index: 1;
  background: rgba(15,22,15,.85);
  backdrop-filter: blur(32px); -webkit-backdrop-filter: blur(32px);
  border: 1px solid rgba(184,149,42,.2);
  border-radius: var(--radius-xl);
  padding: 48px 44px;
  width: 100%; max-width: 440px;
  box-shadow: 0 0 0 1px rgba(184,149,42,.06), var(--shadow-lg);
  text-align: center;
}
/* Gold line at top of login box */
.login-box::before {
  content: '';
  position: absolute; top: -1px; left: 15%; right: 15%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 2px;
}
.login-logo {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-family: 'Montserrat', sans-serif; font-size: 1.1rem; font-weight: 600;
  color: var(--gold-light); margin-bottom: 32px;
}
.login-logo svg { width: 42px; height: 42px; flex-shrink: 0; filter: drop-shadow(0 0 8px rgba(184,149,42,.5)); }
.login-box h1 {
  font-family: 'Montserrat', sans-serif; font-size: 1.5rem; font-weight: 700;
  margin-bottom: 8px; color: var(--text-1);
}
.login-box > p { color: var(--text-2); font-size: .9rem; margin-bottom: 32px; }
.login-field { margin-bottom: 20px; text-align: left; }
.login-field label {
  display: block; font-size: .7rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-2); margin-bottom: 8px;
}
.login-field input {
  width: 100%; padding: 13px 16px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius); font-size: .95rem;
  color: var(--text-1); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.login-field input:focus {
  border-color: rgba(184,149,42,.5);
  box-shadow: 0 0 0 3px rgba(184,149,42,.1);
}
body.light .login-field input {
  background: white; border-color: rgba(0,0,0,.15); color: #1a2a1a;
}
.login-submit {
  width: 100%; padding: 14px; margin-top: 8px;
  background: linear-gradient(135deg, var(--forest-mid), var(--forest));
  color: var(--gold-light); border: none;
  border-radius: var(--radius); font-size: .85rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
  transition: all .25s; position: relative; overflow: hidden;
  box-shadow: 0 4px 20px rgba(26,58,15,.5);
}
.login-submit::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.1), transparent);
  transform: translateX(-100%); transition: transform .6s;
}
.login-submit:hover::before { transform: translateX(100%); }
.login-submit:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(26,58,15,.7); }
.back-link { display: inline-block; margin-top: 24px; font-size: .82rem; color: var(--text-3); transition: color .2s; }
.back-link:hover { color: var(--gold-light); }

/* ════════════════════════════════════════════
   LAYOUT
════════════════════════════════════════════ */
#admin-app { display: flex; min-height: 100vh; }

/* ════════════════════════════════════════════
   SIDEBAR
════════════════════════════════════════════ */
#sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: #050a05;
  border-right: 1px solid rgba(184,149,42,.1);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
  overflow-y: auto; overflow-x: hidden;
}
body.light #sidebar {
  background: #0f1f0f;
  border-right-color: rgba(184,149,42,.2);
}
.sidebar-logo {
  padding: 22px 20px;
  display: flex; align-items: center; gap: 10px;
  font-family: 'Montserrat', sans-serif; font-size: .9rem; font-weight: 700;
  color: var(--gold-light);
  border-bottom: 1px solid rgba(184,149,42,.1);
  flex-shrink: 0; letter-spacing: .02em;
}
.sidebar-logo svg {
  width: 32px; height: 32px; flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(184,149,42,.5));
}
.sidebar-section-label {
  font-size: .58rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(255,255,255,.2); padding: 20px 18px 6px;
}
.sidebar-nav { flex: 1; padding: 8px 10px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius);
  font-size: .78rem; font-weight: 500; color: rgba(255,255,255,.45);
  cursor: pointer; transition: all .18s;
  margin-bottom: 1px; border: none; background: none;
  width: 100%; text-align: left; position: relative;
  letter-spacing: .01em;
}
.nav-item:hover { background: rgba(255,255,255,.05); color: rgba(255,255,255,.85); }
.nav-item.active {
  background: rgba(184,149,42,.1);
  color: var(--gold-light);
}
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 2px; background: var(--gold); border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px rgba(184,149,42,.6);
}
.nav-item svg {
  width: 16px; height: 16px; stroke: currentColor; fill: none;
  flex-shrink: 0; opacity: .8;
}
.nav-item.active svg { opacity: 1; }
.nav-item--danger { color: rgba(255,80,80,.5); }
.nav-item--danger:hover { background: rgba(255,0,0,.08); color: rgba(255,100,100,.9); }
.nav-badge {
  margin-left: auto; background: var(--error); color: white;
  font-size: .6rem; font-weight: 800; padding: 2px 7px;
  border-radius: 20px; letter-spacing: .04em;
  animation: pulseBadge 2s ease-in-out infinite;
}
@keyframes pulseBadge {
  0%,100% { box-shadow: 0 0 0 0 rgba(239,83,80,.4); }
  50%      { box-shadow: 0 0 0 4px rgba(239,83,80,0); }
}
.sidebar-bottom {
  padding: 10px; border-top: 1px solid rgba(255,255,255,.06); flex-shrink: 0;
}

/* ════════════════════════════════════════════
   MAIN AREA
════════════════════════════════════════════ */
#admin-main {
  margin-left: var(--sidebar-w);
  flex: 1; display: flex; flex-direction: column; min-height: 100vh;
}

/* ── HEADER ── */
#admin-header {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50; flex-shrink: 0;
}
#admin-header h2 {
  font-family: 'Montserrat', sans-serif; font-size: .95rem; font-weight: 700;
  color: var(--text-1); letter-spacing: .01em;
}
.header-user { display: flex; align-items: center; gap: 12px; }
.header-user span { font-size: .8rem; color: var(--text-2); }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--forest), var(--forest-mid));
  color: var(--gold-light);
  border: 1px solid rgba(184,149,42,.3);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Montserrat', sans-serif; font-size: .85rem; font-weight: 700;
  box-shadow: 0 0 12px rgba(184,149,42,.2);
}

/* ── CONTENT ── */
#admin-content { padding: 28px 32px; flex: 1; }

/* ════════════════════════════════════════════
   STAT GRID
════════════════════════════════════════════ */
.stat-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px;
  position: relative; overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.stat-card:hover { border-color: var(--border-2); box-shadow: var(--shadow); }
/* Colored top accent */
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(184,149,42,.4), transparent);
}
.stat-card--green::before { background: linear-gradient(90deg, transparent, rgba(76,175,80,.6), transparent); }
.stat-card--gold::before  { background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.stat-card__label {
  font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 10px;
}
.stat-card__value {
  font-family: 'Montserrat', sans-serif; font-size: 2rem; font-weight: 700;
  color: var(--text-1); line-height: 1;
}
.stat-card__sub { font-size: .75rem; color: var(--text-3); margin-top: 6px; }
.stat-card--gold  .stat-card__value { color: var(--gold-light); }
.stat-card--green .stat-card__value { color: var(--success); }
.stat-card__icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; margin-bottom: 12px;
}

/* ════════════════════════════════════════════
   SECTION TITLE
════════════════════════════════════════════ */
.section-title {
  font-family: 'Montserrat', sans-serif; font-size: .78rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-2); margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}

/* ════════════════════════════════════════════
   CARDS / SURFACES
════════════════════════════════════════════ */
.form-card, .quick-card, .dog-admin-card, .portee-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.form-section { max-width: 900px; }

/* ════════════════════════════════════════════
   FORMS
════════════════════════════════════════════ */
.form-group { margin-bottom: 18px; }
.form-group:last-child { margin-bottom: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid--3 { grid-template-columns: 1fr 1fr 1fr; }

/* Legacy .field alias */
.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }

.field label, .form-group label,
.form-group > label:first-child {
  display: block; font-size: .68rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-2); margin-bottom: 7px;
}
.field input, .field select, .field textarea,
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px 14px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: .88rem;
  color: var(--text-1); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus,
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: rgba(184,149,42,.5);
  box-shadow: 0 0 0 3px rgba(184,149,42,.08);
}
.field textarea, .form-group textarea { resize: vertical; min-height: 90px; }
.field--full { grid-column: 1 / -1; }

/* ════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--radius);
  font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  cursor: pointer; border: none; transition: all .2s; white-space: nowrap;
}
.btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; flex-shrink: 0; }
.btn-primary {
  background: linear-gradient(135deg, var(--forest-mid), var(--forest));
  color: var(--gold-light);
  box-shadow: 0 2px 12px rgba(26,58,15,.4);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(26,58,15,.6); filter: brightness(1.1); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #0a1505;
  box-shadow: 0 2px 12px rgba(184,149,42,.3);
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(184,149,42,.5); }
.btn-danger { background: rgba(239,83,80,.12); color: var(--error); border: 1px solid rgba(239,83,80,.2); }
.btn-danger:hover { background: rgba(239,83,80,.2); transform: translateY(-1px); }
.btn-outline {
  background: transparent; color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--border-2); color: var(--text-1); background: var(--surface-2); }
.btn-sm  { padding: 6px 12px; font-size: .68rem; }
.btn-icon { padding: 7px; border-radius: var(--radius); }

/* ════════════════════════════════════════════
   ALERTS
════════════════════════════════════════════ */
.alert {
  padding: 11px 16px; border-radius: var(--radius);
  font-size: .84rem; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.alert--success { background: var(--success-bg); color: var(--success); border-left: 2px solid var(--success); }
.alert--error   { background: var(--error-bg);   color: var(--error);   border-left: 2px solid var(--error); }
.alert--warning { background: var(--warning-bg); color: var(--warning); border-left: 2px solid var(--warning); }

/* ════════════════════════════════════════════
   TABLES
════════════════════════════════════════════ */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; padding: 11px 16px;
  font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-3); border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.data-table td {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  font-size: .84rem; vertical-align: middle; color: var(--text-1);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface-2); }

/* ════════════════════════════════════════════
   BADGES
════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; padding: 3px 10px;
  border-radius: 50px; font-size: .62rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
}
.badge-available { background: var(--success-bg); color: var(--success); }
.badge-reserved  { background: var(--warning-bg); color: var(--warning); }
.badge-sold      { background: rgba(100,100,100,.12); color: var(--text-2); }
.badge-male      { background: var(--blue-bg);    color: var(--blue); }
.badge-female    { background: var(--pink-bg);    color: var(--pink); }

/* ════════════════════════════════════════════
   MODAL
════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.7); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xl);
  width: 100%; max-width: 680px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 0 0 1px rgba(184,149,42,.08), var(--shadow-lg);
  animation: slideUp .25s cubic-bezier(.2,.8,.3,1);
}
@keyframes slideUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-header {
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.modal-header h3 { font-family: 'Montserrat', sans-serif; font-size: .9rem; font-weight: 700; color: var(--text-1); }
.modal-close {
  width: 30px; height: 30px; border: none; background: var(--surface-2);
  cursor: pointer; font-size: 1.1rem; color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius); transition: all .2s; line-height: 1;
}
.modal-close:hover { background: var(--surface-3); color: var(--text-1); }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px; border-top: 1px solid var(--border);
  display: flex; gap: 10px; justify-content: flex-end;
  position: sticky; bottom: 0; background: var(--surface); z-index: 1;
}

/* ════════════════════════════════════════════
   IMAGE PREVIEW
════════════════════════════════════════════ */
.img-preview {
  width: 80px; height: 80px; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--border);
}
.img-preview-placeholder {
  width: 80px; height: 80px; background: var(--surface-2);
  border-radius: var(--radius); border: 1px dashed var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); font-size: .65rem; text-align: center; line-height: 1.3;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════
   UPLOAD ZONE
════════════════════════════════════════════ */
.upload-zone {
  border: 1px dashed rgba(184,149,42,.3); border-radius: var(--radius-lg);
  padding: 24px 20px; text-align: center; cursor: pointer;
  background: var(--surface-2);
  transition: border-color .2s, background .2s;
}
.upload-zone:hover { border-color: rgba(184,149,42,.6); background: var(--surface-3); }
.upload-zone input[type="file"] { display: none; }
.upload-zone svg { width: 32px; height: 32px; stroke: var(--text-3); fill: none; margin: 0 auto 10px; display: block; }
.upload-zone p { font-size: .84rem; color: var(--text-2); margin-bottom: 4px; }
.upload-zone span { font-size: .72rem; color: var(--text-3); }

/* ════════════════════════════════════════════
   GALLERY ADMIN GRID
════════════════════════════════════════════ */
.gallery-admin-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 10px; }
.gallery-admin-item {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 1; background: var(--surface-2); cursor: pointer;
  border: 1px solid var(--border);
}
.gallery-admin-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-admin-item .item-cat {
  position: absolute; top: 6px; left: 6px;
  background: rgba(0,0,0,.75); color: rgba(255,255,255,.8);
  font-size: .58rem; padding: 2px 7px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: .05em;
}
.gallery-admin-item .item-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,.7);
  display: none; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; padding: 8px;
}
.gallery-admin-item:hover .item-overlay { display: flex; }
.gallery-admin-item .item-caption { color: white; font-size: .7rem; text-align: center; line-height: 1.3; }
.gallery-add-btn {
  aspect-ratio: 1; border-radius: var(--radius);
  border: 1px dashed rgba(184,149,42,.25); background: var(--surface-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; color: var(--text-3); font-size: .72rem;
  transition: all .2s;
}
.gallery-add-btn:hover { border-color: rgba(184,149,42,.5); color: var(--gold-light); background: var(--surface-3); }
.gallery-add-btn svg { width: 26px; height: 26px; fill: none; stroke: currentColor; }

/* ════════════════════════════════════════════
   DOGS GRID
════════════════════════════════════════════ */
.dogs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.dog-admin-card__header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.dog-admin-card__info { flex: 1; }
.dog-admin-card__name {
  font-family: 'Montserrat', sans-serif; font-size: .95rem; font-weight: 700;
  color: var(--text-1); margin-bottom: 3px;
}
.dog-admin-card__sub { font-size: .78rem; color: var(--text-3); }
.dog-admin-card__desc { font-size: .84rem; color: var(--text-2); line-height: 1.6; }
.dog-admin-card__actions {
  display: flex; gap: 8px; margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ════════════════════════════════════════════
   DASHBOARD
════════════════════════════════════════════ */
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.quick-card .section-title { margin-bottom: 14px; }
.quick-actions { display: flex; flex-direction: column; gap: 8px; }
.status-list { display: flex; flex-direction: column; gap: 9px; }
.status-item { display: flex; align-items: center; gap: 10px; font-size: .84rem; color: var(--text-2); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.status-dot--green { background: var(--success); box-shadow: 0 0 6px rgba(76,175,80,.5); }
.status-dot--red   { background: var(--error);   box-shadow: 0 0 6px rgba(239,83,80,.5); }
.status-dot--gray  { background: var(--text-3); }
.status-dot--gold  { background: var(--gold);    box-shadow: 0 0 6px rgba(184,149,42,.5); }

/* Activity log */
.activity-item {
  display: flex; align-items: flex-start; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--border); font-size: .82rem;
}
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.activity-dot--green { background: var(--success); }
.activity-dot--gold  { background: var(--gold); }
.activity-dot--gray  { background: var(--text-3); }
.activity-dot--red   { background: var(--error); }
.activity-text { flex: 1; color: var(--text-2); }
.activity-time { color: var(--text-3); font-size: .72rem; white-space: nowrap; }

/* Portée card */
.portee-card__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.portee-card__name { font-family: 'Montserrat', sans-serif; font-size: .9rem; font-weight: 700; color: var(--text-1); }
.portee-meta { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 12px; }
.portee-meta-item { font-size: .8rem; color: var(--text-2); }
.portee-meta-item strong { display: block; font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 2px; }

/* Waitlist */
.waitlist-status-new       { color: var(--success); font-weight: 700; }
.waitlist-status-contacted { color: var(--warning); font-weight: 700; }
.waitlist-status-placed    { color: var(--text-3); }

/* ════════════════════════════════════════════
   SEARCH BAR
════════════════════════════════════════════ */
.search-bar { position: relative; flex: 1; max-width: 300px; }
.search-bar svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; stroke: var(--text-3); fill: none; pointer-events: none;
}
.search-bar input {
  width: 100%; padding: 8px 12px 8px 34px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: .82rem; outline: none;
  transition: border-color .2s; color: var(--text-1);
}
.search-bar input:focus { border-color: rgba(184,149,42,.4); }
.search-bar input::placeholder { color: var(--text-3); }

/* ── Table toolbar ── */
.table-toolbar {
  padding: 12px 16px; display: flex; align-items: center;
  gap: 10px; flex-wrap: wrap; border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.toolbar-count { font-size: .78rem; color: var(--text-3); white-space: nowrap; }
.toolbar-spacer { flex: 1; }

/* Tab bar */
.tab-bar {
  display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 20px;
}
.tab-bar-btn {
  padding: 10px 20px; font-size: .75rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-3); border: none; background: none; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .2s, border-color .2s;
}
.tab-bar-btn.active { color: var(--gold-light); border-bottom-color: var(--gold); }
.tab-bar-btn:hover:not(.active) { color: var(--text-2); }

/* Preview panel */
.preview-panel {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; font-size: .84rem;
}

/* Settings */
.settings-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); margin-bottom: 20px; overflow: hidden;
}
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border); gap: 16px;
}
.settings-row:last-child { border-bottom: none; }
.settings-row__label { font-size: .86rem; color: var(--text-1); font-weight: 500; }
.settings-row__desc  { font-size: .76rem; color: var(--text-3); margin-top: 2px; }

/* ════════════════════════════════════════════
   DARK MODE TOGGLE
════════════════════════════════════════════ */
.dark-toggle {
  width: 36px; height: 20px; border-radius: 10px;
  background: rgba(255,255,255,.12); position: relative;
  cursor: pointer; border: none; flex-shrink: 0; transition: background .3s;
}
.dark-toggle::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(255,255,255,.7); transition: transform .3s, background .3s;
}
body.light .dark-toggle { background: var(--forest-light); }
body.light .dark-toggle::after { transform: translateX(16px); background: #fff; }
.dark-toggle-wrap {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px;
  color: rgba(255,255,255,.35); font-size: .72rem;
}
.dark-toggle-wrap svg { width: 13px; height: 13px; stroke: currentColor; fill: none; flex-shrink: 0; }

/* ── Sortable rows ── */
.sortable-handle {
  cursor: grab; color: var(--text-3); padding: 4px;
  display: inline-flex; align-items: center;
}
.sortable-handle:active { cursor: grabbing; }
.sortable-handle svg { width: 14px; height: 14px; stroke: currentColor; fill: none; }

/* ════════════════════════════════════════════
   TOAST NOTIFICATIONS
════════════════════════════════════════════ */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 10px;
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  font-size: .82rem; min-width: 240px; max-width: 360px;
  pointer-events: all; color: var(--text-1);
  animation: toastIn .3s cubic-bezier(.2,.8,.3,1) both;
}
.toast.out { animation: toastOut .25s ease forwards; }
.toast svg { width: 16px; height: 16px; fill: none; stroke: currentColor; flex-shrink: 0; }
.toast--success { border-left: 2px solid var(--success); }
.toast--success svg { stroke: var(--success); }
.toast--error   { border-left: 2px solid var(--error); }
.toast--error   svg { stroke: var(--error); }
.toast--warning { border-left: 2px solid var(--warning); }
.toast--warning svg { stroke: var(--warning); }
.toast--info    { border-left: 2px solid var(--blue); }
.toast--info    svg { stroke: var(--blue); }
.toast__close { margin-left: auto; padding: 2px 6px; background: none; border: none; color: var(--text-3); cursor: pointer; font-size: .9rem; }
@keyframes toastIn  { from { opacity:0; transform: translateX(24px); } to { opacity:1; transform: none; } }
@keyframes toastOut { to   { opacity:0; transform: translateX(24px); } }

/* ════════════════════════════════════════════
   CONFIRM DIALOG
════════════════════════════════════════════ */
#confirm-overlay {
  position: fixed; inset: 0; z-index: 5000;
  background: rgba(0,0,0,.7); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn .2s ease;
}
.confirm-box {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xl); padding: 32px;
  width: 100%; max-width: 380px;
  box-shadow: var(--shadow-lg);
  animation: slideUp .25s cubic-bezier(.2,.8,.3,1);
  text-align: center;
}
.confirm-box__icon {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
}
.confirm-box__icon--danger  { background: var(--error-bg); }
.confirm-box__icon--danger  svg { stroke: var(--error); }
.confirm-box__icon--warning { background: var(--warning-bg); }
.confirm-box__icon--warning svg { stroke: var(--warning); }
.confirm-box__icon svg { width: 20px; height: 20px; fill: none; stroke-width: 2; }
.confirm-box h4 { font-family: 'Montserrat', sans-serif; font-size: .95rem; font-weight: 700; color: var(--text-1); margin-bottom: 8px; }
.confirm-box p  { font-size: .84rem; color: var(--text-2); margin-bottom: 22px; line-height: 1.5; }
.confirm-box__actions { display: flex; gap: 10px; justify-content: center; }

/* ════════════════════════════════════════════
   SHORTCUTS OVERLAY
════════════════════════════════════════════ */
#shortcuts-overlay {
  position: fixed; inset: 0; z-index: 4000;
  background: rgba(0,0,0,.7); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.shortcut-card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xl); padding: 32px;
  max-width: 480px; width: 100%;
  box-shadow: var(--shadow-lg);
}
.shortcut-card h3 { font-family: 'Montserrat', sans-serif; font-size: .95rem; font-weight: 700; color: var(--text-1); margin-bottom: 20px; }
.shortcut-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .82rem; color: var(--text-2); }
.shortcut-row:last-child { border-bottom: none; }
.shortcut-key {
  display: inline-flex; gap: 4px;
}
.shortcut-key kbd {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 2px 8px; background: var(--surface-2);
  border: 1px solid var(--border-2); border-radius: 4px;
  font-size: .72rem; font-family: monospace; color: var(--text-1);
}

/* ════════════════════════════════════════════
   WAITLIST & MISC FORMS
════════════════════════════════════════════ */
.wait-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 12px; }

/* ════════════════════════════════════════════
   MESSAGERIE — Split-pane email client
════════════════════════════════════════════ */

/* Page wrapper */
.msg-page { display: flex; flex-direction: column; gap: 20px; }

/* Stats bar */
.msg-stats {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.msg-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 28px;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
}
.msg-stat svg { color: var(--text-3); flex-shrink: 0; }
.msg-stat--new svg { color: var(--gold); }
.msg-stat--new .msg-stat__n { color: var(--gold); }
.msg-stat__n { font-size: 1.6rem; font-weight: 700; color: var(--text-1); line-height: 1; }
.msg-stat__l { font-size: .68rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .09em; margin-top: 3px; }
.msg-stats__actions { margin-left: auto; padding: 0 20px; }

/* Split layout */
.msg-split {
  display: grid;
  grid-template-columns: 340px 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: calc(100vh - 220px);
  min-height: 520px;
}

/* ── Left: list panel ── */
.msg-list-panel {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  overflow: hidden;
}
.msg-list-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  flex-shrink: 0;
}
.msg-list-title { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--text-2); }
.msg-list-badge {
  background: var(--gold);
  color: #000;
  font-size: .58rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.msg-list { overflow-y: auto; flex: 1; }
.msg-list::-webkit-scrollbar { width: 4px; }
.msg-list::-webkit-scrollbar-track { background: transparent; }
.msg-list::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }

/* Message item */
.msg-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px 13px 0;
  cursor: pointer;
  transition: background .15s;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.msg-item:hover { background: var(--surface-2); }
.msg-item--active { background: var(--surface-3) !important; }
.msg-item--new { background: rgba(184,149,42,.04); }

.msg-item__accent {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent, transparent);
  opacity: 0;
  transition: opacity .15s;
}
.msg-item--new .msg-item__accent,
.msg-item--active .msg-item__accent { opacity: 1; }

.msg-item__avatar {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .88rem;
  position: relative;
  margin-left: 14px;
}
.msg-item__dot {
  position: absolute; top: 0; right: 0;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--surface);
  animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(184,149,42,.5); }
  60%      { box-shadow: 0 0 0 5px rgba(184,149,42,0); }
}
.msg-item__body { flex: 1; min-width: 0; padding-right: 2px; }
.msg-item__top { display: flex; align-items: baseline; gap: 6px; margin-bottom: 3px; }
.msg-item__name { font-size: .83rem; font-weight: 600; color: var(--text-1); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-item--new .msg-item__name { font-weight: 700; }
.msg-item__date { font-size: .67rem; color: var(--text-3); white-space: nowrap; flex-shrink: 0; }
.msg-item__subject { font-size: .71rem; color: var(--text-3); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-item__preview { font-size: .77rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-item__del {
  flex-shrink: 0; opacity: 0;
  background: none; border: none; color: var(--text-3);
  cursor: pointer; padding: 4px; border-radius: 4px;
  transition: opacity .15s, color .15s;
  margin-right: 8px; align-self: center;
}
.msg-item:hover .msg-item__del { opacity: 1; }
.msg-item__del:hover { color: var(--error); }

/* Empty list */
.msg-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 220px; gap: 12px; color: var(--text-3);
  font-style: italic; font-size: .85rem;
}
.msg-empty svg { opacity: .25; }

/* ── Right: detail panel ── */
.msg-detail-panel { display: flex; flex-direction: column; overflow: hidden; }
.msg-detail { display: flex; flex-direction: column; height: 100%; }

.msg-detail__header {
  display: flex; align-items: center; gap: 16px;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--surface-2);
}
.msg-detail__avatar {
  width: 54px; height: 54px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 700; flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
.msg-detail__info { flex: 1; min-width: 0; }
.msg-detail__name { font-size: 1.08rem; font-weight: 700; color: var(--text-1); margin-bottom: 5px; }
.msg-detail__contact { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.msg-detail__link { font-size: .8rem; color: var(--text-3); text-decoration: none; transition: color .15s; }
.msg-detail__link:hover { color: var(--gold-light); }
.msg-detail__sep { color: var(--text-3); font-size: .8rem; }
.msg-detail__close {
  background: none; border: none; color: var(--text-3); cursor: pointer;
  padding: 8px; border-radius: 8px; transition: color .15s, background .15s; flex-shrink: 0;
}
.msg-detail__close:hover { color: var(--text-1); background: var(--surface-3); }

.msg-detail__meta {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 13px 28px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.msg-detail__badge {
  padding: 4px 14px; border-radius: 20px;
  font-size: .71rem; font-weight: 700; letter-spacing: .04em;
}
.msg-detail__date { font-size: .75rem; color: var(--text-3); }

.msg-detail__body { flex: 1; padding: 28px; overflow-y: auto; }
.msg-detail__body::-webkit-scrollbar { width: 4px; }
.msg-detail__body::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }
.msg-detail__message {
  font-size: .92rem; line-height: 1.9; color: var(--text-1);
  white-space: pre-wrap;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px; min-height: 120px;
}

.msg-detail__actions {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 18px 28px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--surface-2);
}
.msg-detail__btn-del {
  margin-left: auto;
  background: transparent !important;
  border: 1px solid var(--error) !important;
  color: var(--error) !important;
  box-shadow: none !important;
}
.msg-detail__btn-del:hover { background: var(--error-bg) !important; }

/* Empty detail state */
.msg-detail--empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; gap: 16px; color: var(--text-3); font-size: .88rem; font-style: italic;
}
.msg-detail--empty svg { opacity: .15; }

/* ════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════ */
@media (max-width: 1400px) { .stat-grid { grid-template-columns: repeat(4,1fr); } }
@media (max-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(3,1fr); }
  .gallery-admin-grid { grid-template-columns: repeat(4,1fr); }
}
@media (max-width: 900px) {
  .form-grid--3 { grid-template-columns: 1fr 1fr; }
  .dogs-grid { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr; }
  .gallery-admin-grid { grid-template-columns: repeat(3,1fr); }
  .stat-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 900px) {
  .msg-split { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .msg-detail-panel { display: none; border-top: 1px solid var(--border); }
  .msg-split.detail-open .msg-list-panel { display: none; }
  .msg-split.detail-open .msg-detail-panel { display: flex; min-height: 500px; }
  .msg-stats { flex-wrap: wrap; }
  .msg-stat { flex: 1 1 auto; border-right: none; border-bottom: 1px solid var(--border); }
  .msg-stats__actions { width: 100%; padding: 12px 16px; border-top: 1px solid var(--border); }
}
@media (max-width: 768px) {
  #sidebar { width: 220px; transform: translateX(-100%); transition: transform .3s ease; }
  #sidebar.open { transform: translateX(0); }
  #admin-main { margin-left: 0; }
  #admin-content { padding: 18px 16px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .gallery-admin-grid { grid-template-columns: repeat(2,1fr); }
  .msg-detail__header { padding: 18px 16px 14px; }
  .msg-detail__body { padding: 18px 16px; }
  .msg-detail__actions { padding: 14px 16px; }
}
