/* =========================
   BASE
========================= */
*{box-sizing:border-box}

body{
  margin:0;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:#f3f4f6;
  color:#111;
}

/* =========================
   LAYOUT DASHBOARD (FIX)
========================= */
.layout {
  display: flex !important;
  min-height: 100vh;
  width: 100%;
}

.layout .main {
  flex: 1 !important;
  max-width: none !important;
  min-width: 0;
  overflow-x: hidden;
}

/* =========================
   CONTAINER (pages non-dashboard)
========================= */
.container{
  max-width:1200px;
  margin:40px auto;
  padding:0 20px;
}

h1{
  font-size:24px;
  margin:0 0 20px;
  text-align:center;
}

/* =========================
   CARDS
========================= */
.card{
  background:#fff;
  border-radius:14px;
  padding:16px;
  margin-bottom:16px;
  box-shadow:0 8px 24px rgba(0,0,0,.12);
}

/* =========================
   BUTTONS
========================= */
.btn{
  display:inline-block;
  padding:12px 18px;
  border-radius:12px;
  border:0;
  background:#f6b500;
  color:#111;
  font-weight:800;
  text-align:center;
  text-decoration:none;
  cursor:pointer;
}

.btn.secondary{
  background:#e5e7eb;
}

.btn.small{
  padding:8px 12px;
  font-size:13px;
  border-radius:8px;
}

/* =========================
   FORM
========================= */
.input{
  width:100%;
  padding:12px;
  border-radius:12px;
  border:1px solid #d1d5db;
  background:#fff;
  font-size:16px;
}

label{
  display:block;
  font-weight:700;
  margin:10px 0 6px;
}

/* =========================
   TEXT
========================= */
.small{font-size:13px;color:#6b7280}
.center{text-align:center}
.right{text-align:right}

/* =========================
   STATS GRID
========================= */
.stats-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px;
  margin:20px 0 30px;
}

.stat{
  background:#fff;
  border-radius:14px;
  padding:18px;
  box-shadow:none;
  border:1px solid #e5e7eb;
  text-align:center;
}

.stat strong{
  display:block;
  font-size:20px;
  margin-bottom:4px;
}

.stat span{
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.05em;
  color:#6b7280;
}

