:root {
  --cash-green: #00d54b;
  --cash-green-dark: #00b341;
  --cash-bg: #0a0e17;
  --cash-sidebar: #0f1420;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.admin-app {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  overflow-x: hidden;
}

.login-page {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: #f5f5f7;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

.login-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.login-bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
}

.login-bg-blob--1 {
  width: 420px;
  height: 420px;
  background: #00d54b;
  top: -120px;
  right: -80px;
}

.login-bg-blob--2 {
  width: 320px;
  height: 320px;
  background: #86efac;
  bottom: -100px;
  left: -60px;
}

.login-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  min-width: 0;
}

.login-card {
  background: #fff;
  border-radius: 24px;
  padding: 32px 28px 28px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.login-card-notch {
  width: 48px;
  height: 5px;
  background: #e5e7eb;
  border-radius: 999px;
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
}

.login-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #f0fdf4;
  color: #00b341;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 999px;
  margin: 0 auto 20px;
  width: fit-content;
}

.login-brand-box {
  text-align: center;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
}

.login-brand-box img {
  border-radius: 12px;
}

.login-brand-title {
  margin-top: 10px;
  font-size: 22px;
  font-weight: 900;
  color: #030712;
  letter-spacing: -0.02em;
}

.login-brand-sub {
  font-size: 14px;
  color: #9ca3af;
  font-weight: 700;
  margin-top: 2px;
}

.login-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 20px;
}

.login-alert svg {
  flex-shrink: 0;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  min-width: 0;
}

.login-field {
  width: 100%;
  min-width: 0;
}

.login-field label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 8px;
}

.login-input-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
}

.login-input-wrap input {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 2px solid #e5e7eb;
  border-radius: 999px;
  padding: 14px 48px 14px 46px;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.login-input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #00b341;
  pointer-events: none;
  z-index: 1;
}

.login-input-wrap input::placeholder {
  color: #d1d5db;
  font-weight: 600;
}

.login-input-wrap input:focus {
  border-color: #00d54b;
  box-shadow: 0 0 0 4px rgba(0, 213, 75, 0.12);
}

.login-toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.login-toggle-pw:hover {
  color: #00b341;
}

.login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
  border: none;
  border-radius: 999px;
  padding: 16px;
  background: #00d54b;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.02em;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(0, 213, 75, 0.35);
  transition: background 0.15s, transform 0.1s, opacity 0.15s;
}

.login-submit:hover {
  background: #00c044;
}

.login-submit:active {
  transform: scale(0.98);
}

.login-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.login-footer {
  text-align: center;
  margin: 24px 0 0;
  font-size: 13px;
  color: #9ca3af;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-footer-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid #d1d5db;
  display: inline-block;
}

/* legacy aliases removed — login uses classes above */

.btn-cash {
  background: var(--cash-green);
  border: none;
  color: #fff;
  font-weight: 800;
  border-radius: 999px;
  padding: 12px 16px;
  width: 100%;
  box-shadow: 0 0 20px rgba(0, 213, 75, 0.35);
}

.btn-cash:hover {
  background: #00c044;
  color: #fff;
}

.login-error {
  color: #dc2626;
  font-size: 0.875rem;
  margin-bottom: 12px;
  text-align: center;
  font-weight: 700;
}

.main-sidebar.sidebar-dark-primary {
  background: var(--cash-sidebar) !important;
}

