/**
 * Accounty — app layer on Salezmedia theme (theme_pages)
 * Maps Bootstrap / app markup to theme widgets (well, fin-table, KPI, forms).
 */

body.accounty-app {
  min-height: 100vh;
}

body.accounty-app h1.h3,
body.accounty-app .page-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

/* ─── KPI / stat widgets (dashboard) ─── */
.kpi-card { position: relative; overflow: hidden; }
.kpi-card .kpi-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: #fff; flex-shrink: 0;
}
.kpi-card .kpi-body { flex: 1; }
.kpi-card .kpi-body h2 { font-size: 1.8rem; margin: 0; font-weight: 800; }
.kpi-card .kpi-body p { margin: 0; color: #777; font-size: 13px; }
.kpi-card .kpi-body .kpi-delta {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 700; padding: 2px 9px;
  border-radius: 20px; margin-top: 4px;
}
.delta-up { background: #dcfce7; color: #16a34a; }
.delta-down { background: #fee2e2; color: #dc2626; }
.kpi-card .kpi-inner { display: flex; align-items: center; gap: 16px; }
.kpi-spark { height: 50px; }

.stat-card { text-align: center; }
.stat-card .stat-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 24px; color: #fff; margin-bottom: 10px;
}
.stat-card h3 { font-size: 1.7rem; margin: 0; }
.stat-card span { font-size: 13px; color: #777; }

.section-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.6px; color: #aaa; margin-bottom: 12px;
}

/* ─── Premium tables (fin-table, table-premium) ─── */
.fin-table,
.table-premium,
body.accounty-app main .table:not(.table-borderless) {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.fin-table thead th,
.table-premium thead th,
body.accounty-app main .table thead th {
  background: linear-gradient(135deg, #0d6efd, #0dcaf0);
  color: #fff;
  padding: 10px 14px;
  font-weight: 700;
  border: none;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  vertical-align: middle;
}
.fin-table thead th:first-child,
.table-premium thead th:first-child,
body.accounty-app main .table thead th:first-child {
  border-radius: 10px 0 0 10px;
}
.fin-table thead th:last-child,
.table-premium thead th:last-child,
body.accounty-app main .table thead th:last-child {
  border-radius: 0 10px 10px 0;
}
.fin-table tbody td,
.table-premium tbody td,
body.accounty-app main .table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
  background: rgba(255, 255, 255, 0.55);
  color: #333;
}
.fin-table tbody tr:last-child td,
.table-premium tbody tr:last-child td,
body.accounty-app main .table tbody tr:last-child td {
  border-bottom: none;
}
.fin-table tbody tr:hover td,
.table-premium tbody tr:hover td,
body.accounty-app main .table tbody tr:hover td {
  background: rgba(13, 110, 253, 0.05);
}
body.accounty-app main .table.table-sm thead th,
body.accounty-app main .table.table-sm tbody td {
  padding: 8px 12px;
}
body.accounty-app main .table-light thead th {
  background: linear-gradient(135deg, #0d6efd, #0dcaf0) !important;
  color: #fff !important;
}

.badge-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
}
.badge-active { background: #dcfce7; color: #16a34a; }
.badge-pending { background: #fff7ed; color: #ea580c; }
.badge-inactive { background: #f3f4f6; color: #6b7280; }
.trend-up { color: #16a34a; font-weight: 700; }
.trend-down { color: #dc2626; font-weight: 700; }

/* ─── Bootstrap cards → theme wells ─── */
body.accounty-app main .card {
  background: url(https://storage.perfectcdn.com/cr9uj5/sk9ktl6qkq5zguyh.png);
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  margin-bottom: 0;
}
body.accounty-app main .card > .card-header {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px 16px 0 0;
  padding: 14px 20px;
  font-weight: 700;
  font-size: 1rem;
  color: #000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}
body.accounty-app main .card > .card-body {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 0 0 16px 16px;
  padding: 20px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}
body.accounty-app main .card > .card-header:first-child:last-child,
body.accounty-app main .card > .card-body:only-child {
  border-radius: 16px;
}
body.accounty-app main .card.h-100 {
  height: 100% !important;
}
body.accounty-app main .card.shadow-sm {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08) !important;
}

/* ─── Alerts ─── */
body.accounty-app .alert {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  font-weight: 500;
}
body.accounty-app .alert-success {
  background: rgba(220, 252, 231, 0.85);
  color: #166534;
}
body.accounty-app .alert-danger {
  background: rgba(254, 226, 226, 0.85);
  color: #991b1b;
}

/* ─── Forms ─── */
body.accounty-app .form-label {
  font-size: 13px;
  font-weight: 600;
  color: #444;
}
body.accounty-app .form-control,
body.accounty-app .form-select {
  border-radius: 10px;
  border: 1px solid #e0e7ef;
  background: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  padding: 0.5rem 0.75rem;
}
body.accounty-app .form-control:focus,
body.accounty-app .form-select:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
  background: #fff;
}
body.accounty-app .input-group-text {
  border-radius: 10px 0 0 10px;
  border: 1px solid #e0e7ef;
  background: rgba(255, 255, 255, 0.85);
}

/* ─── Buttons ─── */
body.accounty-app .btn {
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
}
body.accounty-app .btn-primary {
  background: linear-gradient(135deg, #0d6efd, #0dcaf0);
  border: none;
  box-shadow: 0 4px 14px rgba(13, 110, 253, 0.35);
}
body.accounty-app .btn-primary:hover {
  background: linear-gradient(135deg, #0b5ed7, #0aa2c0);
  border: none;
}
body.accounty-app .btn-success {
  background: linear-gradient(135deg, #198754, #20c997);
  border: none;
}
body.accounty-app .btn-danger {
  background: linear-gradient(135deg, #dc3545, #fd7e14);
  border: none;
}
body.accounty-app .btn-outline-primary {
  border-color: #0d6efd;
  color: #0d6efd;
  background: rgba(255, 255, 255, 0.7);
}
body.accounty-app .btn-outline-secondary,
body.accounty-app .btn-outline-danger,
body.accounty-app .btn-outline-warning {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #e0e7ef;
}

/* ─── Breadcrumb ─── */
body.accounty-app .breadcrumb {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.5);
}
body.accounty-app .breadcrumb-item a {
  color: #0d6efd;
  text-decoration: none;
  font-weight: 600;
}

/* ─── Progress bars ─── */
body.accounty-app .progress {
  height: 8px;
  border-radius: 10px;
  background: #e9ecef;
  overflow: hidden;
}
body.accounty-app .progress-bar {
  border-radius: 10px;
}

/* ─── Page toolbar / date filter ─── */
body.accounty-app .page-toolbar {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

/* ─── DataTables plugin ─── */
body.accounty-app .dataTables_wrapper .dataTables_length select,
body.accounty-app .dataTables_wrapper .dataTables_filter input {
  border-radius: 10px;
  border: 1px solid #e0e7ef;
  background: rgba(255, 255, 255, 0.7);
  padding: 6px 10px;
}
body.accounty-app .dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 8px !important;
  margin: 0 2px;
}
body.accounty-app .dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: linear-gradient(135deg, #0d6efd, #0dcaf0) !important;
  color: #fff !important;
  border: none !important;
}

/* ─── Modals (confirm + app) ─── */
body.accounty-app #awConfirmModal .modal-footer {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  padding: 16px 20px;
  margin-top: 10px;
}
body.accounty-app .modal-footer.border-0 {
  background: transparent;
  border: none;
  box-shadow: none;
  margin-top: 0;
  padding-top: 0;
}

/* ─── Nav tabs / pills in content ─── */
body.accounty-app .nav-tabs {
  border-bottom: 2px solid #e0e7ef;
}
body.accounty-app .nav-tabs .nav-link {
  border-radius: 10px 10px 0 0;
  font-weight: 600;
  color: #595959;
  background: rgba(255, 255, 255, 0.5);
  margin-right: 4px;
  box-shadow: none;
  margin-left: 0;
}
body.accounty-app .nav-tabs .nav-link.active {
  background: #66d2ff;
  color: #fff;
  border-color: transparent;
}
body.accounty-app main .nav-pills .nav-link {
  margin-left: 0;
}

/* ─── Portal picker (index.php) ─── */
.page-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.page-nav-card {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.7);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  backdrop-filter: blur(16px);
}
.page-nav-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  color: inherit;
}
.page-nav-card .icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  flex-shrink: 0;
}
.page-nav-card h6 { margin: 0; font-size: 15px; font-weight: 700; }
.page-nav-card small { color: #666; font-size: 12px; }

.hero-greeting h1 { font-size: 2.4rem; font-weight: 800; margin: 0; }
.hero-greeting p { color: #555; margin-top: 6px; font-size: 15px; }

/* ─── Login standalone ─── */
body.accounty-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
body.accounty-login .login-well {
  max-width: 420px;
  width: 100%;
}

/* ─── Print ─── */
/* ─── Legacy metric-card widgets → theme glass cards ─── */
body.accounty-app .metric-card {
  background: rgba(255, 255, 255, 0.55) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}
body.accounty-app .metric-card .text-muted.small {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #888 !important;
}
body.accounty-app .metric-card .fs-4,
body.accounty-app .metric-card .fs-5 {
  font-weight: 800;
  font-family: "Outfit", sans-serif;
}

/* ─── List group, badges, dropdown in content ─── */
body.accounty-app .list-group-item {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(255, 255, 255, 0.7);
}
body.accounty-app .badge {
  font-weight: 700;
  border-radius: 20px;
}
body.accounty-app .form-check-input:checked {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

@media print {
  body.accounty-app .navbar.usernav,
  body.accounty-app .offcanvas.sidebar,
  body.accounty-app .hamburget,
  body.accounty-app .page-toolbar,
  body.accounty-app .btn {
    display: none !important;
  }
  body.accounty-app main {
    padding: 0 !important;
  }
}