.stat.green{border-left:6px solid #16a34a}
.stat.blue{border-left:6px solid #2563eb}
.stat.orange{border-left:6px solid #f6b500}
.stat.pending{background:#fef3c7}
.stat.done{background:#dcfce7}

/* =========================
   TABLE
========================= */
.table{
  width:100%;
  border-collapse:collapse;
  background:#fff;
  border-radius:10px;
  overflow:hidden;
  box-shadow:none;
}

.table th{
  background:#f3f4f6;
  padding:12px 14px;
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:#374151;
  border-bottom:2px solid #e5e7eb;
  text-align:left;
}

.table td{
  padding:12px 14px;
  font-size:14px;
  border-bottom:1px solid #e5e7eb;
  vertical-align:middle;
}

.table tbody tr:nth-child(odd){ background:#ffffff; }
.table tbody tr:nth-child(even){ background:#f9fafb; }
.table tbody tr:hover{ background:#fefce8; }
.table .right{ text-align:right; }

/* =========================
   BADGES
========================= */
.badge{
  display:inline-block;
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  letter-spacing:.3px;
}

.badge.orange{ background:#fde68a; color:#92400e; }
.badge.blue  { background:#bfdbfe; color:#1e3a8a; }
.badge.green { background:#16a34a; color:#fff; }

.badge.pending { background:#fef3c7; color:#92400e; }
.badge.planned { background:#dbeafe; color:#1e40af; }
.badge.done    { background:#dcfce7; color:#166534; }

.badge.active   { background:#e6f4ea; color:#1e7e34; }
.badge.trial    { background:#fff3cd; color:#856404; }
.badge.suspended,
.badge.expired  { background:#f8d7da; color:#842029; }

/* =========================
   PRINT
========================= */
@media print{
  .no-print{display:none}
  body{background:#fff}
}

/* =========================
   ABONNEMENTS ACTIONS
========================= */
.actions-inline form { display:inline-block; margin-right:6px; }
.actions-inline button { border:none; padding:6px 10px; border-radius:6px; cursor:pointer; font-size:.8rem; }
.btn-active   { background:#198754; color:#fff; }
.btn-trial    { background:#ffc107; color:#000; }
.btn-expired  { background:#dc3545; color:#fff; }
.btn-suspended{ background:#6c757d; color:#fff; }
.btn-active:hover,.btn-trial:hover,.btn-expired:hover,.btn-suspended:hover{ opacity:.85; }

/* =========================
   ACTIONS GRID
========================= */
.actions-grid{
  display:flex !important;
  flex-direction:row !important;
  flex-wrap:wrap !important;
  gap:10px !important;
  align-items:center !important;
}
.actions-grid .btn{
  display:inline-flex !important;
  width:auto !important;
  max-width:none !important;
  align-items:center !important;
  justify-content:center !important;
  gap:6px !important;
  white-space:nowrap !important;
}
.actions-grid .btn + .btn{ margin-left:0 !important; }

/* =========================
   PAGE WRAPPER / FORM PAGES
========================= */
.page-wrapper{
  display:flex;
  justify-content:center;
  padding:60px 20px;
}

.form-page{
  display:flex;
  justify-content:center;
  padding:60px 20px;
}

.form-card{
  width:100%;
  max-width:520px;
  background:#ffffff;
  padding:32px;
  border-radius:16px;
  box-shadow:0 12px 32px rgba(0,0,0,.08);
}

.form-card h1{ font-size:22px; margin-bottom:6px; text-align:left; }
.form-card .muted{ font-size:14px; color:#6b7280; margin-bottom:24px; }

.card-header{ margin-bottom:20px; }
.card-header h1{ font-size:20px; margin-bottom:5px; text-align:left; }
.muted{ font-size:13px; color:#777; }

/* =========================
   FORM MODERN
========================= */
.form-modern .form-group{ margin-bottom:18px; }
.form-modern label{ display:block; font-weight:600; margin-bottom:6px; }
.form-modern input,
.form-modern select{
  width:100%; padding:10px 12px;
  border-radius:10px; border:1px solid #d1d5db;
  font-size:14px; transition:.2s;
}
.form-modern input:focus,
.form-modern select:focus{
  border-color:#f6b500;
  box-shadow:0 0 0 3px rgba(246,181,0,.15);
  outline:none;
}
.input-disabled{ background:#f3f4f6; color:#888; }
.checkbox-group{ margin-top:10px; }
.checkbox-group label{ display:flex; align-items:center; gap:8px; font-weight:500; }

.form-actions{ margin-top:25px; display:flex; gap:10px; }
.form-actions .btn{ padding:10px 18px; border-radius:10px; }

.alert-error{
  background:#fee2e2; color:#991b1b;
  padding:12px; border-radius:8px; margin-bottom:20px;
}

/* =========================
   BTN VIEW
========================= */
.btn-view{
  display:inline-flex; align-items:center; gap:8px;
  padding:10px 16px; border-radius:12px;
  background:#f59e0b; color:#111827 !important;
  font-weight:700; text-decoration:none !important;
  border:none; transition:all .15s ease;
}
.btn-view:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 22px rgba(0,0,0,.12);
}

/* =========================
   REQUEST CARDS
========================= */
.request-card{
  background:#ffffff; border-radius:16px;
  padding:22px; margin-top:18px;
  border:1px solid #e5e7eb; transition:all .15s ease;
}
.request-card:hover{
  transform:translateY(-2px);
  box-shadow:0 12px 30px rgba(0,0,0,.06);
}

/* =========================
   STATS INLINE
========================= */
.stats-inline{ display:flex; gap:40px; margin:20px 0 30px; font-size:14px; }
.stats-inline strong{ display:block; font-size:20px; }

/* =========================
   ACTIONS BAR
========================= */
.actions-bar{ display:flex; gap:12px; margin-bottom:30px; flex-wrap:wrap; }

/* =========================
   REQUEST LIST
========================= */
.requests-list{ display:flex; flex-direction:column; gap:14px; }

.request-row{
  display:flex; justify-content:space-between; align-items:center;
  padding:18px; border:1px solid #e5e7eb;
  border-radius:14px; background:#fff; transition:all .15s ease;
}
.request-row:hover{ box-shadow:0 8px 20px rgba(0,0,0,.05); }
.request-title{ font-weight:600; font-size:16px; }
.request-meta{ font-size:13px; color:#6b7280; margin-top:4px; }
.request-actions{ display:flex; align-items:center; gap:15px; }

.btn-report{ font-size:13px; font-weight:600; text-decoration:none; color:#2563eb; }
.btn-report:hover{ text-decoration:underline; }

/* =========================
   STATS BAR (portail)
========================= */
.stats-bar{ display:flex; gap:20px; margin:25px 0; flex-wrap:wrap; }
.request-footer{
  margin-top:18px; display:flex;
  justify-content:space-between; align-items:center;
  flex-wrap:wrap; gap:10px;
}

/* =========================
   GOOGLE PLACES
========================= */
.pac-container{ z-index:9999 !important; }
input#address_input::-webkit-contacts-auto-fill-button,
input#address_input::-webkit-credentials-auto-fill-button{
  visibility:hidden; pointer-events:none; position:absolute; right:0;
}
