/* ─── Nexov's Gateway - Shared Styles & Animations ──────────────── */


/* Base transitions */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #c6c6cd;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #76777d;
}

/* ─── Animations ─────────────────────────────────────────────── */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(123, 208, 255, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(123, 208, 255, 0); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.4s ease-out forwards;
}

.animate-slide-down {
    animation: slideDown 0.3s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.3s ease-out forwards;
}

/* Staggered children animation */
.stagger-children > * {
    opacity: 0;
    animation: slideUp 0.4s ease-out forwards;
}
.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.10s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.20s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.30s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.35s; }
.stagger-children > *:nth-child(8) { animation-delay: 0.40s; }

/* ─── Skeleton Loading ───────────────────────────────────────── */

.skeleton {
    background: linear-gradient(90deg, #e6e8ea 25%, #f2f4f6 50%, #e6e8ea 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-line {
    height: 16px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-line.short { width: 40%; }
.skeleton-line.medium { width: 65%; }
.skeleton-line.long { width: 85%; }

/* ─── Loading Spinner ────────────────────────────────────────── */

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #c6c6cd;
    border-top-color: #131b2e;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.spinner-lg {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

/* ─── Toast Notifications ────────────────────────────────────── */

.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    pointer-events: all;
    min-width: 320px;
    max-width: 440px;
    padding: 14px 20px;
    border-radius: 8px;
    border: 1px solid;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    animation: slideDown 0.3s ease-out forwards;
}

.toast.toast-exit {
    animation: fadeOut 0.25s ease-in forwards;
}

@keyframes fadeOut {
    to { opacity: 0; transform: translateY(-8px); }
}

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

.toast-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.toast-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

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

.toast .toast-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.toast .toast-message {
    flex: 1;
}

/* ─── Results Panel ──────────────────────────────────────────── */

.results-panel {
    background: #ffffff;
    border: 1px solid #c6c6cd;
    border-radius: 12px;
    overflow: hidden;
    animation: scaleIn 0.3s ease-out;
    max-width: 860px;
    margin: 0 auto;
}

/* Align search forms to match results max-width */
.tab-content > .bg-surface-container-lowest {
    max-width: 860px;
    margin-left: auto !important;
    margin-right: auto !important;
}

.results-header {
    padding: 12px 18px;
    border-bottom: 1px solid #e6e8ea;
    background: #f7f9fb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.results-body {
    padding: 16px 18px;
}

.result-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #f2f4f6;
    gap: 16px;
}

.result-row:last-child {
    border-bottom: none;
}

.result-label {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #76777d;
    min-width: 140px;
    flex-shrink: 0;
}

.result-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 18px;
    color: #191c1e;
    word-break: break-all;
}

.result-value.highlight {
    color: #004c69;
    font-weight: 500;
}

.result-value.error-text {
    color: #ba1a1a;
}

/* Intel-L3 result records */

.intel-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.intel-header-left > div {
    min-width: 0;
}

.intel-query-title {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 20px;
    font-weight: 600;
    color: #191c1e;
    margin: 0;
    overflow-wrap: anywhere;
}

.intel-overflow-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid #d5e3fd;
    border-radius: 8px;
    background: #f7f9fb;
    color: #45464d;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
}

.intel-source {
    border: 1px solid #e6e8ea;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    margin-bottom: 14px;
}

.intel-source:last-child {
    margin-bottom: 0;
}

.intel-source-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    background: #f7f9fb;
    border-bottom: 1px solid #e6e8ea;
}

.intel-source-title {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 18px;
    font-weight: 700;
    color: #191c1e;
    margin: 0;
}

.intel-info {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    line-height: 17px;
    color: #76777d;
    margin-top: 4px;
}

.intel-count-badge {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 4px;
    background: #d5e3fd;
    color: #57657b;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
}

.intel-source-body {
    padding: 12px 14px;
}

.intel-record {
    border: 1px solid #f2f4f6;
    border-radius: 8px;
    background: #ffffff;
    margin-bottom: 10px;
    overflow: hidden;
}

.intel-record:last-child {
    margin-bottom: 0;
}

