/* ============================================================
   Shared portal admin styles (dashboard, tables, auth, etc.)
   Theme colors come from portal-specific CSS via CSS variables.
   ============================================================ */

/* ---- Layout ---- */
body.portal-minarm,
body.portal-gn,
body.portal-partner {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content.content {
  padding-top: 80px;
  flex: 1 0 auto;
}

.portal-footer,
.main-foot {
  flex-shrink: 0;
  background: var(--portal-nav-bg, var(--portal-primary));
  padding: 20px 0;
}

.portal-footer h4,
.main-foot h4 {
  margin: 0;
  color: var(--portal-nav-text, #ffffff);
  font-size: 14px;
  font-weight: 600;
  opacity: 0.85;
}

.title--h2, h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--portal-primary);
  margin: 0 0 8px;
  padding: 10px 0 20px;
  text-transform: none;
  letter-spacing: normal;
}

/* ---- Dashboard / home page ---- */
.dashboard-header {
  text-align: center;
  padding: 30px 0 20px;
}

.dashboard-header .portal-badge {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.dashboard-header .portal-badge img {
  height: 50px;
  width: auto;
}

.dashboard-header .portal-badge-sep {
  width: 1px;
  height: 40px;
  background: #ccc;
}

.dashboard-header .portal-badge-nxt {
  height: 36px !important;
}

.dashboard-header h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--portal-primary);
  margin: 0 0 8px;
}

.dashboard-header .dashboard-subtitle {
  color: #666;
  font-size: 15px;
  max-width: 500px;
  margin: 0 auto;
}

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  padding: 10px 0 40px;
}

.dashboard-card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid var(--portal-card-border);
  padding: 24px;
  transition: box-shadow 0.2s, transform 0.15s;
  text-decoration: none !important;
  display: block;
  color: inherit !important;
}

.dashboard-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  transform: translateY(-2px);
  border-color: var(--portal-accent-light);
}

.dashboard-card .card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--portal-bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-size: 20px;
  color: var(--portal-accent);
}

.dashboard-card .card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--portal-primary);
  margin-bottom: 6px;
}

.dashboard-card .card-desc {
  font-size: 13px;
  color: #777;
  line-height: 1.5;
}

.dashboard-welcome {
  background: var(--portal-bg-subtle);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 24px;
  border-left: 4px solid var(--portal-accent);
}

.dashboard-welcome p {
  margin: 0;
  color: #555;
  font-size: 14px;
  line-height: 1.6;
}

/* ============================================================
   Admin tables (manage, invoices, movers)
   ============================================================ */

.sf_admin_list .table {
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.sf_admin_list .table thead th {
  background: var(--portal-primary);
  color: #fff;
  font-weight: 400;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 12px 14px;
  border: none;
  white-space: nowrap;
}

.sf_admin_list .table thead th a {
  color: #fff !important;
  text-decoration: none;
}

.sf_admin_list .table thead th a:hover {
  text-decoration: underline;
}

.sf_admin_list .table tbody td {
  padding: 10px 14px;
  font-size: 13px;
  border-top: 1px solid #f0f0f0;
  vertical-align: middle;
}

.sf_admin_list .table tbody tr:hover td {
  background: var(--portal-bg-subtle);
}

.sf_admin_list .table tbody tr.odd td {
  background: #fafbfc;
}

.sf_admin_list .table tbody tr.odd:hover td {
  background: var(--portal-bg-subtle);
}

.sf_admin_list .table tfoot th {
  background: #f8fafc;
  font-size: 13px;
  font-weight: 500;
  color: #666;
  padding: 12px 14px;
  border-top: 2px solid #e2e8f0;
}

.sf_admin_list h3 {
  color: #999;
  font-size: 16px;
  font-weight: 500;
  padding: 30px 0;
}

/* ---- Pagination ---- */
.sf_admin_pagination {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 16px;
}

.sf_admin_pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--portal-primary);
  text-decoration: none !important;
  transition: background 0.15s;
}

.sf_admin_pagination a:hover {
  background: var(--portal-bg-subtle);
}

.sf_admin_pagination a i.fas {
  font-size: 11px;
  border: none !important;
  padding: 0;
}

.sf_admin_pagination span.color-green {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  background: var(--portal-accent);
  color: #fff !important;
}

