/* Shared panel tables */
.owner-table,
.payments-table {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.owner-table-header,
.payments-table-header {
    display: flex;
    padding: 14px 20px;
    background: #f9fafb;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7280;
}

.owner-row,
.payments-row {
    display: flex;
    padding: 12px;
    gap: 16px;
    background: #ffffff;
    align-items: center;
}

.owner-subrow {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    font-size: 14px;
}

/* Owner users columns */
.col-name {
    width: 22%;
    min-width: 180px;
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    word-break: break-word;
}

.col-email {
    width: 28%;
    min-width: 220px;
    font-size: 14px;
    color: #374151;
    word-break: break-word;
}

.col-status {
    width: 25%;
    min-width: 220px;
}

.col-actions {
    width: 25%;
    min-width: 220px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.col-actions form,
.pay-col-actions form {
    margin: 0;
}

/* Payments columns */
.pay-col-gateway {
    width: 24%;
    min-width: 180px;
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    word-break: break-word;
}

.pay-col-type {
    width: 14%;
    min-width: 100px;
    font-size: 14px;
    color: #374151;
}

.pay-col-refund {
    width: 14%;
    min-width: 100px;
    font-size: 14px;
    color: #374151;
}

.pay-col-status {
    width: 18%;
    min-width: 130px;
}

.pay-col-actions {
    width: 30%;
    min-width: 180px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* Row wrappers */
.panel-row-wrap {
    border-bottom: 1px solid #e5e7eb;
}

.panel-row-wrap:last-child {
    border-bottom: 0;
}

/* Status group */
.status-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Badges */
.badge {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
}

.badge-active {
    background: #dcfce7;
    color: #15803d;
}

.badge-banned {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-deleted {
    background: #e5e7eb;
    color: #374151;
}

.badge-inactive {
    background: #f3f4f6;
    color: #6b7280;
}

/* Buttons */
.btn {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid transparent;
}

.btn-ban {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.btn-delete,
.btn-deactivate {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
    cursor: pointer;
}

.btn-unban {
    background: #dbeafe;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.btn-activate {
    background: #dcfce7;
    color: #15803d;
    border-color: #bbf7d0;
    cursor: pointer;
}

/* Sub row text */
.sub-label {
    color: #6b7280;
}

.sub-value {
    margin-left: 6px;
    font-weight: 600;
    color: #111827;
}

/* Wallet modal */
.wallet-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(17, 24, 39, 0.55);
}

.wallet-modal.is-open {
    display: flex;
}

.wallet-modal-panel {
    width: 100%;
    max-width: 560px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

.wallet-modal-header {
    padding: 22px 24px 0;
}

.wallet-modal-title {
    font-size: 22px;
    font-weight: 600;
    color: #111827;
    line-height: 1.2;
}

.wallet-modal-body {
    padding: 24px;
}

.wallet-field {
    margin-bottom: 20px;
}

.wallet-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.wallet-input {
    box-sizing: border-box;
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #ffffff;
    color: #111827;
    font-size: 14px;
    outline: none;
}

.wallet-input:focus {
    border-color: #9ca3af;
}

.wallet-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

@media (max-width: 640px) {
    .wallet-modal {
        padding: 16px;
    }

    .wallet-modal-panel {
        max-width: 100%;
    }

    .wallet-modal-header {
        padding: 20px 20px 0;
    }

    .wallet-modal-body {
        padding: 20px;
    }
}

.user-balance-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 16px;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    background: #f9fafb;
    font-size: 13px;
    line-height: 1;
}

.user-balance-nav-label {
    color: #6b7280;
    font-weight: 600;
}

.user-balance-nav-value {
    color: #111827;
    font-weight: 700;
}

.dashboard-balance-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    padding: 24px;
}

.dashboard-balance-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.dashboard-balance-label {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
}

.dashboard-balance-value {
    margin-top: 8px;
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
    color: #111827;
}

.dashboard-balance-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.popup-alert {
    padding: 16px;
    border: 1px solid;
    border-radius: 12px;
}

.popup-alert-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.popup-alert-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.popup-alert-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.popup-alert-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

.popup-alert-text {
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.5;
}

@media (max-width: 767px) {
    .dashboard-balance-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-balance-value {
        font-size: 32px;
    }

    .dashboard-balance-actions {
        width: 100%;
    }
}

.transactions-table-wrap {
    width: 100%;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.transactions-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 12px;
}

.transactions-table thead tr {
    background: #f9fafb;
}

.transactions-table th,
.transactions-table td {
    padding: 12px;
    text-align: left;
    vertical-align: middle;
}

.transactions-table th {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
}

.transactions-table td {
    font-size: 14px;
    color: #374151;
    border-top: 1px solid #e5e7eb;
}

.transactions-table tbody tr:first-child td {
    border-top: 0;
}

.transactions-table td:first-child,
.transactions-table td:nth-child(4) {
    font-weight: 700;
    color: #111827;
}

.transactions-col-id { width: 7%; }
.transactions-col-type { width: 13%; }
.transactions-col-gateway { width: 17%; }
.transactions-col-amount { width: 15%; }
.transactions-col-currency { width: 12%; }
.transactions-col-status { width: 16%; }
.transactions-col-date { width: 20%; }

.transactions-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
}

.transactions-status-success {
    background: #dcfce7;
    color: #15803d;
}

.transactions-status-warning {
    background: #fef3c7;
    color: #b45309;
}

.transactions-status-error {
    background: #fee2e2;
    color: #b91c1c;
}

.transactions-status-default {
    background: #f3f4f6;
    color: #374151;
}

.popup-hidden {
    display: none !important;
}

/* OWNER USERS FINAL CLEAN */
.owner-users-page .owner-table-header,
.owner-users-page .owner-row {
    display: grid !important;
    grid-template-columns: 1fr 1.5fr 0.6fr 0.8fr 1.2fr 1.5fr !important;
    align-items: center;
    column-gap: 12px;
}

.owner-users-page .status-group {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
}

.owner-users-page .col-actions {
    display: flex;
    justify-content: flex-end;
}

.owner-users-page .actions-inline {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: nowrap;
}

.owner-users-page .actions-inline form {
    display: inline-flex;
    margin: 0;
}

.owner-users-page .actions-inline .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    white-space: nowrap;
}

/* Submenu settings */
.owner-settings-subnav {
    display: flex;
    gap: 32px;
    margin-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.owner-settings-subnav-link {
    display: inline-block;
    padding: 8px 4px;
    margin-bottom: -1px;
    border-bottom: 2px solid transparent;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.owner-settings-subnav-link:hover {
    color: #374151;
    text-decoration: none;
}

.owner-settings-subnav-link.active {
    color: #111827;
    border-bottom-color: #6366f1;
}

.border-gray-200 {
    border-radius: 12px;
}

/* User transactions summary */
.transactions-summary-wrap {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    padding: 16px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
}

.transactions-summary-item {
    flex: 1 1 0;
    min-width: 0;
}

.transactions-summary-label {
    margin-bottom: 8px;
    font-size: 14px;
    color: #6b7280;
}

.transactions-summary-value {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
    color: #111827;
}

@media (max-width: 767px) {
    .transactions-summary-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .transactions-summary-item {
        width: 100%;
    }
}

/* Admin Payments - Currency spacing */
#currencyForm {
    margin-bottom: 32px;
}

#currencyForm > div {
    margin-bottom: 0 !important;
}

#currencyForm + h2 {
    margin-top: 0;
}