.intel-field {
    display: grid;
    grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
    gap: 14px;
    padding: 8px 10px;
    border-bottom: 1px solid #f2f4f6;
}

.intel-field:last-child {
    border-bottom: none;
}

.intel-field-label {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #76777d;
}

.intel-field-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    line-height: 17px;
    color: #191c1e;
    overflow-wrap: anywhere;
}

.intel-empty-row {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    line-height: 18px;
    color: #76777d;
    margin: 0;
    padding: 8px 0;
}

/* ─── DNS Record Table ───────────────────────────────────────── */

.dns-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Inter', sans-serif;
}

.dns-table thead {
    background: #f7f9fb;
}

.dns-table th {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #76777d;
    text-align: left;
    border-bottom: 2px solid #e6e8ea;
}

.dns-table td {
    padding: 8px 12px;
    font-size: 13px;
    line-height: 18px;
    color: #191c1e;
    border-bottom: 1px solid #f2f4f6;
    font-family: 'JetBrains Mono', monospace;
}

.dns-table tbody tr:hover {
    background: #f7f9fb;
}

.dns-table .record-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.badge-a { background: #dbeafe; color: #1e40af; }
.badge-aaaa { background: #ede9fe; color: #5b21b6; }
.badge-mx { background: #fce7f3; color: #9d174d; }
.badge-ns { background: #d1fae5; color: #065f46; }
.badge-txt { background: #fef3c7; color: #92400e; }
.badge-cname { background: #e0e7ff; color: #3730a3; }
.badge-soa { background: #f3e8ff; color: #6b21a8; }
.badge-caa { background: #ccfbf1; color: #115e59; }

/* ─── Tool Card Enhancement ──────────────────────────────────── */

.tool-card {
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #131b2e, #7bd0ff);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.tool-card:hover::before {
    transform: scaleX(1);
}

/* ─── Input Focus Enhancement ────────────────────────────────── */

.input-focus-glow:focus {
    outline: none;
    border-color: #7bd0ff;
    box-shadow: 0 0 0 3px rgba(123, 208, 255, 0.2);
}

/* ─── Crypto Payment Card ────────────────────────────────────── */

.crypto-card {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.crypto-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.crypto-card.selected {
    border-color: #131b2e;
    box-shadow: 0 0 0 2px #131b2e;
}

.crypto-card.selected::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: #131b2e;
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* Wallet address display */
.wallet-address {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    padding: 10px 14px;
    background: #f7f9fb;
    border: 1px solid #e6e8ea;
    border-radius: 6px;
    word-break: break-all;
    position: relative;
}

.copy-btn {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    padding: 4px 8px;
    border-radius: 4px;
    background: #131b2e;
    color: white;
    font-size: 11px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: #3f465c;
}

/* ─── Step Indicator ─────────────────────────────────────────── */

.step-indicator {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 32px;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid #c6c6cd;
    color: #76777d;
    background: white;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: #131b2e;
    border-color: #131b2e;
    color: white;
}

.step.completed .step-number {
    background: #065f46;
    border-color: #065f46;
    color: white;
}

.step-label {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #76777d;
}

.step.active .step-label {
    color: #191c1e;
    font-weight: 600;
}

.step-line {
    flex: 1;
    height: 2px;
    background: #c6c6cd;
    margin: 0 12px;
}

.step-line.completed {
    background: #065f46;
}

/* ─── Mobile Nav Toggle ──────────────────────────────────────── */

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 45;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.mobile-nav-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* ─── Empty State ────────────────────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #76777d;
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state .empty-title {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #45464d;
    margin-bottom: 6px;
}

.empty-state .empty-desc {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #76777d;
}

/* ─── Admin Management ───────────────────────────────────────── */

.admin-panel {
    background: #ffffff;
    border: 1px solid #c6c6cd;
    border-radius: 12px;
    overflow: hidden;
}

.admin-panel-header {
    padding: 14px 16px;
    border-bottom: 1px solid #e6e8ea;
    background: #f7f9fb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.admin-list {
    padding: 12px;
    display: grid;
    gap: 12px;
}

.admin-stat {
    background: #ffffff;
    border: 1px solid #c6c6cd;
    border-radius: 12px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-stat-icon {
    color: #45464d;
    font-size: 22px;
}

.admin-stat-value {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    line-height: 24px;
    font-weight: 700;
    color: #191c1e;
}

.admin-stat-label {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    line-height: 16px;
    color: #76777d;
}

.admin-item {
    border: 1px solid #e6e8ea;
    border-radius: 10px;
    padding: 12px;
    background: #ffffff;
}

.admin-item-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.admin-item-title {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 18px;
    font-weight: 700;
    color: #191c1e;
    margin: 0;
    overflow-wrap: anywhere;
}

.admin-item-subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    line-height: 16px;
    color: #76777d;
    overflow-wrap: anywhere;
}

.admin-badge-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    line-height: 16px;
    font-weight: 600;
    background: #f2f4f6;
    color: #45464d;
}

.status-approved,
.payment-paid {
    background: #d1fae5;
    color: #065f46;
}

.status-pending,
.payment-verifying,
.payment-submitted {
    background: #fef3c7;
    color: #92400e;
}

.status-rejected,
.payment-failed,
.payment-expired,
.payment-underpaid {
    background: #ffdad6;
    color: #93000a;
}

.payment-manual_review {
    background: #f2f4f6;
    color: #45464d;
}

.payment-refunded {
    background: #dbeafe;
    color: #1e40af;
}

.admin-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.admin-meta {
    min-width: 0;
}

.admin-meta-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    line-height: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #76777d;
}

.admin-meta-value {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    line-height: 16px;
    color: #191c1e;
    overflow-wrap: anywhere;
}

.admin-note-text {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    line-height: 17px;
    color: #45464d;
    padding: 10px;
    border-radius: 8px;
    background: #f7f9fb;
    margin-bottom: 10px;
}

.admin-controls,
.admin-user-controls {
    display: grid;
    gap: 8px;
}

.admin-controls {
    grid-template-columns: minmax(130px, 0.35fr) minmax(0, 1fr);
}

.admin-user-controls {
    grid-template-columns: minmax(110px, 0.45fr) auto auto;
    align-items: center;
}

.admin-select,
.admin-notes-input {
    width: 100%;
    border: 1px solid #c6c6cd;
    border-radius: 8px;
    background: #ffffff;
    color: #191c1e;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    line-height: 16px;
    padding: 7px 10px;
}

.admin-notes-input {
    resize: vertical;
}

.admin-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 10px;
}

.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 8px;
    padding: 7px 10px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.admin-btn:active {
    transform: scale(0.98);
}

.admin-btn-primary {
    background: #131b2e;
    color: #ffffff;
}

.admin-btn-secondary {
    background: #e6e8ea;
    color: #191c1e;
}

.admin-btn-danger {
    background: #ffdad6;
    color: #93000a;
}

.admin-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #45464d;
    white-space: nowrap;
}

.admin-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 24px;
    color: #76777d;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
}

.admin-page {
    max-width: 1500px;
}

.admin-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.admin-refresh-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 14px;
    border: 0;
    border-radius: 8px;
    background: #131b2e;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    line-height: 18px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(19, 27, 46, 0.18);
    cursor: pointer;
}

.admin-refresh-action:hover {
    background: #1e2942;
}

.admin-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.admin-sections-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.75fr);
    gap: 16px;
    align-items: start;
}

.admin-stat {
    min-height: 82px;
    border-color: #d9dbe0;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(19, 27, 46, 0.04);
}

.admin-stat-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #eef2ff;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.admin-stat-value {
    font-size: 22px;
    line-height: 26px;
    font-weight: 800;
    margin: 0;
}

