/* custom.css */

/* -------------------------------------------------
   Base
   ------------------------------------------------- */
body {
  background-color: #f4f4f4;
  font-family: "Open Sans", sans-serif;
  margin: 0;
}

/* -------------------------------------------------
   Navbar / Sidebar (light touch, keep AdminLTE)
   ------------------------------------------------- */
.main-header.navbar-dark .navbar-nav .nav-link {
  color: #fff;
  font-weight: 400;
}

/* Sidebar */
.sidebar {
  background-color: #343a40;
  color: #fff;
}

.sidebar a {
  color: #c2c7d0;
}

.sidebar a:hover {
  background-color: #1e282c;
}

/* -------------------------------------------------
   Layout spacing
   ------------------------------------------------- */
.content-wrapper .content,
.content-wrapper .content-header {
  padding-left: 20px;
  padding-right: 20px;
}

/* -------------------------------------------------
   Cards
   ------------------------------------------------- */
.card {
  border-radius: 0.5rem;
}

.card .card-header {
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
}

/* -------------------------------------------------
   Footer
   ------------------------------------------------- */
.main-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding: 12px 16px;
}

.main-footer a:hover {
  text-decoration: underline;
}

/* -------------------------------------------------
   Tables (AdminLTE + DataTables)
   ------------------------------------------------- */
table.dataTable thead th,
.table td,
.table th {
  vertical-align: middle;
}

.table .badge {
  font-size: 0.85rem;
  padding: 0.35em 0.55em;
}

/* -------------------------------------------------
   Domains: AdminLTE "Application Button"
   ------------------------------------------------- */
.domains-app-btn {
  text-decoration: none !important;
  color: #fff !important;
  box-shadow: none;
  border: 0;
}

.domains-app-btn:hover,
.domains-app-btn:focus {
  text-decoration: none !important;
  color: #fff !important;
  filter: brightness(0.97);
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08);
}

.domains-app-btn i {
  color: #fff;
}

/* -------------------------------------------------
   Info-box text
   ------------------------------------------------- */
.info-box .info-box-text {
  font-size: 1rem;
  font-weight: 600;
}

.domains-actions {
  gap: 12px;
  align-items: flex-start;
}

.domains-action-btn {
  width: 72px;
  height: 72px;
  padding: 0;
}

.domains-action-btn.btn-app {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: normal;
}

.domains-action-btn.btn-app i {
  font-size: 1.4rem;
}

.domains-action-btn.btn-app:hover {
  transform: none;
  box-shadow: none;
  opacity: 0.92;
}

/* -------------------------------------------------
   Dashboard
   ------------------------------------------------- */
.dashboard-top-info .info-box {
  min-height: 100px;
}

.dashboard-top-info .info-box-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dashboard-subline {
  line-height: 1.2;
  margin-top: 4px;
}

/* -------------------------------------------------
   Order domain page
   ------------------------------------------------- */
.action-badges {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.premium-mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  background-color: #f1f3f5;
  border: 1px solid #d6d8db;
  color: #495057;
}

.premium-mini i {
  font-size: 12px;
  opacity: 0.85;
}

/* -------------------------------------------------
   Order paid page
   ------------------------------------------------- */
.page-order-paid .success-icon-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(40, 167, 69, 0.10);
}

.page-order-paid .success-icon {
  font-size: 1.9rem;
  line-height: 1;
}

.page-order-paid .success-icon-wrap.subtle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(40, 167, 69, 0.08);
}

.page-order-paid .success-icon.subtle {
  font-size: 0.85rem;
  line-height: 1;
}

.page-order-paid .summary-card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.5rem;
  background: #fff;
  height: 100%;
}

.page-order-paid .summary-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(0, 0, 0, 0.55);
  margin-bottom: 0.35rem;
}

.page-order-paid .summary-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #212529;
  word-break: break-word;
}

.page-order-paid .summary-status {
  display: inline-block;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  background: rgba(40, 167, 69, 0.12);
  color: #1e7e34;
}

.page-order-paid .next-step-card {
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.page-order-paid .action-buttons .btn {
  min-width: 170px;
}

/* -------------------------------------------------
   Orders / Invoices / Transactions tables
   ------------------------------------------------- */
.doc-cell-line {
  line-height: 1.3;
}

.doc-cell-line + .doc-cell-line {
  margin-top: 4px;
}

#ordersTable_wrapper .dataTables_length,
#ordersTable_wrapper .dataTables_filter,
#invoice-table_wrapper .dataTables_length,
#invoice-table_wrapper .dataTables_filter,
#transactionsTable_wrapper .dataTables_length,
#transactionsTable_wrapper .dataTables_filter {
  padding: 0.75rem 1rem 0.5rem 1rem;
}