/* Owner panel dark-light settings */
.theme-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.theme-setting-copy {
    flex: 1 1 320px;
}

.theme-setting-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
}

.theme-setting-text {
    margin-top: 6px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.theme-toggle {
    position: relative;
    display: inline-flex;
    width: 58px;
    height: 32px;
    flex: 0 0 auto;
    cursor: pointer;
}

.theme-toggle-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.theme-toggle-slider {
    position: relative;
    width: 58px;
    height: 32px;
    background: #d1d5db;
    border-radius: 9999px;
    transition: background 0.2s ease;
}

.theme-toggle-slider::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 24px;
    height: 24px;
    background: #ffffff;
    border-radius: 9999px;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.theme-toggle-input:checked + .theme-toggle-slider {
    background: #111827;
}

.theme-toggle-input:checked + .theme-toggle-slider::after {
    transform: translateX(26px);
}

@media (max-width: 640px) {
    .theme-setting-row {
        align-items: flex-start;
    }
}

/* Global theme base */
body.theme-light {
    background: #f3f4f6;
    color: #111111;
}

body.theme-dark {
    background: #000000;
    color: #e5e5e5;
}

/* Dark theme global fallbacks */
body.theme-dark .min-h-screen.bg-gray-100 {
    background: #000000 !important;
}

body.theme-dark .bg-white,
body.theme-dark header.bg-white {
    background: #111111 !important;
}

body.theme-dark .text-gray-900 {
    color: #e5e5e5 !important;
}

body.theme-dark .text-gray-700,
body.theme-dark .text-gray-600,
body.theme-dark .text-gray-500,
body.theme-dark .text-gray-400 {
    color: #a3a3a3 !important;
}

body.theme-dark .border-gray-200,
body.theme-dark .border-gray-300 {
    border-color: #262626 !important;
}

body.theme-dark .shadow,
body.theme-dark .shadow-md,
body.theme-dark .shadow-sm {
    box-shadow: none !important;
}

/* Dark theme submenu */
body.theme-dark .owner-settings-subnav {
    border-bottom-color: #262626;
}

body.theme-dark .owner-settings-subnav-link {
    color: #737373;
}

body.theme-dark .owner-settings-subnav-link:hover {
    color: #d4d4d4;
}

body.theme-dark .owner-settings-subnav-link.active {
    color: #e5e5e5;
    border-bottom-color: #a3a3a3;
}

/* Dark theme switch */
body.theme-dark .theme-setting-title {
    color: #e5e5e5;
}

body.theme-dark .theme-setting-text {
    color: #a3a3a3;
}

body.theme-dark .theme-toggle-slider {
    background: #262626;
}

body.theme-dark .theme-toggle-input:checked + .theme-toggle-slider {
    background: #737373;
}

body.theme-dark .theme-toggle-slider::after {
    background: #111111;
}

/* Dark theme cards and tables */
body.theme-dark .wallet-modal-panel,
body.theme-dark .dashboard-balance-card,
body.theme-dark .transactions-summary-wrap,
body.theme-dark .transactions-table,
body.theme-dark .transactions-table thead tr,
body.theme-dark .owner-subrow,
body.theme-dark .owner-row,
body.theme-dark .payments-row {
    background: #111111 !important;
}

body.theme-dark .transactions-table-wrap,
body.theme-dark .owner-table,
body.theme-dark .payments-table,
body.theme-dark .wallet-modal-panel,
body.theme-dark .dashboard-balance-card,
body.theme-dark .transactions-summary-wrap {
    border-color: #262626 !important;
}

body.theme-dark .owner-table-header,
body.theme-dark .payments-table-header,
body.theme-dark .transactions-table thead tr {
    background: #000000 !important;
}

body.theme-dark .owner-table-header,
body.theme-dark .payments-table-header,
body.theme-dark .transactions-table th {
    color: #a3a3a3 !important;
}

body.theme-dark .owner-row,
body.theme-dark .payments-row,
body.theme-dark .transactions-table td,
body.theme-dark .col-name,
body.theme-dark .col-email,
body.theme-dark .pay-col-gateway,
body.theme-dark .pay-col-type,
body.theme-dark .pay-col-refund,
body.theme-dark .sub-value,
body.theme-dark .transactions-summary-value,
body.theme-dark .dashboard-balance-value,
body.theme-dark .user-balance-nav-value {
    color: #e5e5e5 !important;
}

body.theme-dark .sub-label,
body.theme-dark .transactions-summary-label,
body.theme-dark .dashboard-balance-label,
body.theme-dark .user-balance-nav-label {
    color: #a3a3a3 !important;
}

body.theme-dark .transactions-table td {
    border-top-color: #262626 !important;
}

body.theme-dark .panel-row-wrap {
    border-bottom-color: #262626 !important;
}

body.theme-dark .user-balance-nav {
    background: #000000;
    border-color: #262626;
}

body.theme-dark .wallet-input {
    background: #000000;
    border-color: #404040;
    color: #e5e5e5;
}

body.theme-dark .wallet-input:focus {
    border-color: #737373;
}

/* Welcome page */
.welcome-page {
    min-height: 100vh;
    background: #f3f4f6;
}

.welcome-shell {
    width: 100%;
    max-width: none;
    margin: 0;
    padding-left: 50px;
    padding-right: 50px;
}

.welcome-header {
    position: relative;
    padding-top: 24px;
    padding-bottom: 24px;
}

.welcome-nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.welcome-nav-button,
.welcome-primary-button,
.welcome-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.welcome-nav-button-outline,
.welcome-secondary-button {
    background: #ffffff;
    color: #111111;
    border-color: #e5e7eb;
}

.welcome-nav-button-ghost {
    background: transparent;
    color: #111111;
    border-color: transparent;
}

.welcome-primary-button {
    background: #111111;
    color: #f5f5f5;
    border-color: #111111;
}

.welcome-main {
    display: flex;
    align-items: center;
    min-height: calc(100vh - 90px);
    padding-bottom: 32px;
}

.welcome-card {
    padding: 40px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.welcome-kicker {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7280;
}

.welcome-title {
    margin-top: 10px;
    font-size: 40px;
    line-height: 1.1;
    font-weight: 700;
    color: #111111;
}

.welcome-text {
    margin-top: 14px;
    max-width: 640px;
    font-size: 16px;
    line-height: 1.6;
    color: #4b5563;
}

.welcome-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.welcome-header .welcome-shell > .flex {
    position: relative;
    justify-content: flex-end;
    align-items: flex-start;
    min-height: 96px;
}

.welcome-header .welcome-shell > .flex > div:first-child {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    z-index: 1;
}

.welcome-header .welcome-shell > .flex > div:first-child img,
.welcome-header .welcome-shell > .flex > div:first-child svg {
    display: block;
    height: 80px !important;
    width: auto !important;
    max-width: none;
}

@media (max-width: 768px) {
    .welcome-shell {
        padding-left: 20px;
        padding-right: 20px;
    }

    .welcome-header .welcome-shell > .flex {
        min-height: 72px;
    }

    .welcome-header .welcome-shell > .flex > div:first-child img,
    .welcome-header .welcome-shell > .flex > div:first-child svg {
        height: 64px !important;
    }
}

body.theme-light .welcome-page {
    background: #f3f4f6;
}

body.theme-dark .welcome-page {
    background: #000000;
}

body.theme-light .welcome-nav-button-ghost {
    background: transparent;
    color: #1b1b18;
    border-color: transparent;
}

body.theme-light .welcome-nav-button-outline {
    background: transparent;
    color: #1b1b18;
    border-color: #19140035;
}

body.theme-light .welcome-nav-button-ghost:hover {
    border-color: #19140035;
}

body.theme-light .welcome-nav-button-outline:hover {
    border-color: #1915014a;
}

body.theme-dark .welcome-nav-button-ghost {
    background: transparent;
    color: #a3a3a3;
    border-color: transparent;
}

body.theme-dark .welcome-nav-button-outline {
    background: transparent;
    color: #e5e5e5;
    border-color: #262626;
}

body.theme-dark .welcome-nav-button-ghost:hover {
    border-color: #262626;
}

body.theme-dark .welcome-nav-button-outline:hover {
    border-color: #404040;
}

/* Logo navbar */
body.theme-light .application-logo {
    color: #111111;
}

body.theme-dark .application-logo {
    color: #e5e5e5;
}

/* Global form fields dark theme */
body.theme-dark input[type="text"],
body.theme-dark input[type="email"],
body.theme-dark input[type="password"],
body.theme-dark input[type="number"],
body.theme-dark input[type="url"],
body.theme-dark input[type="search"],
body.theme-dark input[type="tel"],
body.theme-dark input[type="date"],
body.theme-dark input[type="datetime-local"],
body.theme-dark input[type="time"],
body.theme-dark select,
body.theme-dark textarea {
    background: #111111 !important;
    color: #e5e5e5 !important;
    border-color: #2a2a2a !important;
}

body.theme-dark input[type="text"]::placeholder,
body.theme-dark input[type="email"]::placeholder,
body.theme-dark input[type="password"]::placeholder,
body.theme-dark input[type="number"]::placeholder,
body.theme-dark input[type="url"]::placeholder,
body.theme-dark input[type="search"]::placeholder,
body.theme-dark input[type="tel"]::placeholder,
body.theme-dark input[type="date"]::placeholder,
body.theme-dark input[type="datetime-local"]::placeholder,
body.theme-dark input[type="time"]::placeholder,
body.theme-dark textarea::placeholder {
    color: #7a7a7a !important;
}

body.theme-dark select option {
    background: #111111;
    color: #e5e5e5;
}

body.theme-dark input[type="text"]:focus,
body.theme-dark input[type="email"]:focus,
body.theme-dark input[type="password"]:focus,
body.theme-dark input[type="number"]:focus,
body.theme-dark input[type="url"]:focus,
body.theme-dark input[type="search"]:focus,
body.theme-dark input[type="tel"]:focus,
body.theme-dark input[type="date"]:focus,
body.theme-dark input[type="datetime-local"]:focus,
body.theme-dark input[type="time"]:focus,
body.theme-dark select:focus,
body.theme-dark textarea:focus {
    border-color: #4a4a4a !important;
    box-shadow: none !important;
    outline: none !important;
}

body.theme-dark label {
    color: #b3b3b3 !important;
}

/* Form elements */
body.theme-light .form-label {
    color: #374151;
}

body.theme-dark .form-label {
    color: #a3a3a3;
}

.form-input {
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #111111;
}

.form-input:focus {
    border-color: #6b7280;
    outline: none;
    box-shadow: none;
}

body.theme-dark .form-input {
    border-color: #262626;
    background: #111111;
    color: #e5e5e5;
}

body.theme-dark .form-input:focus {
    border-color: #404040;
}

.form-error {
    color: #dc2626;
}

body.theme-dark .form-error {
    color: #ef4444;
}

.form-text {
    color: #6b7280;
}

body.theme-dark .form-text {
    color: #a3a3a3;
}

.form-success {
    color: #16a34a;
}

body.theme-dark .form-success {
    color: #22c55e;
}

.form-label-text {
    color: #374151;
}

.theme-dark .form-label-text {
    color: #d1d5db;
}

.form-link {
    color: #4b5563;
}

.theme-dark .form-link {
    color: #9ca3af;
}

/* Auth checkbox */
.auth-checkbox {
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

.theme-dark .auth-checkbox {
    border-color: #374151;
    background-color: #000000;
}

/* Generic cards and text */
.dashboard-card,
.transactions-card,
.owner-users-card,
.owner-transactions-card,
.admin-panel-card,
.admin-payments-card,
.owner-panel-card,
.owner-settings-card,
.owner-settings-section,
.profile-card,
.admin-owner-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

body.theme-dark .dashboard-card,
body.theme-dark .transactions-card,
body.theme-dark .owner-users-card,
body.theme-dark .owner-transactions-card,
body.theme-dark .admin-panel-card,
body.theme-dark .admin-payments-card,
body.theme-dark .owner-panel-card,
body.theme-dark .owner-settings-card,
body.theme-dark .owner-settings-section,
body.theme-dark .profile-card,
body.theme-dark .admin-owner-card {
    background: #111111;
    border-color: #262626;
}

.dashboard-text,
.transactions-text-title,
.owner-transactions-title,
.owner-settings-title,
.profile-title,
.profile-section-title,
.admin-section-title {
    color: #111111;
}

body.theme-dark .dashboard-text,
body.theme-dark .transactions-text-title,
body.theme-dark .owner-transactions-title,
body.theme-dark .owner-settings-title,
body.theme-dark .profile-title,
body.theme-dark .profile-section-title,
body.theme-dark .admin-section-title {
    color: #e5e5e5;
}

.dashboard-text-secondary,
.owner-users-empty,
.owner-settings-meta,
.owner-settings-empty,
.owner-settings-link-text,
.owner-settings-label,
.profile-section-text,
.admin-text,
.admin-text-secondary {
    color: #6b7280;
}

body.theme-dark .dashboard-text-secondary,
body.theme-dark .owner-users-empty,
body.theme-dark .owner-settings-meta,
body.theme-dark .owner-settings-empty,
body.theme-dark .owner-settings-link-text,
body.theme-dark .owner-settings-label,
body.theme-dark .profile-section-text,
body.theme-dark .admin-text,
body.theme-dark .admin-text-secondary {
    color: #a3a3a3;
}

.transactions-empty,
.owner-transactions-empty {
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    color: #6b7280;
    font-size: 14px;
}

body.theme-dark .transactions-empty,
body.theme-dark .owner-transactions-empty {
    border-color: #262626;
    background: #111111;
    color: #a3a3a3;
}

/* Owner settings links */
.owner-settings-link {
    color: #4f46e5;
    text-decoration: none;
}

.owner-settings-link:hover {
    text-decoration: underline;
}

body.theme-dark .owner-settings-link {
    color: #a3a3a3;
}

/* Dropdown */
.dropdown-menu {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.dropdown-content {
    background: #ffffff;
    border: 1px solid #e5e7eb;
}

body.theme-dark .dropdown-content {
    background: #111111;
    border-color: #262626;
}

.dropdown-link {
    display: block;
    width: 100%;
    background: transparent;
    color: #374151;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.dropdown-link:hover,
.dropdown-link:focus {
    background: #f3f4f6;
    color: #111111;
}

body.theme-dark .dropdown-link {
    color: #a3a3a3;
}

body.theme-dark .dropdown-link:hover,
body.theme-dark .dropdown-link:focus {
    background: #1a1a1a;
    color: #e5e5e5;
}

/* Buttons */
.secondary-button {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    color: #374151;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.15s ease;
}

.secondary-button:hover {
    background: #f3f4f6;
}

body.theme-dark .secondary-button {
    background: #111111;
    border-color: #262626;
    color: #a3a3a3;
}

body.theme-dark .secondary-button:hover {
    background: #1a1a1a;
}

.danger-button {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: #dc2626;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.15s ease;
}

.danger-button:hover {
    background: #b91c1c;
}

body.theme-dark .danger-button {
    background: #b91c1c;
}

body.theme-dark .danger-button:hover {
    background: #991b1b;
}

.primary-button {
    background-color: #111111;
    color: #ffffff;
    border: 1px solid transparent;
}

.primary-button:hover {
    background-color: #1f2937;
}

.primary-button:active {
    background-color: #000000;
}

/* DARK MODE */
.theme-dark .primary-button {
    background-color: #2a2a2a;
    color: #e5e5e5;
    border-color: #3a3a3a;
}

.theme-dark .primary-button:hover {
    background-color: #3a3a3a;
}

.theme-dark .primary-button:active {
    background-color: #1f1f1f;
}

/* Modal */
.modal-overlay {
    background: rgba(0, 0, 0, 0.7);
}

.modal-panel {
    overflow: hidden;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

body.theme-dark .modal-panel {
    background: #111111;
}

/* Navigation */
.navigation-shell {
    background: #ffffff;
    border-bottom: 0;
}

body.theme-dark .navigation-shell {
    background: #111111;
}

.navigation-user-trigger {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
}

body.theme-light .navigation-user-trigger {
    color: #6b7280;
}

body.theme-light .navigation-user-trigger:hover {
    color: #111111;
}

body.theme-dark .navigation-user-trigger {
    color: #a3a3a3;
}

body.theme-dark .navigation-user-trigger:hover {
    color: #e5e5e5;
}

.navigation-mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.15s ease;
}

body.theme-light .navigation-mobile-toggle {
    color: #6b7280;
    background: transparent;
}

body.theme-light .navigation-mobile-toggle:hover {
    color: #111111;
    background: #f3f4f6;
}

body.theme-dark .navigation-mobile-toggle {
    color: #a3a3a3;
    background: transparent;
}

body.theme-dark .navigation-mobile-toggle:hover {
    color: #e5e5e5;
    background: #1a1a1a;
}

.navigation-mobile-panel {
    border-top: 1px solid #e5e7eb;
}

body.theme-dark .navigation-mobile-panel {
    border-top-color: #262626;
}

.navigation-mobile-account {
    padding-top: 16px;
    padding-bottom: 4px;
    border-top: 1px solid #e5e7eb;
}

body.theme-dark .navigation-mobile-account {
    border-top-color: #262626;
}

.navigation-mobile-balance,
.navigation-mobile-email {
    font-size: 14px;
    color: #6b7280;
}

.navigation-mobile-name {
    font-size: 16px;
    font-weight: 600;
    color: #111111;
}

body.theme-dark .navigation-mobile-balance,
body.theme-dark .navigation-mobile-email {
    color: #a3a3a3;
}

body.theme-dark .navigation-mobile-name {
    color: #e5e5e5;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 4px 4px 0;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
}

body.theme-light .nav-link {
    color: #6b7280;
}

body.theme-light .nav-link:hover {
    color: #111111;
    border-color: #d1d5db;
}

body.theme-light .nav-link-active {
    color: #111111;
    border-color: #111111;
}

body.theme-dark .nav-link {
    color: #a3a3a3;
}

body.theme-dark .nav-link:hover {
    color: #e5e5e5;
    border-color: #404040;
}

body.theme-dark .nav-link-active {
    color: #e5e5e5;
    border-color: #737373;
}

.responsive-nav-link {
    display: block;
    width: 100%;
    padding: 10px 16px;
    border-left: 4px solid transparent;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.15s ease;
}

body.theme-light .responsive-nav-link {
    color: #6b7280;
}

body.theme-light .responsive-nav-link:hover {
    background: #f3f4f6;
    color: #111111;
    border-color: #d1d5db;
}

body.theme-light .responsive-nav-link-active {
    background: #f3f4f6;
    color: #111111;
    border-color: #111111;
}

body.theme-dark .responsive-nav-link {
    color: #a3a3a3;
}

body.theme-dark .responsive-nav-link:hover {
    background: #111111;
    color: #e5e5e5;
    border-color: #404040;
}

body.theme-dark .responsive-nav-link-active {
    background: #111111;
    color: #e5e5e5;
    border-color: #737373;
}

/* Alerts */
.admin-alert-warning,
.admin-alert-success,
.admin-alert-error {
    padding: 12px;
    border-radius: 12px;
}

.admin-alert-warning {
    border: 1px solid #facc15;
    background: #fef9c3;
    color: #92400e;
    font-size: 14px;
}

body.theme-dark .admin-alert-warning {
    border-color: #854d0e;
    background: #1a1a1a;
    color: #eab308;
}

.admin-alert-success {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
}

.admin-alert-error {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

body.theme-dark .admin-alert-success {
    background: #052e16;
    border-color: #166534;
    color: #4ade80;
}

body.theme-dark .admin-alert-error {
    background: #2a0a0a;
    border-color: #7f1d1d;
    color: #f87171;
}

/* Guest layout */
.page-bg {
    background-color: #f3f4f6;
}

.theme-dark .page-bg {
    background-color: #000000;
}

.panel-card {
    background-color: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.theme-dark .panel-card {
    background-color: #111111;
    box-shadow: none;
}

.logo-color {
    color: #6b7280;
}

.theme-dark .logo-color {
    color: #9ca3af;
}

/* App layout */
.panel-header {
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.theme-dark .panel-header {
    background-color: #111111;
    box-shadow: none;
}

/* Owner Logo Preview (Settings Page) */
.owner-settings-section img[alt="Current logo"] {
    max-width: 80px;
    height: auto;
    display: block;
}