.sf_admin_filter {
  margin: 10px 0;
}

.sf_admin_filter .form-group {
  margin-bottom: 8px;
}

.sf_admin_filter label {
  font-size: 12px;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.sf_admin_filter .form-control {
  border-radius: 6px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  padding: 6px 10px;
}

.sf_admin_filter .form-control:focus {
  border-color: var(--portal-accent);
  box-shadow: 0 0 0 2px var(--portal-accent-glow);
}

.sf_admin_filter .btn--submit {
  background: var(--portal-accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 18px;
  font-weight: 600;
  font-size: 13px;
}

.sf_admin_filter .btn--submit:hover {
  background: var(--portal-accent-light);
}

/* ---- Admin page titles ---- */
.sf_admin_list + .sf_admin_actions,
#sf_admin_content .sf_admin_actions {
  list-style: none;
  padding: 16px 0;
}

#sf_admin_content h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--portal-primary);
  margin-bottom: 4px;
}

/* ---- Export button ---- */
#startExport {
  background: var(--portal-accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

#startExport:hover {
  background: var(--portal-accent-light);
}

/* ---- Status select in manage ---- */
.status-select {
  border-radius: 6px;
  border: 1px solid #d1d5db;
  font-size: 13px;
  padding: 4px 8px;
}

/* ============================================================
   Client search page
   ============================================================ */

.content h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--portal-primary);
  margin-bottom: 20px;
}

.form-search.form-inline {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 24px;
}

.form-inline .control-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #555;
}

.form-inline .form-control {
  border-radius: 6px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

.form-inline .form-control:focus {
  border-color: var(--portal-accent);
  box-shadow: 0 0 0 2px var(--portal-accent-glow);
}

.form-inline .btn--submit {
  background: var(--portal-accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 18px;
  font-weight: 600;
  font-size: 13px;
}

.form-inline .btn--submit:hover {
  background: var(--portal-accent-light);
}

/* Search results table */
.table-responsive .table.table-hover {
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.table-responsive .table.table-hover thead th {
  background: var(--portal-primary);
  color: #fff;
  font-weight: 400;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 12px 14px;
  border: none;
}

.table-responsive .table.table-hover tbody td {
  padding: 10px 14px;
  font-size: 13px;
  border-top: 1px solid #f0f0f0;
}

.table-responsive .table.table-hover tbody tr.result:hover td {
  background: var(--portal-bg-subtle);
}

/* ============================================================
   Client interface (/gestion/client) — section panels
   ============================================================ */

.section_group {
  background: #f8f8f8 !important;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
  margin: 16px 0;
  padding: 24px;
  border-radius: 10px;
}

h3.section {
  color: var(--portal-primary);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* Breadcrumb */
.content h5 {
  font-size: 13px;
  color: #888;
  margin-bottom: 16px;
}

.content h5 a {
  color: var(--portal-accent);
  text-decoration: none;
}

.content h5 a:hover {
  text-decoration: underline;
}

/* Tables inside client interface */
.section_group .table {
  border: 1px solid #e8edf2;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0;
}

.section_group .table thead th {
  background: #f1f5f9;
  color: var(--portal-primary);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 10px 12px;
  border-bottom: 2px solid #e2e8f0;
}

.section_group .table tbody td {
  padding: 9px 12px;
  font-size: 13px;
  border-top: 1px solid #f0f3f6;
}

.section_group .table tbody tr:hover td {
  background: #f8fafc;
}

/* NS-input improvements */
.ns-input input.form-control {
  border-radius: 6px;
}

.ns-input button {
  border-radius: 6px;
  font-size: 12px;
}

/* Modal improvements */
.modal-content {
  border-radius: 10px;
  border: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.modal-header {
  border-bottom: 1px solid #e8edf2;
  padding: 16px 20px;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  border-top: 1px solid #e8edf2;
  padding: 16px 20px;
}

/* ============================================================
   Auth pages (403 denied, standalone sign-in layout)
   ============================================================ */

body.portal-admin {
  --portal-primary: #253163;
  --portal-accent: #2563eb;
  --portal-accent-light: #1d4ed8;
  --portal-bg-subtle: #f4f5f7;
  --portal-card-border: #e5e7eb;
  --portal-accent-glow: rgba(37, 99, 235, 0.15);
}

body.portal-admin,
body.portal-minarm,
body.portal-gn,
body.portal-partner {
  --admin-auth-text: #374151;
  --admin-auth-muted: #6b7280;
  --admin-auth-danger-bg: #fef2f2;
  --admin-auth-danger-border: #fecaca;
  --admin-auth-danger-text: #b91c1c;
  --admin-auth-primary: var(--portal-primary);
  --admin-auth-accent: var(--portal-accent);
  --admin-auth-accent-hover: var(--portal-accent-light);
  --admin-auth-bg: var(--portal-bg-subtle);
  --admin-auth-border: var(--portal-card-border);
}

body.admin-auth-body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--admin-auth-text);
  background: var(--admin-auth-bg);
  min-height: 100vh;
}

.admin-auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  box-sizing: border-box;
}

.admin-auth-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(37, 49, 99, 0.08);
  border: 1px solid var(--admin-auth-border);
  padding: 36px 32px;
}

.admin-auth-card--wide {
  max-width: 480px;
}

.admin-auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.admin-auth-logo img {
  height: 40px;
  width: auto;
}

.admin-auth-logo-sep {
  width: 1px;
  height: 32px;
  background: #d1d5db;
}

.admin-auth-logo-nxt {
  height: 32px;
}

.admin-auth-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  color: var(--admin-auth-primary);
  text-align: center;
}

