/* ==========================================================================
   WHMCS PRO TURKISH THEME — WHMCS CORE OVERRIDES
   Modern styling for WHMCS tables, forms, alerts, navigation, and client panels
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TABLES & DATATABLES
   -------------------------------------------------------------------------- */
.table {
  width: 100%;
  margin-bottom: 1.5rem;
  color: var(--theme-text-main);
  background-color: var(--theme-surface);
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-md);
  overflow: hidden;
}

.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > tbody > tr > td,
.table > tfoot > tr > td {
  padding: 0.875rem 1.15rem;
  line-height: 1.45;
  vertical-align: middle;
  border-top: 1px solid var(--theme-border);
  border-bottom: none;
}

.theme-card > .theme-table-responsive > .table {
  border: none;
  border-radius: 0;
  margin-bottom: 0;
}

.table > thead > tr > th {
  background-color: var(--theme-surface-alt);
  color: var(--theme-text-muted);
  font-family: var(--theme-font-heading);
  font-weight: 700;
  font-size: var(--theme-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-top: none;
  white-space: nowrap;
}

.table td .theme-badge,
.table td .btn-theme {
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   FAQ ACCORDION & BUTTON FOCUS RESETS (Overrides Twenty-One button:focus)
   -------------------------------------------------------------------------- */
.theme-accordion-header,
.faq-question,
.accordion-button {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  -webkit-tap-highlight-color: transparent !important;
  border-radius: 0 !important;
}

.theme-accordion-header:focus:not(:focus-visible),
.theme-accordion-header:active,
.faq-question:focus:not(:focus-visible),
.faq-question:active,
.accordion-button:focus:not(:focus-visible),
.accordion-button:active {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  background-color: transparent !important;
}

.theme-accordion-header:focus-visible,
.faq-question:focus-visible,
.accordion-button:focus-visible {
  outline: 2px solid var(--theme-primary) !important;
  outline-offset: -2px;
  box-shadow: none !important;
}

.theme-accordion-item,
.faq-item,
.accordion-item {
  border: 1px solid var(--theme-border) !important;
  border-radius: var(--theme-radius-md) !important;
  overflow: hidden;
}

.theme-accordion-item.active,
.theme-accordion-item.open,
.faq-item.active,
.faq-item.open,
.accordion-item.active,
.accordion-item.open {
  border-color: var(--theme-primary) !important;
  box-shadow: 0 4px 16px rgba(var(--theme-primary-rgb), 0.08) !important;
}

.theme-accordion-body,
.faq-answer,
.accordion-collapse {
  border: none !important;
  outline: none !important;
}

.table-hover > tbody > tr:hover {
  background-color: var(--theme-surface-hover);
}

.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: var(--theme-surface-alt);
}

/* DataTables pagination and search controls */
.dataTables_wrapper {
  color: var(--theme-text-main);
  padding: 1rem 0;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  background-color: var(--theme-surface);
  color: var(--theme-text-main);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-sm);
  padding: 0.4rem 0.75rem;
  font-family: var(--theme-font-sans);
  font-size: var(--theme-text-sm);
}

.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
  border-color: var(--theme-primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(var(--theme-primary-rgb), 0.2);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: var(--theme-radius-sm) !important;
  color: var(--theme-text-main) !important;
  border: 1px solid var(--theme-border) !important;
  background: var(--theme-surface) !important;
  padding: 0.35rem 0.75rem !important;
  margin: 0 2px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: var(--theme-primary) !important;
  color: #FFFFFF !important;
  border-color: var(--theme-primary) !important;
}

/* --------------------------------------------------------------------------
   2. FORMS & INPUT CONTROLS
   -------------------------------------------------------------------------- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-family: var(--theme-font-heading);
  font-weight: 600;
  font-size: var(--theme-text-sm);
  color: var(--theme-text-main);
}

.form-control {
  display: block;
  width: 100%;
  height: auto;
  padding: 0.75rem 1rem;
  font-family: var(--theme-font-sans);
  font-size: var(--theme-text-base);
  line-height: 1.5;
  color: var(--theme-text-main);
  background-color: var(--theme-surface);
  background-image: none;
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-md);
  box-shadow: var(--theme-shadow-sm);
  transition: border-color var(--theme-transition-fast), box-shadow var(--theme-transition-fast);
}

.form-control:focus {
  border-color: var(--theme-primary);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(var(--theme-primary-rgb), 0.2);
}

.form-control::placeholder {
  color: var(--theme-text-subtle);
}

select.form-control {
  appearance: auto;
  padding-right: 2rem;
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* Input Group Addons */
.input-group-addon {
  padding: 0.75rem 1rem;
  font-size: var(--theme-text-base);
  font-weight: 500;
  line-height: 1;
  color: var(--theme-text-muted);
  text-align: center;
  background-color: var(--theme-surface-alt);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-md);
}