.main-sidebar .brand-link {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.main-sidebar .brand-link .brand-image {
  border-radius: 12px !important;
  opacity: 1 !important;
}

.main-sidebar .brand-text {
  font-weight: 800 !important;
  color: #fff !important;
}

.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active,
.sidebar-dark-primary .nav-sidebar .nav-link.active {
  background: var(--cash-green) !important;
  color: #fff !important;
}

.navbar-white {
  border-bottom: 1px solid #eef0f3;
}

.main-header .nav-link {
  font-size: 14px;
  font-weight: 700;
}

.stat-card {
  border: none;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 900;
  color: #111827;
}

.stat-card .stat-label {
  color: #6b7280;
  font-weight: 700;
  font-size: 0.875rem;
}

.stat-card.stat-paid .stat-value { color: var(--cash-green-dark); }

.table-invoices {
  font-size: 14px;
}

.table-invoices th,
.table-invoices td,
.table-invoices code,
.table-invoices a {
  font-size: 14px;
  font-weight: 400;
  text-align: center;
  vertical-align: middle;
}

.table-invoices th {
  color: #6b7280;
  border-top: none;
}

.table-actions {
  white-space: nowrap;
}

.table-actions .btn-icon {
  width: 26px;
  height: 26px;
  padding: 0;
  margin: 0 0.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  line-height: 1;
  vertical-align: middle;
}

.table-actions .btn-icon i {
  font-size: 12px;
}

.table-actions .btn-icon:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.user-status-ban {
  max-width: 220px;
  white-space: normal;
  word-break: break-word;
  font-weight: 400;
  line-height: 1.4;
  padding: 0.35em 0.6em;
}

.admin-detail-table {
  font-size: 14px;
}

.admin-detail-table th,
.admin-detail-table td {
  font-size: 14px;
  font-weight: 400;
  vertical-align: middle;
}

.admin-detail-table th {
  width: 130px;
  color: #6b7280;
  background: #f9fafb;
}

.admin-detail-table td {
  word-break: break-all;
}

.form-control:focus {
  border-color: var(--cash-green);
  box-shadow: 0 0 0 0.2rem rgba(0, 213, 75, 0.15);
}

.btn-cash.btn-sm {
  width: auto;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
}

.modal-footer .btn-cash {
  width: auto;
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  box-shadow: none;
}

.btn-settings-save {
  width: auto;
  padding: 0.5rem 1.25rem;
  box-shadow: none;
}


.content-header h1 {
  font-weight: 900;
}

.admin-app .content {
  padding-top: 0.75rem;
}

/* List pages: toolbar + pagination fixed, only table body scrolls */
body.admin-app.layout-fixed.layout-navbar-fixed {
  height: 100vh;
  overflow: hidden;
}

body.admin-app.layout-fixed.layout-navbar-fixed .content-wrapper {
  height: calc(100vh - (3.5rem + 1px));
  max-height: calc(100vh - (3.5rem + 1px));
  overflow: hidden;
}

body.admin-app.layout-fixed.layout-navbar-fixed .content-wrapper > .content.admin-content-list {
  height: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

body.admin-app.layout-fixed.layout-navbar-fixed .content-wrapper > .content.admin-content-list > .container-fluid.admin-container-list {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0.75rem;
}

.admin-list-page {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-list-page--with-stats > .row {
  flex: 0 0 auto;
}

.admin-list-page--with-stats > .admin-list-card {
  margin-top: 1rem;
}

.admin-list-card {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-bottom: 0;
}

.admin-list-toolbar {
  flex: 0 0 auto;
}

.admin-list-toolbar .card-title {
  float: none;
  margin-bottom: 0;
}

.admin-list-toolbar .form-inline.w-100 {
  width: 100%;
}

.admin-list-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-left: auto;
  flex-shrink: 0;
}

@media (max-width: 575.98px) {
  .admin-list-toolbar .form-inline.w-100 .admin-list-toolbar-actions {
    width: 100%;
    margin-left: 0;
  }
}

.admin-list-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-list-scroll .table {
  margin-bottom: 0;
}

.admin-list-scroll .table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  box-shadow: inset 0 -1px 0 #dee2e6;
}

.admin-list-footer {
  flex: 0 0 auto;
}

.admin-list-search {
  min-width: 180px;
  max-width: 280px;
}

/* ── Responsive ── */

@media (max-width: 991.98px) {
  .content-wrapper,
  .main-footer {
    margin-left: 0 !important;
  }

  .main-header .nav-link {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

@media (max-width: 767.98px) {
  .content-header {
    padding: 12px 0.5rem;
  }

  .content-header h1 {
    font-size: 1.35rem;
  }

  .content {
    padding: 0 0.5rem 1rem;
  }

  .stat-card {
    margin-bottom: 12px;
  }

  .stat-card .stat-value {
    font-size: 1.5rem;
  }

  .stat-card .card-body {
    padding: 1rem;
  }

  .table-invoices th,
  .table-invoices td {
    white-space: nowrap;
  }

  .admin-user-full {
    display: none !important;
  }

  .admin-user-short {
    display: inline !important;
  }
}

@media (min-width: 768px) {
  .admin-user-short {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .login-page {
    padding: 20px 12px;
    align-items: flex-start;
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }

  .login-bg-blob--1 {
    width: 280px;
    height: 280px;
    top: -80px;
    right: -60px;
  }

  .login-bg-blob--2 {
    width: 220px;
    height: 220px;
    bottom: -70px;
    left: -40px;
  }

  .login-card {
    padding: 26px 18px 22px;
    border-radius: 20px;
  }

  .login-brand-title {
    font-size: 20px;
  }

  .login-input-wrap input {
    padding: 13px 44px 13px 42px;
    font-size: 16px;
  }

  .login-submit {
    font-size: 16px;
    padding: 15px;
    min-height: 48px;
  }

  .login-footer {
    font-size: 12px;
    margin-top: 20px;
  }
}

@media (max-width: 360px) {
  .login-badge {
    font-size: 12px;
    padding: 5px 12px;
  }

  .login-brand-box {
    padding: 16px;
  }
}