#ordersTable_wrapper .dataTables_info,
#ordersTable_wrapper .dataTables_paginate,
#invoice-table_wrapper .dataTables_info,
#invoice-table_wrapper .dataTables_paginate,
#transactionsTable_wrapper .dataTables_info,
#transactionsTable_wrapper .dataTables_paginate {
  padding: 0.75rem 1rem;
}

#ordersTable_wrapper .dataTables_filter input,
#invoice-table_wrapper .dataTables_filter input,
#transactionsTable_wrapper .dataTables_filter input {
  margin-left: 0.5rem;
}

#ordersTable_wrapper .dataTables_length select,
#invoice-table_wrapper .dataTables_length select,
#transactionsTable_wrapper .dataTables_length select {
  margin: 0 0.35rem;
}

/* -------------------------------------------------
   Order details / wallet funding details shared
   ------------------------------------------------- */
.order-detail-meta-card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.35rem;
  background: #fff;
  height: 100%;
}

.order-detail-meta-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(0, 0, 0, 0.55);
  margin-bottom: 0.35rem;
}

.order-detail-meta-value {
  font-size: 1.05rem;
  font-weight: 600;
  color: #212529;
  word-break: break-word;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.doc-info-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

/* -------------------------------------------------
   Order payment method page
   ------------------------------------------------- */
.pm-hint {
  font-size: 0.9rem;
  margin-top: 0.35rem;
  color: #6c757d;
  font-weight: 400;
}

.pm-amount-negative {
  color: #dc3545;
}

.pm-subinfo {
  font-size: 0.9rem;
  line-height: 1.45;
  margin-top: 0.45rem;
  color: #6c757d;
  font-weight: 400;
}

.pm-subinfo > div {
  margin-bottom: 0.2rem;
}

.pm-subinfo > div:last-child {
  margin-bottom: 0;
}

.summary-grid .row {
  margin-left: 0;
  margin-right: 0;
}

.summary-grid .row > div {
  padding-left: 0;
  padding-right: 0;
}

.summary-label {
  flex: 0 0 62%;
  max-width: 62%;
  text-align: right;
  padding-right: 0.75rem;
}

.summary-value {
  flex: 0 0 38%;
  max-width: 38%;
  text-align: right;
  white-space: nowrap;
}

#orderSummaryCard .card-footer {
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.10);
}

#orderSummaryCard .card-footer hr {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin: 0.5rem 0;
}

#orderSummaryCard .card-footer .text-muted {
  color: rgba(0, 0, 0, 0.55) !important;
}

#orderSummaryCard .card-footer .summary-total {
  padding-top: 0.25rem;
  font-size: 1.05rem;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  margin-left: 0.4rem;
  font-size: 0.72rem;
  color: #fff;
  vertical-align: middle;
  cursor: help;
}

.status-indicator.status-ok {
  background: #28a745;
}

.status-indicator.status-warn {
  background: #f0ad4e;
}

.status-indicator.status-bad {
  background: #dc3545;
}

.payment-method-label {
  display: inline-block;
  width: calc(100% - 1.5rem);
}

/* -------------------------------------------------
   Wallet top-up page
   ------------------------------------------------- */
.wallet-amount-card .preset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.wallet-amount-preview {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.35rem;
  background: #f8f9fa;
  padding: 1rem 1.25rem;
}

.wallet-amount-preview-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(0, 0, 0, 0.55);
  margin-bottom: 0.35rem;
}

.wallet-amount-preview-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #212529;
}

/* -------------------------------------------------
   Wallet top-up payment page
   ------------------------------------------------- */
.wallet-payment-option-card {
  cursor: pointer;
}

.wallet-payment-option-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.wallet-payment-option-box {
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 0.5rem;
  background: #fff;
  padding: 1rem;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.wallet-payment-option-card:hover .wallet-payment-option-box {
  border-color: #17a2b8;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08);
}

.wallet-payment-option-input:checked + .wallet-payment-option-box {
  border-color: #17a2b8;
  box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.15);
  background: #f4fcfd;
}

.wallet-payment-option-icon {
  font-size: 1.6rem;
  color: #17a2b8;
  margin-bottom: 0.75rem;
}

.wallet-payment-option-title {
  font-size: 1rem;
  font-weight: 600;
  color: #212529;
}

.wallet-payment-option .custom-control-label {
  cursor: pointer;
}

.wallet-payment-label {
  display: inline-block;
  width: calc(100% - 1.5rem);
  font-size: 1.05rem;
}

/* -------------------------------------------------
   Responsive
   ------------------------------------------------- */
@media (max-width: 767.98px) {
  .page-order-paid .action-buttons .btn {
    min-width: 0;
    width: 100%;
  }

  .wallet-amount-card .preset-btn {
    min-width: 0;
    width: calc(50% - 0.5rem);
  }

  .doc-info-line {
    flex-direction: column;
    gap: 6px;
  }
}