.admin-stat-label {
    margin: 0;
}

.admin-panel {
    border-color: #d9dbe0;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(19, 27, 46, 0.04);
}

.admin-panel-header {
    min-height: 70px;
    background: #fbfcfe;
}

.admin-panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.admin-panel-title-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #f1f5f9;
    color: #45464d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.admin-panel-heading {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 20px;
    font-weight: 800;
    color: #191c1e;
    margin: 0;
}

.admin-panel-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    line-height: 16px;
    color: #76777d;
    margin: 1px 0 0;
}

.admin-list {
    min-height: 190px;
    gap: 10px;
}

.admin-item {
    display: grid;
    gap: 12px;
}

.admin-item-header {
    margin-bottom: 0;
}

.admin-item-title {
    font-weight: 800;
    margin: 0 0 3px;
}

.admin-item-subtitle {
    margin: 0;
}

.admin-badge {
    min-height: 22px;
    border: 1px solid transparent;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-approved,
.payment-paid {
    background: #ecfdf3;
    border-color: #bbf7d0;
    color: #166534;
}

.status-pending,
.payment-verifying,
.payment-submitted {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.status-rejected,
.payment-failed,
.payment-expired,
.payment-underpaid {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.payment-manual_review {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

.payment-refunded {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #3730a3;
}

.admin-meta-grid {
    margin-bottom: 0;
}

.admin-meta {
    min-width: 0;
    padding: 8px;
    border-radius: 8px;
    background: #f7f9fb;
}

.admin-meta-label {
    letter-spacing: 0;
    margin: 0 0 2px;
}

.admin-note-text {
    margin: 0;
}

.admin-filter-select,
.admin-select,
.admin-notes-input {
    border: 1px solid #c6c6cd;
    border-radius: 8px;
    background: #ffffff;
    color: #191c1e;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    line-height: 18px;
    padding: 8px 10px;
}

.admin-filter-select {
    width: 132px;
    flex: 0 0 auto;
}

.admin-notes-input {
    min-height: 38px;
}

.admin-action-row {
    margin-top: 0;
}

.admin-btn {
    min-height: 34px;
    border: 0;
    padding: 8px 11px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.admin-btn:hover {
    opacity: 0.9;
}

.admin-btn-secondary {
    background: #eef0f3;
}

.admin-toggle {
    justify-content: center;
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 8px;
    background: #f7f9fb;
    border: 1px solid #e6e8ea;
}

.admin-toggle input {
    width: 14px;
    height: 14px;
}

.admin-page-header {
    margin-bottom: 12px;
}

.admin-refresh-action {
    min-height: 32px;
    padding: 6px 11px;
    font-size: 12px;
}

.admin-summary-grid {
    gap: 10px;
    margin-bottom: 12px;
}

.admin-stat {
    min-height: 64px;
    padding: 10px;
    gap: 10px;
}

.admin-stat-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.admin-stat-icon {
    font-size: 19px;
}

.admin-stat-value {
    font-size: 18px;
    line-height: 22px;
}

.admin-stat-label {
    font-size: 11px;
    line-height: 15px;
}

.admin-sections-grid {
    gap: 12px;
}

.admin-panel-header {
    min-height: 58px;
    padding: 10px 12px;
}

.admin-panel-title {
    gap: 8px;
}

.admin-panel-title-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 18px;
}

.admin-panel-heading {
    font-size: 14px;
    line-height: 18px;
}

.admin-panel-subtitle {
    font-size: 11px;
    line-height: 15px;
}

.admin-list {
    min-height: 140px;
    padding: 10px;
    gap: 8px;
}

.admin-item {
    padding: 10px;
    gap: 8px;
}

.admin-item-title {
    font-size: 13px;
    line-height: 17px;
}

.admin-item-subtitle,
.admin-meta-value {
    font-size: 10.5px;
    line-height: 15px;
}

.admin-badge {
    min-height: 20px;
    padding: 1px 7px;
    font-size: 9.5px;
}

.admin-meta-grid {
    gap: 6px;
}

.admin-meta {
    padding: 6px;
}

.admin-meta-label {
    font-size: 9px;
    line-height: 12px;
}

.admin-filter-select,
.admin-select,
.admin-notes-input {
    font-size: 12px;
    line-height: 16px;
    padding: 6px 8px;
}

.admin-filter-select {
    width: 118px;
}

.admin-notes-input {
    min-height: 32px;
}

.admin-btn,
.admin-toggle {
    min-height: 30px;
    font-size: 11.5px;
}

.admin-btn {
    padding: 6px 9px;
}

.admin-toggle {
    padding: 6px 9px;
}

.admin-user-controls {
    grid-template-columns: auto auto;
    justify-content: end;
}

/* ─── Settings Experience ────────────────────────────────────── */

.settings-page {
    max-width: 1180px;
}

.settings-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.settings-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid #d9dbe0;
    border-radius: 999px;
    background: #ffffff;
    color: #45464d;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(19, 27, 46, 0.04);
}

.settings-status-pill .material-symbols-outlined {
    font-size: 17px;
    color: #166534;
}

.settings-shell {
    display: grid;
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.settings-sidebar-panel,
.settings-panel {
    border: 1px solid #d9dbe0;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(19, 27, 46, 0.04);
}

.settings-sidebar-panel {
    position: sticky;
    top: 68px;
    padding: 10px;
}

.settings-mini-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 12px;
    border-bottom: 1px solid #e6e8ea;
    margin-bottom: 8px;
}

.settings-mini-avatar,
.settings-profile-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #131b2e;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
}

.settings-mini-avatar {
    width: 38px;
    height: 38px;
    font-size: 14px;
}

.settings-mini-copy {
    min-width: 0;
}

.settings-mini-copy p {
    margin: 0;
    color: #191c1e;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    line-height: 17px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-mini-copy span {
    display: block;
    color: #76777d;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    line-height: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-nav-list {
    display: grid;
    gap: 3px;
}

.settings-nav-item {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 48px;
    padding: 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #45464d;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.settings-nav-item:hover {
    background: #f2f4f6;
    color: #191c1e;
}

.settings-nav-item:active {
    transform: scale(0.99);
}

.settings-nav-item > .material-symbols-outlined:first-child {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f2f4f6;
    color: #45464d;
    font-size: 17px;
}

.settings-nav-item-active {
    background: #131b2e;
    color: #ffffff;
}

.settings-nav-item-active:hover {
    background: #1e2942;
    color: #ffffff;
}

.settings-nav-item-active > .material-symbols-outlined:first-child {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.settings-nav-copy {
    min-width: 0;
}

.settings-nav-copy strong,
.settings-nav-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-nav-copy strong {
    font-family: 'Inter', sans-serif;
    font-size: 12.5px;
    line-height: 16px;
    font-weight: 800;
}

.settings-nav-copy small {
    margin-top: 1px;
    font-family: 'Inter', sans-serif;
    font-size: 10.5px;
    line-height: 14px;
    color: inherit;
    opacity: 0.72;
}

.settings-nav-arrow {
    font-size: 17px;
    opacity: 0.65;
}

.settings-content-panel {
    min-width: 0;
}

.settings-section {
    display: none;
}

.settings-section-active {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.settings-section-heading {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 12px;
}

.settings-section-heading > .material-symbols-outlined {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eef2ff;
    color: #334155;
    flex: 0 0 auto;
}

.settings-section-heading h3 {
    margin: 0;
    color: #191c1e;
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    line-height: 22px;
    font-weight: 850;
}

.settings-section-heading p {
    margin: 2px 0 0;
    color: #76777d;
    font-family: 'Inter', sans-serif;
    font-size: 12.5px;
    line-height: 17px;
}

.settings-panel {
    padding: 16px;
    margin-bottom: 12px;
}

.settings-panel:last-child {
    margin-bottom: 0;
}

.settings-profile-hero {
    display: flex;
    align-items: center;
    gap: 13px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid #e6e8ea;
}

.settings-profile-avatar {
    width: 58px;
    height: 58px;
    font-size: 21px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.settings-profile-meta {
    min-width: 0;
}

.settings-profile-meta h4 {
    margin: 0;
    color: #191c1e;
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    line-height: 23px;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.settings-profile-meta p {
    margin: 2px 0 8px;
    color: #76777d;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    line-height: 15px;
    overflow-wrap: anywhere;
}

.settings-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.settings-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 8px;
    border: 1px solid #d9dbe0;
    border-radius: 999px;
    background: #f7f9fb;
    color: #45464d;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    line-height: 14px;
    font-weight: 850;
    text-transform: uppercase;
    white-space: nowrap;
}

.settings-badge-success {
    border-color: #bbf7d0;
    background: #ecfdf3;
    color: #166534;
}

.settings-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.settings-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.settings-field-full {
    grid-column: 1 / -1;
}

.settings-field span {
    color: #76777d;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    line-height: 13px;
    font-weight: 850;
    text-transform: uppercase;
}

.settings-field input {
    width: 100%;
    min-height: 36px;
    border: 1px solid #c6c6cd;
    border-radius: 8px;
    background: #ffffff;
    color: #191c1e;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    line-height: 18px;
    padding: 8px 10px;
}

.settings-field input:focus {
    outline: none;
    border-color: #7bd0ff;
    box-shadow: 0 0 0 3px rgba(123, 208, 255, 0.2);
}

.settings-field input:disabled {
    background: #f7f9fb;
    color: #76777d;
    cursor: not-allowed;
}

.settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}

.settings-primary-btn,
.settings-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 34px;
    border: 0;
    border-radius: 8px;
    padding: 8px 12px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    line-height: 16px;
    font-weight: 850;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
    white-space: nowrap;
}

.settings-primary-btn {
    background: #131b2e;
    color: #ffffff;
}

.settings-primary-btn:hover {
    background: #1e2942;
}

.settings-secondary-btn {
    background: #eef0f3;
    color: #191c1e;
}

.settings-secondary-btn:hover {
    background: #e0e3e5;
}

.settings-primary-btn:active,
.settings-secondary-btn:active {
    transform: scale(0.98);
}

.settings-primary-btn:disabled,
.settings-secondary-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

.settings-primary-btn .material-symbols-outlined,
.settings-secondary-btn .material-symbols-outlined {
    font-size: 16px;
}

.settings-panel-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e6e8ea;
}

.settings-panel-title h4 {
    margin: 0;
    color: #191c1e;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 18px;
    font-weight: 850;
}

.settings-panel-title span {
    color: #76777d;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    line-height: 16px;
    font-weight: 650;
    white-space: nowrap;
}

.settings-info-list,
.settings-row-list {
    display: grid;
}

.settings-info-row {
    display: grid;
    grid-template-columns: minmax(110px, 0.36fr) minmax(0, 1fr);
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f2f4f6;
}

.settings-info-row:first-child {
    padding-top: 0;
}

.settings-info-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.settings-info-row span {
    color: #76777d;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    line-height: 16px;
    font-weight: 750;
}

.settings-info-row strong {
    min-width: 0;
    color: #191c1e;
    font-family: 'Inter', sans-serif;
    font-size: 12.5px;
    line-height: 17px;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.settings-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid #f2f4f6;
}

.settings-row:first-child {
    padding-top: 0;
}

.settings-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.settings-row-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f7f9fb;
    color: #45464d;
    font-size: 18px;
}

.settings-row strong {
    display: block;
    margin: 0;
    color: #191c1e;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    line-height: 17px;
    font-weight: 850;
}

.settings-row p {
    margin: 2px 0 0;
    color: #76777d;
    font-family: 'Inter', sans-serif;
    font-size: 11.5px;
    line-height: 16px;
}

.settings-row-value {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #ecfdf3;
    color: #166534;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    line-height: 14px;
    font-weight: 850;
    text-transform: uppercase;
    white-space: nowrap;
}

.settings-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 44px;
    height: 24px;
    flex: 0 0 auto;
    cursor: pointer;
}