/* Checkboxes and Radios */
.checkbox label, .radio label {
  color: var(--theme-text-main);
  font-weight: 400;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* --------------------------------------------------------------------------
   3. BUTTON OVERRIDES (WHMCS Standard Classes)
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--theme-font-sans);
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  font-size: var(--theme-text-base);
  line-height: 1.4;
  border-radius: var(--theme-radius-btn);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--theme-transition-fast);
  text-decoration: none;
  max-width: 100%;
  white-space: normal;
  text-align: center;
  height: auto;
}

.btn-primary {
  color: var(--theme-btn-primary-text, #FFFFFF) !important;
  background-color: var(--theme-primary);
  border-color: var(--theme-primary);
  box-shadow: 0 4px 12px rgba(var(--theme-primary-rgb), 0.25);
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  color: var(--theme-btn-primary-text, #FFFFFF) !important;
  background-color: var(--theme-primary-hover);
  border-color: var(--theme-primary-hover);
}

.btn-default {
  color: var(--theme-text-main) !important;
  background-color: var(--theme-surface);
  border-color: var(--theme-border);
}

.btn-default:hover, .btn-default:focus, .btn-default:active {
  background-color: var(--theme-surface-hover);
  border-color: var(--theme-border);
  color: var(--theme-primary) !important;
}

.btn-success {
  color: #FFFFFF !important;
  background-color: var(--theme-success);
  border-color: var(--theme-success);
}

.btn-success:hover {
  background-color: var(--theme-success-hover);
  border-color: var(--theme-success-hover);
}

.btn-warning {
  color: #FFFFFF !important;
  background-color: var(--theme-warning);
  border-color: var(--theme-warning);
}

.btn-warning:hover {
  background-color: var(--theme-warning-hover);
  border-color: var(--theme-warning-hover);
}

.btn-danger {
  color: #FFFFFF !important;
  background-color: var(--theme-danger);
  border-color: var(--theme-danger);
}

.btn-danger:hover {
  background-color: var(--theme-danger-hover);
  border-color: var(--theme-danger-hover);
}

.btn-info {
  color: #FFFFFF !important;
  background-color: var(--theme-info);
  border-color: var(--theme-info);
}

.btn-info:hover {
  background-color: var(--theme-info-hover);
  border-color: var(--theme-info-hover);
}

.btn.btn-sm,
.btn-group-sm > .btn {
  padding: 0.35rem 0.65rem;
  font-size: 0.8125rem;
  line-height: 1.35;
  border-radius: 6px;
}

.btn.btn-outline-primary {
  color: var(--theme-primary, #2563eb);
  background-color: transparent;
  border: 1px solid var(--theme-primary, #2563eb);
}

.btn.btn-outline-primary:hover,
.btn.btn-outline-primary:focus-visible {
  color: #FFFFFF;
  background-color: var(--theme-primary, #2563eb);
  border-color: var(--theme-primary, #2563eb);
}

.btn.btn-outline-secondary {
  color: var(--theme-text-muted, #475569);
  background-color: transparent;
  border: 1px solid var(--theme-border, #cbd5e1);
}

.btn.btn-outline-secondary:hover,
.btn.btn-outline-secondary:focus-visible {
  color: var(--theme-text, #0f172a);
  background-color: var(--theme-surface-muted, #f1f5f9);
  border-color: var(--theme-text-muted, #64748b);
}

.btn.btn-outline-success,
.btn.btn-theme-outline-success {
  color: var(--theme-success, #16a34a);
  background-color: transparent;
  border: 1px solid var(--theme-success, #16a34a);
}

.btn.btn-outline-success:hover,
.btn.btn-outline-success:focus-visible,
.btn.btn-theme-outline-success:hover,
.btn.btn-theme-outline-success:focus-visible {
  color: #FFFFFF;
  background-color: var(--theme-success, #16a34a);
  border-color: var(--theme-success, #16a34a);
}

.btn.btn-theme-success {
  color: #FFFFFF;
  background-color: var(--theme-success, #16a34a);
  border: 1px solid var(--theme-success, #16a34a);
}

.btn.btn-theme-success:hover,
.btn.btn-theme-success:focus-visible {
  color: #FFFFFF;
  background-color: var(--theme-success-hover, #15803d);
  border-color: var(--theme-success-hover, #15803d);
}

.btn.btn-outline-info {
  color: var(--theme-info, #0284c7);
  background-color: transparent;
  border: 1px solid var(--theme-info, #0284c7);
}

.btn.btn-outline-info:hover,
.btn.btn-outline-info:focus-visible {
  color: #FFFFFF;
  background-color: var(--theme-info, #0284c7);
  border-color: var(--theme-info, #0284c7);
}

.btn.btn-outline-warning {
  color: var(--theme-warning, #b45309);
  background-color: transparent;
  border: 1px solid var(--theme-warning, #d97706);
}

.btn.btn-outline-warning:hover,
.btn.btn-outline-warning:focus-visible {
  color: #111827;
  background-color: var(--theme-warning, #f59e0b);
  border-color: var(--theme-warning, #f59e0b);
}

.btn.btn-outline-danger {
  color: var(--theme-danger, #dc2626);
  background-color: transparent;
  border: 1px solid var(--theme-danger, #dc2626);
}

.btn.btn-outline-danger:hover,
.btn.btn-outline-danger:focus-visible {
  color: #FFFFFF;
  background-color: var(--theme-danger, #dc2626);
  border-color: var(--theme-danger, #dc2626);
}

[data-theme="dark"] .btn.btn-outline-primary,
html.dark .btn.btn-outline-primary {
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.55);
}

[data-theme="dark"] .btn.btn-outline-primary:hover,
html.dark .btn.btn-outline-primary:hover {
  color: #ffffff;
  background-color: #2563eb;
  border-color: #2563eb;
}

[data-theme="dark"] .btn.btn-outline-secondary,
html.dark .btn.btn-outline-secondary {
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.45);
}

[data-theme="dark"] .btn.btn-outline-secondary:hover,
html.dark .btn.btn-outline-secondary:hover {
  color: #f8fafc;
  background-color: rgba(148, 163, 184, 0.16);
  border-color: rgba(148, 163, 184, 0.7);
}

[data-theme="dark"] .btn.btn-outline-success,
html.dark .btn.btn-outline-success,
[data-theme="dark"] .btn.btn-theme-outline-success,
html.dark .btn.btn-theme-outline-success {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.55);
}

[data-theme="dark"] .btn.btn-outline-success:hover,
html.dark .btn.btn-outline-success:hover,
[data-theme="dark"] .btn.btn-theme-outline-success:hover,
html.dark .btn.btn-theme-outline-success:hover {
  color: #ffffff;
  background-color: #16a34a;
  border-color: #16a34a;
}

[data-theme="dark"] .btn.btn-outline-info,
html.dark .btn.btn-outline-info {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.55);
}

[data-theme="dark"] .btn.btn-outline-info:hover,
html.dark .btn.btn-outline-info:hover {
  color: #082f49;
  background-color: #38bdf8;
  border-color: #38bdf8;
}

[data-theme="dark"] .btn.btn-outline-warning,
html.dark .btn.btn-outline-warning {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.55);
}

[data-theme="dark"] .btn.btn-outline-warning:hover,
html.dark .btn.btn-outline-warning:hover {
  color: #111827;
  background-color: #fbbf24;
  border-color: #fbbf24;
}

[data-theme="dark"] .btn.btn-outline-danger,
html.dark .btn.btn-outline-danger {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.55);
}

[data-theme="dark"] .btn.btn-outline-danger:hover,
html.dark .btn.btn-outline-danger:hover {
  color: #ffffff;
  background-color: #dc2626;
  border-color: #dc2626;
}

/* --------------------------------------------------------------------------
   4. ALERTS
   -------------------------------------------------------------------------- */
.alert {
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--theme-radius-md);
  font-size: var(--theme-text-base);
  display: block;
  line-height: 1.5;
}

.alert-success {
  color: #065F46;
  background-color: #ECFDF5;
  border-color: #A7F3D0;
}

.alert-info {
  color: #1E40AF;
  background-color: #EFF6FF;
  border-color: #BFDBFE;
}

.alert-warning {
  color: #92400E;
  background-color: #FFFBEB;
  border-color: #FDE68A;
}

.alert-danger {
  color: #991B1B;
  background-color: #FEF2F2;
  border-color: #FECACA;
}

/* Dark mode alerts */
[data-theme="dark"] .alert-success,
html.dark .alert-success {
  color: #A7F3D0;
  background-color: rgba(6, 95, 70, 0.3);
  border-color: #065F46;
}

[data-theme="dark"] .alert-info,
html.dark .alert-info {
  color: #BFDBFE;
  background-color: rgba(30, 64, 175, 0.3);
  border-color: #1E40AF;
}

[data-theme="dark"] .alert-warning,
html.dark .alert-warning {
  color: #FDE68A;
  background-color: rgba(146, 64, 14, 0.3);
  border-color: #78350F;
}

[data-theme="dark"] .alert-danger,
html.dark .alert-danger {
  color: #FECACA;
  background-color: rgba(153, 27, 27, 0.3);
  border-color: #991B1B;
}

/* --------------------------------------------------------------------------
   5. PANELS & TILES (WHMCS Client Area Dashboard)
   -------------------------------------------------------------------------- */
.panel {
  margin-bottom: 1.5rem;
  background-color: var(--theme-surface);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-card);
  box-shadow: var(--theme-shadow-card);
  overflow: visible;
}

.panel-heading {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--theme-border);
  background-color: var(--theme-surface-alt);
  color: var(--theme-text-main);
  font-family: var(--theme-font-heading);
  font-weight: 700;
  font-size: var(--theme-text-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-body {
  padding: 1.5rem;
  color: var(--theme-text-main);
}

.panel-footer {
  padding: 1rem 1.5rem;
  background-color: var(--theme-surface-alt);
  border-top: 1px solid var(--theme-border);
}

/* Stat Tiles (Active Services, Invoices, Tickets, Domains) */
.tile {
  background-color: var(--theme-surface);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-card);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--theme-shadow-card);
  transition: transform var(--theme-transition-normal), box-shadow var(--theme-transition-normal);
  display: block;
  text-decoration: none !important;
  color: var(--theme-text-main) !important;
}

.tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--theme-shadow-card-hover);
  border-color: var(--theme-border-highlight);
}

.tile .stat {
  font-size: 2.25rem;
  font-weight: 800;
  font-family: var(--theme-font-heading);
  line-height: 1;
  color: var(--theme-primary);
  margin-bottom: 0.5rem;
}

.tile .title {
  font-size: var(--theme-text-sm);
  color: var(--theme-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* --------------------------------------------------------------------------
   6. STATUS BADGES (WHMCS Invoices, Services, Tickets)
   -------------------------------------------------------------------------- */
.status, .status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: var(--theme-radius-full);
  font-size: var(--theme-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.status-active, .status-paid, .status-closed {
  background-color: #ECFDF5;
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.status-pending, .status-unpaid, .status-open {
  background-color: #FFFBEB;
  color: #D97706;
  border: 1px solid rgba(217, 119, 6, 0.25);
}

.status-suspended, .status-cancelled, .status-fraud {
  background-color: #FEF2F2;
  color: #DC2626;
  border: 1px solid rgba(220, 38, 38, 0.25);
}

.status-customer-reply, .status-answered {
  background-color: #EFF6FF;
  color: #2563EB;
  border: 1px solid rgba(37, 99, 235, 0.25);
}

/* Dark mode status badges */
[data-theme="dark"] .status-active,
[data-theme="dark"] .status-paid,
html.dark .status-active,
html.dark .status-paid {
  background-color: rgba(5, 150, 105, 0.25);
  color: #34D399;
}

[data-theme="dark"] .status-pending,
[data-theme="dark"] .status-unpaid,
html.dark .status-pending,
html.dark .status-unpaid {
  background-color: rgba(217, 119, 6, 0.25);
  color: #FBBF24;
}

[data-theme="dark"] .status-suspended,
[data-theme="dark"] .status-cancelled,
html.dark .status-suspended,
html.dark .status-cancelled {
  background-color: rgba(220, 38, 38, 0.25);
  color: #F87171;
}

/* --------------------------------------------------------------------------
   7. MODALS
   -------------------------------------------------------------------------- */
.modal-content {
  background-color: var(--theme-surface);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-card);
  box-shadow: var(--theme-shadow-lg);
  color: var(--theme-text-main);
  overflow: hidden;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--theme-border);
  background-color: var(--theme-surface-alt);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header .close {
  background: transparent;
  border: none;
  padding: 0.25rem 0.5rem;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--theme-text-muted);
  cursor: pointer;
  order: 2;
}

.modal-header .close:hover {
  color: var(--theme-danger);
}

.modal-header .modal-title {
  font-family: var(--theme-font-heading);
  font-weight: 700;
  font-size: var(--theme-text-lg);
  color: var(--theme-text-main);
  margin: 0;
  order: 1;
}

.modal-body {
  padding: 1.5rem;
  color: var(--theme-text-main);
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--theme-border);
  background-color: var(--theme-surface-alt);
}

/* --------------------------------------------------------------------------
   8. SIDEBAR & BREADCRUMBS
   -------------------------------------------------------------------------- */
.breadcrumb {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 0.35rem 0.75rem;
  margin-bottom: 0;
  list-style: none;
  background-color: var(--theme-surface-alt);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-full);
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--theme-text-muted);
  row-gap: 0.2rem;
}

.breadcrumb > li + li::before {
  display: inline-block;
  padding-right: 0.45rem;
  padding-left: 0.45rem;
  color: var(--theme-text-muted);
  opacity: 0.55;
  content: "/";
}

.breadcrumb > .active {
  color: var(--theme-text-main);
  font-weight: 700;
}

/* Sidebar Navigation */
.sidebar .panel,
.panel-sidebar {
  margin-bottom: 1.25rem;
}

.panel-sidebar .panel-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
}

.panel-sidebar .panel-title .panel-minimise,
.panel-sidebar .panel-title .card-minimise {
  margin-left: auto !important;
  cursor: pointer;
  color: var(--theme-text-muted);
  font-size: 0.8rem;
  transition: transform 0.25s ease, color 0.15s ease;
}

.panel-sidebar .panel-title .panel-minimise:hover,
.panel-sidebar .panel-title .card-minimise:hover {
  color: var(--theme-primary);
}

.panel-sidebar .panel-title .panel-minimise.minimised,
.panel-sidebar .panel-title .card-minimise.minimised,
.panel-sidebar.panel-collapsed .panel-title .panel-minimise,
.panel-sidebar.panel-collapsed .panel-title .card-minimise {
  transform: rotate(180deg);
}

.panel-sidebar.panel-collapsed .list-group,
.panel-sidebar.panel-collapsed .panel-body,
.panel-sidebar.panel-collapsed .collapsable-card-body {
  display: none !important;
}

.list-group {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar .list-group-item,
.panel-sidebar .list-group-item {
  background-color: var(--theme-surface);
  border-top: 1px solid var(--theme-border);
  color: var(--theme-text-main);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: var(--theme-text-sm);
  font-weight: 500;
  text-decoration: none;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
  transition: background-color var(--theme-transition-fast), color var(--theme-transition-fast);
}

.panel-sidebar .list-group-item a,
.panel-sidebar .list-group-item span {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sidebar .list-group-item:hover,
.panel-sidebar .list-group-item:hover {
  background-color: var(--theme-surface-hover);
  color: var(--theme-primary);
}

.sidebar .list-group-item.active,
.panel-sidebar .list-group-item.active {
  background-color: var(--theme-primary);
  border-color: var(--theme-primary);
  color: #FFFFFF !important;
}

.list-group-item.disabled {
  opacity: 0.55;
  pointer-events: none;
}

.theme-sidebar-item-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar .list-group-item .badge,
.panel-sidebar .list-group-item .badge {
  background-color: var(--theme-surface-alt);
  color: var(--theme-text-muted);
  border-radius: var(--theme-radius-full);
}

.sidebar .list-group-item.active .badge,
.panel-sidebar .list-group-item.active .badge {
  background-color: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
}

/* Ticket & Sidebar Status Labels (WHMCS Native .label) */
.panel-sidebar .label,
.sidebar .label,
.ticket-details-children .label {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: var(--theme-radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 0.15rem;
}

.panel-sidebar .ticket-details-children .title {
  display: block;
  font-size: 0.75rem;
  color: var(--theme-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}

.panel-sidebar .ticket-details-children .btn {
  white-space: nowrap;
  font-size: 0.78rem;
  padding: 0.45rem 0.65rem;
}

.panel-sidebar .alert:empty,
.panel-sidebar .ticket-cc-email-container:empty {
  display: none !important;
}

/* WHMCS Utility Classes (.w-hidden, .hidden) */
.w-hidden,
.hidden {
  display: none;
}

/* --------------------------------------------------------------------------
   9. ORDERFORM & iCHECK RADIO / DOMAIN SELECTION MOBILE OVERRIDES
   Prevents iCheck (-20% / 140% inline style) from stretching radio buttons
   into clipped ovals on mobile and aligns domain input rows cleanly.
   -------------------------------------------------------------------------- */
#order-standard_cart .domain-selection-options .option {
  overflow: visible !important;
}

#order-standard_cart .domain-selection-options .option label {
  display: flex !important;
  align-items: center !important;
  gap: 0.65rem !important;
  width: 100%;
  line-height: 1.35;
}

#order-standard_cart .iradio_square-blue,
.domain-selection-options .iradio_square-blue {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  flex: 0 0 20px !important;
  position: relative !important;
  margin: 0 !important;
  border-radius: 50% !important;
  border: 2px solid var(--theme-border-strong, #94A3B8) !important;
  background: var(--theme-surface, #ffffff) !important;
  box-sizing: border-box !important;
}

#order-standard_cart .iradio_square-blue.checked,
.domain-selection-options .iradio_square-blue.checked {
  border-color: var(--theme-primary, #1D4ED8) !important;
}

#order-standard_cart .iradio_square-blue.checked::after,
.domain-selection-options .iradio_square-blue.checked::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--theme-primary, #1D4ED8);
  display: block;
}

#order-standard_cart .iradio_square-blue input[type="radio"],
.domain-selection-options .iradio_square-blue input[type="radio"] {
  opacity: 0 !important;
  position: absolute !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
}

#order-standard_cart .domain-selection-options input[type="radio"]:not(.iradio_square-blue input),
.theme-domain-radio-input {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  flex: 0 0 20px !important;
  margin: 0 !important;
  accent-color: var(--theme-primary, #1D4ED8);
}

/* Override WHMCS standard_cart #666 dark grey Order Summary background */
#order-standard_cart .order-summary,
#order-standard_cart #orderSummary .order-summary {
  background-color: var(--theme-card, #ffffff) !important;
  color: var(--theme-text-main, #0F172A) !important;
  border: 1px solid var(--theme-border, #E2E8F0) !important;
  border-bottom: 1px solid var(--theme-border, #E2E8F0) !important;
  border-radius: var(--theme-radius-card, 16px) !important;
  padding: 1.5rem !important;
  box-shadow: var(--theme-shadow-card) !important;
}

#order-standard_cart .order-summary h2,
#order-standard_cart .order-summary h3 {
  background: transparent !important;
  color: var(--theme-text-main, #0F172A) !important;
  padding: 0 0 0.75rem 0 !important;
  margin: 0 0 0.75rem 0 !important;
  border-bottom: 1px solid var(--theme-border, #E2E8F0) !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  text-align: left !important;
}

#order-standard_cart .order-summary .summary-container {
  background-color: transparent !important;
  color: var(--theme-text-main, #0F172A) !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
}




/* ==========================================================================
   WHMCS PRO THEME - SERVER MODULES ADAPTATION BRIDGE (cPanel, Plesk, DirectAdmin)
   Dosya: assets/css/whmcs-overrides.css
   Uyumluluk: Bootstrap 4/5, Açık/Koyu Mod, Marka Presetleri (Turhost, Natro, Güzel)
   ========================================================================== */

/* 1. Modül Genel Konteyner Yapısı */
.theme-server-overview-container {
  background: var(--theme-card);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-card, 16px);
  box-shadow: var(--theme-shadow-card, var(--theme-shadow-sm));
  overflow: hidden;
  margin-bottom: 1.5rem;
  transition: background-color var(--theme-transition-normal), border-color var(--theme-transition-normal);
}

/* 2. Bootstrap Panel & Card Dönüşümü (cPanel / Plesk İç Elemanları) */
.theme-server-overview-container .panel,
.theme-server-overview-container .card {
  background: var(--theme-surface, var(--theme-card));
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-md, 10px);
  margin-bottom: 1.5rem;
  box-shadow: none;
  overflow: hidden;
}

.theme-server-overview-container .panel-heading,
.theme-server-overview-container .card-header {
  background: var(--theme-surface-alt, var(--theme-bg-alt));
  border-bottom: 1px solid var(--theme-border);
  padding: 1rem 1.25rem;
  font-weight: 700;
  font-family: var(--theme-font-heading, inherit);
  color: var(--theme-text);
}

.theme-server-overview-container .panel-body,
.theme-server-overview-container .card-body {
  background: transparent;
  color: var(--theme-text);
  padding: 1.25rem;
}

/* 3. Kısayol Izgarası ve Bootstrap .d-block !important Çarpışma Çözümü */
.cpanel-feature-row,
.plesk-feature-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  padding: 10px 0 !important;
  margin: 0 !important;
}

.cpanel-feature-row > div,
.plesk-feature-row > div {
  flex: 1 1 calc(25% - 12px) !important;
  min-width: 130px !important;
  max-width: 100% !important;
  padding: 0 !important;
}

/* Bileşik Özgüllük (Compound Specificity) ile Bootstrap .d-block Ezme Kuralı */
.cpanel-feature-row a.d-block,
.plesk-feature-row a.d-block,
.cpanel-feature-row a,
.plesk-feature-row a,
.theme-shortcut-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  min-height: 110px;
  padding: 1.25rem 0.75rem !important;
  background: var(--theme-surface, var(--theme-card));
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-md, 10px);
  text-decoration: none !important;
  color: var(--theme-text) !important;
  box-shadow: var(--theme-shadow-sm);
  transition: all var(--theme-transition-normal, 0.2s cubic-bezier(0.4, 0, 0.2, 1));
}

.cpanel-feature-row a.d-block:hover,
.plesk-feature-row a.d-block:hover,
.cpanel-feature-row a:hover,
.plesk-feature-row a:hover,
.theme-shortcut-card:hover {
  transform: translateY(-3px);
  background: var(--theme-surface-hover, var(--theme-card));
  border-color: var(--theme-primary);
  box-shadow: var(--theme-shadow-md);
  color: var(--theme-primary) !important;
  text-decoration: none !important;
}

.cpanel-feature-row a.d-block:focus-visible,
.plesk-feature-row a.d-block:focus-visible,
.cpanel-feature-row a:focus-visible,
.plesk-feature-row a:focus-visible,
.theme-shortcut-card:focus-visible {
  outline: 2px solid var(--theme-primary);
  outline-offset: 2px;
}

.cpanel-feature-row img,
.plesk-feature-row img {
  width: 36px;
  height: 36px;
  max-width: 36px;
  max-height: 36px;
  margin: 0 auto 0.75rem auto !important;
  object-fit: contain;
  transition: transform var(--theme-transition-fast, 0.15s ease);
}

.cpanel-feature-row a:hover img,
.plesk-feature-row a:hover img,
.theme-shortcut-card:hover .theme-shortcut-icon {
  transform: scale(1.1);
}

/* 4. Koyu Mod Entegrasyonu ([data-theme="dark"] ve html.dark) */
[data-theme="dark"] .theme-server-overview-container,
html.dark .theme-server-overview-container {
  background: var(--theme-card);
  border-color: var(--theme-border);
}

[data-theme="dark"] .theme-server-overview-container .panel-heading,
[data-theme="dark"] .theme-server-overview-container .card-header,
html.dark .theme-server-overview-container .panel-heading,
html.dark .theme-server-overview-container .card-header {
  background: var(--theme-surface-alt);
  border-bottom-color: var(--theme-border);
  color: var(--theme-text);
}

[data-theme="dark"] .cpanel-feature-row a.d-block,
[data-theme="dark"] .plesk-feature-row a.d-block,
[data-theme="dark"] .theme-shortcut-card,
html.dark .cpanel-feature-row a.d-block,
html.dark .plesk-feature-row a.d-block,
html.dark .theme-shortcut-card {
  background: var(--theme-surface);
  border-color: var(--theme-border);
  color: var(--theme-text) !important;
}

[data-theme="dark"] .cpanel-feature-row a.d-block:hover,
[data-theme="dark"] .plesk-feature-row a.d-block:hover,
[data-theme="dark"] .theme-shortcut-card:hover,
html.dark .cpanel-feature-row a.d-block:hover,
html.dark .plesk-feature-row a.d-block:hover,
html.dark .theme-shortcut-card:hover {
  background: var(--theme-surface-hover);
  border-color: var(--theme-primary);
  color: var(--theme-primary) !important;
}

/* 5. AJAX E-Posta Oluşturma Formu (cPanel) */
#cPanelQuickEmailPanel form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

#cPanelQuickEmailPanel input[type="text"],
#cPanelQuickEmailPanel input[type="password"] {
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-sm, 6px);
  padding: 0.5rem 0.75rem;
  color: var(--theme-text);
  transition: border-color var(--theme-transition-fast), box-shadow var(--theme-transition-fast);
}

#cPanelQuickEmailPanel input[type="text"]:focus,
#cPanelQuickEmailPanel input[type="password"]:focus {
  border-color: var(--theme-primary);
  outline: none;
  box-shadow: 0 0 0 3px var(--theme-primary-light, rgba(29, 78, 216, 0.15));
}

/* 6. jQuery Knob Dairesel Göstergeler Desteği */
.usage-dial {
  font-family: var(--theme-font-sans, inherit) !important;
  font-weight: 700 !important;
  color: var(--theme-text) !important;
}

[data-theme="dark"] .theme-server-overview-container canvas,
html.dark .theme-server-overview-container canvas {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

[data-theme="dark"] .cpanel-usage-stats,
[data-theme="dark"] .plesk-usage-stats,
html.dark .cpanel-usage-stats,
html.dark .plesk-usage-stats {
  color: var(--theme-text);
}

/* 7. DirectAdmin Yönetim Paneli Kartı */
#directadminQuickSuite {
  background: var(--theme-card);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-card, 16px);
  box-shadow: var(--theme-shadow-card, var(--theme-shadow-sm));
  overflow: hidden;
}

#directadminQuickSuite .theme-card-header {
  background: var(--theme-surface-alt, var(--theme-bg-alt));
  border-bottom: 1px solid var(--theme-border);
  padding: 1rem 1.25rem;
}

#directadminQuickSuite .theme-shortcut-desc {
  color: var(--theme-text-muted);
}

/* 8. Ürün Detay Üst Kartı, 4'lü Özet Grid & #tabChangepw Modern Düzen */
.theme-service-hero-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.25rem;
}

.theme-service-hero-main {
  display: flex;
  align-items: flex-start;
  gap: 0.95rem;
  min-width: 0;
  flex: 1 1 280px;
}

.theme-service-hero-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--theme-primary-light, rgba(37, 99, 235, 0.1));
  color: var(--theme-primary, #2563eb);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.theme-status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.theme-domain-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--theme-primary, #2563eb);
  background: var(--theme-surface-alt, #f8fafc);
  border: 1px solid var(--theme-border);
  text-decoration: none;
  max-width: 100%;
  overflow-wrap: anywhere;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.theme-domain-pill:hover {
  border-color: var(--theme-primary, #2563eb);
  background: var(--theme-surface-hover, #f1f5f9);
}

.theme-service-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

/* 4-Card Billing Summary Grid */
.theme-summary-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.45rem;
  min-width: 0;
}

.theme-summary-card-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.theme-summary-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--theme-primary-light, rgba(37, 99, 235, 0.1));
  color: var(--theme-primary, #2563eb);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  flex-shrink: 0;
}

.theme-summary-icon-amber {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

.theme-summary-icon-green {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
}

.theme-summary-value {
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.theme-summary-value-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
}

.theme-cycle-pill {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--theme-text-muted);
  background: var(--theme-surface-alt, #f8fafc);
  border: 1px solid var(--theme-border);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
}

/* #tabChangepw Header, Eye Toggle & Toolbar */
.theme-changepw-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.theme-changepw-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--theme-primary-light, rgba(37, 99, 235, 0.1));
  color: var(--theme-primary, #2563eb);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.theme-card-highlight {
  border-color: var(--theme-primary, #2563eb) !important;
  box-shadow: 0 0 0 3px var(--theme-primary-light, rgba(37, 99, 235, 0.22)) !important;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.hestia-pw-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.hestia-pw-input-wrap input {
  width: 100%;
  padding-right: 2.65rem !important;
}

.hestia-pw-toggle-btn {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--theme-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hestia-pw-toggle-btn:hover {
  color: var(--theme-primary);
  background: var(--theme-primary-light, rgba(37, 99, 235, 0.1));
}

.hestia-pw-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.hestia-pw-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

@media (max-width: 767.98px) {
  .theme-service-hero-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .theme-service-hero-actions {
    width: 100%;
  }

  .theme-service-hero-actions .btn-theme {
    flex: 1 1 auto;
    justify-content: center;
  }

  .theme-grid-4.theme-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.75rem !important;
  }

  .theme-summary-card {
    padding: 0.85rem !important;
  }

  .hestia-pw-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hestia-pw-tools {
    width: 100%;
  }

  .hestia-pw-tools .btn-theme {
    flex: 1 1 auto;
    justify-content: center;
  }

  .hestia-pw-actions button[type="submit"] {
    width: 100%;
    justify-content: center;
  }
}

/* 5. Standalone Twenty-One Fallback Dark Mode (.card, .bg-white, .nav-tabs, .list-group-item, .modal-content) */
[data-theme="dark"] .card,
html.dark .card,
[data-theme="dark"] .bg-white,
html.dark .bg-white,
[data-theme="dark"] .modal-content,
html.dark .modal-content,
[data-theme="dark"] .list-group-item,
html.dark .list-group-item {
  background-color: var(--theme-surface, #111827) !important;
  border-color: var(--theme-border, #1f2937) !important;
  color: var(--theme-text-main, #f3f4f6);
}

[data-theme="dark"] .card-header,
html.dark .card-header,
[data-theme="dark"] .card-footer,
html.dark .card-footer,
[data-theme="dark"] .modal-header,
html.dark .modal-header,
[data-theme="dark"] .modal-footer,
html.dark .modal-footer {
  background-color: var(--theme-surface-alt, #1f2937) !important;
  border-color: var(--theme-border, #374151) !important;
  color: var(--theme-text-main, #f3f4f6);
}

[data-theme="dark"] .nav-tabs,
html.dark .nav-tabs {
  border-bottom-color: var(--theme-border, #374151);
}

[data-theme="dark"] .nav-tabs .nav-link.active,
html.dark .nav-tabs .nav-link.active {
  background-color: var(--theme-surface, #111827);
  border-color: var(--theme-border, #374151) var(--theme-border, #374151) transparent;
  color: var(--theme-text-main, #f3f4f6);
}