.admin-auth-subtitle {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--admin-auth-muted);
  text-align: center;
}

.admin-auth-alert {
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 13px;
}

.admin-auth-alert--error {
  background: var(--admin-auth-danger-bg);
  border: 1px solid var(--admin-auth-danger-border);
  color: var(--admin-auth-danger-text);
}

.admin-auth-alert--success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
}

.admin-auth-field {
  margin-bottom: 16px;
}

.admin-auth-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--admin-auth-text);
}

.admin-auth-field input[type="text"],
.admin-auth-field input[type="password"],
.admin-auth-field input[type="email"] {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}

.admin-auth-field input:focus {
  border-color: var(--admin-auth-accent);
  box-shadow: 0 0 0 3px var(--portal-accent-glow, rgba(37, 99, 235, 0.15));
}

.admin-auth-field .error_list,
.admin-auth-card .error_list {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  color: var(--admin-auth-danger-text);
  font-size: 12px;
}

.admin-auth-field .error_list li,
.admin-auth-card .error_list li {
  color: var(--admin-auth-danger-text);
}

.admin-auth-field .error,
.admin-auth-card .error {
  display: block;
  margin-top: 6px;
  color: var(--admin-auth-danger-text);
  font-size: 12px;
}

.admin-auth-actions {
  margin-top: 24px;
}

.admin-auth-btn {
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
  padding: 11px 16px;
  border: none;
  border-radius: 8px;
  background: var(--admin-auth-accent);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.admin-auth-btn:hover {
  background: var(--admin-auth-accent-hover);
  color: #ffffff;
  text-decoration: none;
}

.admin-auth-btn--secondary {
  background: #ffffff;
  color: var(--admin-auth-primary);
  border: 1px solid var(--admin-auth-border);
}

.admin-auth-btn--secondary:hover {
  background: #f9fafb;
  color: var(--admin-auth-primary);
}

.admin-auth-links {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
}

.admin-auth-links a {
  color: var(--admin-auth-muted);
  text-decoration: none;
}

.admin-auth-links a:hover {
  color: var(--admin-auth-accent);
  text-decoration: underline;
}

.admin-auth-actions-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-auth-user {
  margin: 16px 0;
  padding: 12px 14px;
  background: #f9fafb;
  border: 1px solid var(--admin-auth-border);
  border-radius: 8px;
  font-size: 13px;
}

.admin-auth-user strong {
  color: var(--admin-auth-primary);
}

.admin-auth-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
}

.admin-auth-icon--denied {
  background: var(--admin-auth-danger-bg);
  color: var(--admin-auth-danger-text);
}

.admin-auth-help {
  margin: 0;
  font-size: 13px;
  color: var(--admin-auth-muted);
  text-align: center;
}

.admin-auth-list {
  margin: 12px 0;
  padding-left: 20px;
  font-size: 13px;
  color: var(--admin-auth-muted);
}

.admin-auth-list li + li {
  margin-top: 4px;
}