.settings-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.settings-switch span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #c6c6cd;
    transition: background-color 0.18s ease;
}

.settings-switch span::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(19, 27, 46, 0.25);
    transition: transform 0.18s ease;
}

.settings-switch input:checked + span {
    background: #131b2e;
}

.settings-switch input:checked + span::after {
    transform: translateX(20px);
}

.settings-switch input:focus-visible + span {
    outline: 2px solid #7bd0ff;
    outline-offset: 2px;
}

body.settings-density-compact .settings-panel {
    padding: 13px;
}

body.settings-density-compact .settings-row {
    padding-top: 9px;
    padding-bottom: 9px;
}

body.settings-density-compact .settings-section-heading {
    margin-bottom: 9px;
}

body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
}

@media (max-width: 980px) {
    .settings-shell {
        grid-template-columns: 1fr;
    }

    .settings-sidebar-panel {
        position: static;
    }

    .settings-mini-profile {
        margin-bottom: 10px;
    }

    .settings-nav-list {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .settings-nav-item {
        min-width: 210px;
    }
}

@media (max-width: 640px) {
    .settings-page-header {
        flex-direction: column;
        gap: 10px;
    }

    .settings-status-pill {
        width: 100%;
        justify-content: center;
    }

    .settings-sidebar-panel,
    .settings-panel {
        border-radius: 8px;
    }

    .settings-mini-profile {
        padding-left: 2px;
        padding-right: 2px;
    }

    .settings-nav-item {
        min-width: 176px;
        grid-template-columns: 26px minmax(0, 1fr);
    }

    .settings-nav-arrow {
        display: none;
    }

    .settings-form-grid,
    .settings-info-row {
        grid-template-columns: 1fr;
    }

    .settings-row {
        grid-template-columns: 32px minmax(0, 1fr);
        align-items: start;
    }

    .settings-row .settings-switch,
    .settings-row .settings-secondary-btn,
    .settings-row .settings-row-value {
        grid-column: 2;
        justify-self: start;
        margin-top: 4px;
    }

    .settings-panel-title {
        flex-direction: column;
        gap: 2px;
    }

    .settings-panel-title span {
        white-space: normal;
    }

    .settings-actions {
        justify-content: stretch;
    }

    .settings-primary-btn {
        width: 100%;
    }
}

@media (max-width: 1180px) {
    .admin-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-sections-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── Responsive Adjustments ─────────────────────────────────── */

@media (max-width: 768px) {
    .admin-page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-refresh-action,
    .admin-filter-select {
        width: 100%;
    }

    .admin-summary-grid {
        grid-template-columns: 1fr;
    }

    .result-row {
        flex-direction: column;
        gap: 4px;
    }

    .result-label {
        min-width: unset;
    }

    .intel-source-header {
        flex-direction: column;
    }

    .intel-field {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .dns-table {
        display: block;
        overflow-x: auto;
    }

    .admin-panel-header,
    .admin-item-header {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-badge-row {
        justify-content: flex-start;
    }

    .admin-meta-grid,
    .admin-controls,
    .admin-user-controls {
        grid-template-columns: 1fr;
    }

    .toast {
        min-width: unset;
        max-width: calc(100vw - 48px);
    }
}

/* ─── Collapsible Sidebar ────────────────────────────────────── */

:root {
    --sidebar-width: 180px; /* Reduced from 220px for a more compact design */
}

@media (min-width: 768px) {
    body.sidebar-collapsed {
        --sidebar-width: 54px;
    }
}

#sidebar {
    width: var(--sidebar-width);
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s;
}

header {
    transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1), width 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s;
}

main {
    transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 768px) {
    header {
        margin-left: var(--sidebar-width) !important;
        width: calc(100% - var(--sidebar-width)) !important;
    }

    main {
        margin-left: var(--sidebar-width) !important;
    }

    body.sidebar-collapsed #sidebar .sidebar-brand-text,
    body.sidebar-collapsed #sidebar .nav-link span:not(.material-symbols-outlined),
    body.sidebar-collapsed #sidebar #sidebar-user-name,
    body.sidebar-collapsed #sidebar #sidebar-user-email,
    body.sidebar-collapsed #sidebar .signout-text {
        display: none !important;
    }

    body.sidebar-collapsed #sidebar .nav-link {
        padding-left: 0 !important;
        padding-right: 0 !important;
        justify-content: center !important;
        border-left-width: 0 !important;
    }

    body.sidebar-collapsed #sidebar .px-gutter {
        padding-left: 4px !important;
        padding-right: 4px !important;
        justify-content: center !important;
    }

    body.sidebar-collapsed #sidebar #sidebar-avatar + div {
        display: none !important;
    }

    body.sidebar-collapsed #sidebar .px-base {
        padding-left: 4px !important;
        padding-right: 4px !important;
    }

    body.sidebar-collapsed #sidebar-avatar {
        margin-left: auto;
        margin-right: auto;
    }

    body.sidebar-collapsed #sidebar button {
        padding-left: 0 !important;
        padding-right: 0 !important;
        justify-content: center !important;
    }
}
