/* =========================================================
   SYBIOCARE - PAGE: tickets (THEME V3 WHITE / EPURÉ)
   Path: ./assets/css/pages/tickets.css
========================================================= */

/* Page */
.tickets-page{
  padding: 0; /* ✅ le main gère déjà le padding */
}

.tickets-container{
  width:100%;
}

/* Top header */
.page-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:16px;
  margin-bottom:18px;
  flex-wrap:wrap;
}

.page-header-text h1{
  font-size:30px;
  font-weight:900;
  letter-spacing:-0.02em;
  line-height:1.1;
  color: var(--text-main, #0f172a);
  margin:0;
}

.page-header-text p{
  color: var(--text-sub, #64748b);
  font-size:14px;
  margin:6px 0 0 0;
  font-weight:600;
}

.page-header-actions{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

/* Search */
.tickets-search{
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid var(--border, #e8eef6);
  outline:none;
  width: 280px;
  box-sizing:border-box;
  background:#fff;
  color: var(--text-main, #0f172a);
  font-size:14px;
  transition: border .15s ease, box-shadow .15s ease;
}

.tickets-search::placeholder{ color:#94a3b8; }

.tickets-search:focus{
  border-color:#cbd5e1;
  box-shadow: 0 0 0 4px rgba(15,23,42,.06);
}

/* Tabs */
.tickets-tabs{
  display:flex;
  gap:14px;
  margin-bottom:14px;
  border-bottom: 1px solid var(--border-2, #eef2f7);
  padding-bottom: 8px;
}

.tab{
  background:none;
  border:none;
  cursor:pointer;
  font-size:13px;
  font-weight:900;
  color: var(--text-sub, #64748b);
  padding: 8px 2px;
  border-bottom:2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}

.tab:hover{ color: var(--text-main, #0f172a); }

.tab.is-active{
  color: var(--text-main, #0f172a);
  border-bottom-color:#0f172a;
}

/* Table wrapper */
.table-wrapper{
  background: var(--panel, #fff);
  border-radius: var(--radius, 16px);
  border: 1px solid var(--border, #e8eef6);
  overflow:hidden;
  box-shadow: var(--shadow-xs, 0 1px 6px rgba(15,23,42,.05));
}

.tickets-table{
  width:100%;
  border-collapse:collapse;
  text-align:left;
  font-size:14px;
  background:#fff;
}

.tickets-table thead tr{
  background:#fafcff;
  border-bottom:1px solid var(--border-2, #eef2f7);
}

.tickets-table th{
  padding:13px 16px;
  color: var(--text-sub, #64748b);
  font-weight:900;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.tickets-table td{
  padding:15px 16px;
  border-bottom:1px solid var(--border-2, #eef2f7);
  vertical-align:middle;
  color: var(--text-main, #0f172a);
}

.tickets-table tbody tr:hover{
  background:#fbfdff;
}

.tickets-table tbody tr:last-child td{
  border-bottom:none;
}

.th-center{ text-align:center; }

/* =========================================================
   MODALS (V3)
========================================================= */
.modal{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(15,23,42,0.45); /* ✅ plus premium */
  z-index:10000;
  align-items:center;
  justify-content:center;
  padding:16px;
}

.modal-card{
  background:#fff;
  width:100%;
  max-width:560px;
  border-radius: 18px;
  overflow:hidden;
  box-shadow: 0 30px 70px rgba(15,23,42,.22);
  border: 1px solid rgba(255,255,255,.35);
}

.modal-card-lg{ max-width:680px; }

.modal-head{
  padding:16px 18px;
  border-bottom:1px solid var(--border-2, #eef2f7);
  display:flex;
  justify-content:space-between;
  align-items:center;
  background:#fff; /* ✅ head blanc */
}

.modal-head h2{
  margin:0;
  font-size:14px;
  font-weight:900;
  letter-spacing:.02em;
  color:#0f172a;
}

/* (tu peux garder tes classes, mais elles deviennent soft) */
.modal-head-light{ background:#fff; color:#0f172a; }
.modal-head-dark{ background:#fff; color:#0f172a; }

.modal-close{
  width:36px;
  height:36px;
  border-radius:12px;
  border:1px solid var(--border, #e8eef6);
  background:#fff;
  cursor:pointer;
  color:#64748b;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
}

.modal-close:hover{ background:#f8fafc; }
.modal-close-invert{ color:#64748b; }

.modal-body{
  padding:18px;
}

/* Grid */
.grid-2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}

/* Meta blocks */
.meta-block label,
.block label{
  display:block;
  font-size:11px;
  font-weight:900;
  color:#64748b;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.meta-block p{
  font-size:14px;
  font-weight:800;
  margin:6px 0 0 0;
  color:#0f172a;
}

.pill{
  display:inline-flex;
  align-items:center;
  margin-top:8px;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  background:#f3f6fb;
  border:1px solid var(--border, #e8eef6);
  color:#0f172a;
}

.mt-16{ margin-top:14px; }

.desc-box{
  background:#fafcff;
  border:1px solid var(--border, #e8eef6);
  padding:14px;
  border-radius:16px;
  font-size:13px;
  margin-top:8px;
  line-height:1.5;
  color:#0f172a;
}

/* Fields */
.field label{
  display:block;
  font-size:11px;
  font-weight:900;
  color:#64748b;
  text-transform:uppercase;
  letter-spacing:.06em;
  margin-bottom:6px;
}

.field input,
.field select,
.field textarea{
  width:100%;
  padding:11px 12px;
  border-radius:14px;
  border:1px solid var(--border, #e8eef6);
  outline:none;
  box-sizing:border-box;
  background:#fff;
  font-family:inherit;
  font-size:14px;
  color:#0f172a;
  transition: border .15s ease, box-shadow .15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus{
  border-color:#cbd5e1;
  box-shadow: 0 0 0 4px rgba(15,23,42,.06);
}

.field textarea{ resize:none; min-height:110px; }

/* Modal actions */
.modal-actions{
  border-top:1px solid var(--border-2, #eef2f7);
  padding-top:14px;
  margin-top:14px;
  display:flex;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

.modal-actions-split{ justify-content:flex-end; }
.modal-actions-split #btnDeleteTicket{ margin-right:auto; }

/* Buttons (fallback local V3) */
.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  text-decoration:none;
  border:none;
  cursor:pointer;
  border-radius:14px;
  font-weight:900;
  padding:10px 14px;
  font-size:14px;
  transition: transform .08s ease, opacity .15s ease, background .15s ease;
}
.btn:active{ transform: translateY(1px); }

.btn-primary{
  background:#0f172a;
  color:#fff;
  box-shadow: 0 10px 20px rgba(15,23,42,.12);
}
.btn-primary:hover{ opacity:.92; }

.btn-light{
  background:#fff;
  border:1px solid var(--border, #e8eef6);
  color:#0f172a;
}
.btn-light:hover{ background:#f8fafc; }

/* On neutralise les anciens styles "accent/success" */
.btn-accent,
.btn-success{
  background:#0f172a;
  color:#fff;
}

.btn-danger-soft{
  border:1px solid #fee2e2;
  background:#fff7f7;
  color:#ef4444;
}

/* Responsive */
@media (max-width: 900px){
  .tickets-search{ width:100%; min-width:260px; }
  .grid-2{ grid-template-columns:1fr; }
}