:root {
    --bg: #070b16;
    --bg-secondary: #0d1426;
    --card: rgba(255, 255, 255, 0.06);
    --card-strong: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.10);
    --text: #f4f7ff;
    --muted: rgba(244, 247, 255, 0.68);
    --primary: #6f8cff;
    --primary-2: #7a5cff;
    --success: #1ed760;
    --warning: #ffcf4a;
    --danger: #ff5d73;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background:
        radial-gradient(circle at top left, rgba(111, 140, 255, 0.22), transparent 28%),
        radial-gradient(circle at top right, rgba(122, 92, 255, 0.18), transparent 26%),
        linear-gradient(180deg, #070b16 0%, #0b1020 100%);
    color: var(--text);
    min-height: 100%;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    min-height: 100vh;
}

.page-wrap {
    min-height: 100vh;
    padding: 20px 0 28px;
}

.app-shell,
.admin-shell {
    max-width: 1240px;
}

.hero-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(111, 140, 255, 0.18), rgba(122, 92, 255, 0.12));
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: 22px 18px;
    margin-bottom: 18px;
}

.hero-card::before {
    content: "";
    position: absolute;
    inset: auto -40px -60px auto;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 70%);
    pointer-events: none;
}

.hero-top,
.hero-head {
    display: flex;
    gap: 16px;
}

.hero-top {
    align-items: flex-start;
}

.hero-head {
    flex-direction: column;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: #d9e3ff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.hero-title {
    font-size: clamp(1.5rem, 2.5vw, 2.35rem);
    line-height: 1.15;
    font-weight: 800;
    margin: 0 0 10px;
}

.hero-subtitle {
    margin: 0;
    max-width: 860px;
    color: var(--muted);
    font-size: 0.97rem;
    line-height: 1.7;
}

.hero-actions {
    display: grid;
    gap: 10px;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.left-panel,
.right-panel {
    min-width: 0;
}

.glass-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.swap-card,
.history-card,
.request-card,
.filter-bar,
.empty-card {
    padding: 18px;
}

.section-head {
    margin-bottom: 18px;
}

.section-head-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.section-title {
    margin: 0 0 6px;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.section-text {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.65;
}

.info-stack {
    display: grid;
    gap: 14px;
}

.info-item,
.form-group {
    display: grid;
    gap: 8px;
}

.info-label,
.form-label {
    font-size: 0.86rem;
    color: #dbe3ff;
    font-weight: 700;
    margin-bottom: 0;
}

.input-wrap {
    position: relative;
}

.app-input {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    color: #fff !important;
    border-radius: 14px !important;
    min-height: 52px;
    padding: 14px 16px !important;
    font-size: 0.96rem;
    box-shadow: none !important;
}

.app-input::placeholder {
    color: rgba(255, 255, 255, 0.42);
}

.app-input:focus {
    border-color: rgba(111, 140, 255, 0.8) !important;
    box-shadow: 0 0 0 3px rgba(111, 140, 255, 0.16) !important;
}

.app-input[readonly] {
    opacity: 1;
}

.app-textarea {
    min-height: 110px !important;
    resize: vertical;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    word-break: break-all;
    font-size: 0.85rem;
}

.button-row {
    display: grid;
    gap: 10px;
}

.top-actions,
.action-row {
    grid-template-columns: 1fr;
}

.app-btn {
    min-height: 52px;
    border-radius: 14px !important;
    font-weight: 700 !important;
    font-size: 0.96rem !important;
    border: none !important;
    box-shadow: none !important;
    transition: transform .18s ease, opacity .18s ease, box-shadow .18s ease !important;
}

.app-btn:active {
    transform: translateY(1px);
}

.app-btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2)) !important;
    color: #fff !important;
}

.app-btn-primary:hover {
    opacity: 0.96;
    box-shadow: 0 10px 24px rgba(111, 140, 255, 0.28) !important;
}

.app-btn-outline {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
}

.app-btn-outline:hover {
    background: rgba(255, 255, 255, 0.10) !important;
    color: #fff !important;
}

.app-btn-warning {
    background: linear-gradient(135deg, #ffdb76, #ffbf3d) !important;
    color: #1c1400 !important;
}

.app-btn-warning:hover {
    box-shadow: 0 10px 24px rgba(255, 207, 74, 0.24) !important;
}

.app-btn-success {
    background: linear-gradient(135deg, #2ee57a, #0fc962) !important;
    color: #07150d !important;
}

.app-btn-success:hover {
    box-shadow: 0 10px 24px rgba(30, 215, 96, 0.24) !important;
}

.app-btn-danger {
    background: linear-gradient(135deg, #ff7a8b, #ff4d67) !important;
    color: #fff !important;
}

.app-btn-danger:hover {
    box-shadow: 0 10px 24px rgba(255, 93, 115, 0.24) !important;
}

.app-btn-danger-soft {
    background: rgba(255, 93, 115, 0.12) !important;
    color: #ffb4be !important;
    border: 1px solid rgba(255, 93, 115, 0.16) !important;
}

.app-btn-danger-soft:hover {
    background: rgba(255, 93, 115, 0.18) !important;
    color: #fff !important;
}

.status-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 14px;
}

.status-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #dbe3ff;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.status-box {
    color: var(--muted);
    font-size: 0.93rem;
    line-height: 1.7;
    word-break: break-word;
}

.status-link,
.tx-link,
.history-link {
    color: #8fb0ff;
    text-decoration: none;
    word-break: break-all;
}

.status-link:hover,
.tx-link:hover,
.history-link:hover {
    color: #bfd0ff;
    text-decoration: underline;
}

.history-list,
.request-list {
    display: grid;
    gap: 14px;
}

.history-item,
.action-card,
.stat-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 15px;
}

.history-top,
.request-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.history-id,
.request-id {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.3;
}

.history-date,
.request-date {
    margin-top: 4px;
    font-size: 0.82rem;
    color: var(--muted);
}

.history-badge,
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.status-pending {
    background: rgba(255, 207, 74, 0.16);
    color: #ffd460;
    border: 1px solid rgba(255, 207, 74, 0.20);
}

.status-approved {
    background: rgba(30, 215, 96, 0.16);
    color: #53ef8f;
    border: 1px solid rgba(30, 215, 96, 0.20);
}

.status-rejected {
    background: rgba(255, 93, 115, 0.16);
    color: #ff8c9c;
    border: 1px solid rgba(255, 93, 115, 0.20);
}

.history-grid,
.detail-grid,
.stats-grid,
.action-panels {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.history-block,
.detail-item {
    min-width: 0;
}

.history-block-full,
.detail-item-full {
    grid-column: 1 / -1;
}

.history-label,
.detail-label,
.stat-label {
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.history-value,
.detail-value {
    color: #fff;
    font-size: 0.93rem;
    line-height: 1.7;
    word-break: break-word;
}

.history-loading,
.empty-state,
.processed-note {
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.10);
    border-radius: 18px;
    padding: 18px;
    text-align: center;
}

.empty-title,
.empty-state-title,
.action-title,
.filter-title {
    font-weight: 800;
    margin-bottom: 6px;
}

.empty-text,
.empty-state-text,
.history-loading,
.muted-text,
.action-text,
.filter-text,
.txhash-feedback,
.processed-note {
    color: var(--muted);
    line-height: 1.7;
}

.error-state {
    border-color: rgba(255, 93, 115, 0.20);
}

.alert-box {
    border-radius: 18px;
    padding: 14px 16px;
    margin-bottom: 18px;
    font-weight: 600;
    border: 1px solid transparent;
}

.alert-success {
    background: rgba(30, 215, 96, 0.12);
    color: #77f3a4;
    border-color: rgba(30, 215, 96, 0.18);
}

.alert-warning {
    background: rgba(255, 207, 74, 0.12);
    color: #ffd76e;
    border-color: rgba(255, 207, 74, 0.18);
}

.alert-danger {
    background: rgba(255, 93, 115, 0.12);
    color: #ff9ba8;
    border-color: rgba(255, 93, 115, 0.18);
}

.stat-card {
    box-shadow: var(--shadow);
}

.stat-value {
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1;
}

.stat-pending {
    background: rgba(255, 207, 74, 0.08);
    border-color: rgba(255, 207, 74, 0.14);
}

.stat-approved {
    background: rgba(30, 215, 96, 0.08);
    border-color: rgba(30, 215, 96, 0.14);
}

.stat-rejected {
    background: rgba(255, 93, 115, 0.08);
    border-color: rgba(255, 93, 115, 0.14);
}

.filter-bar {
    margin-bottom: 18px;
    display: grid;
    gap: 16px;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
    transition: .18s ease;
}

.filter-chip:hover {
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
}

.filter-chip.is-active {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    border-color: transparent;
}

.approve-card {
    border-color: rgba(30, 215, 96, 0.12);
}

.reject-card {
    border-color: rgba(255, 93, 115, 0.12);
}

.text-muted {
    color: var(--muted) !important;
}

.text-success {
    color: #5df09b !important;
}

.text-danger {
    color: #ff93a2 !important;
}

@media (min-width: 576px) {
    .page-wrap {
        padding-top: 26px;
        padding-bottom: 34px;
    }

    .hero-card {
        padding: 26px 22px;
    }

    .swap-card,
    .history-card,
    .request-card,
    .filter-bar,
    .empty-card {
        padding: 22px;
    }

    .top-actions,
    .action-row,
    .hero-actions {
        grid-template-columns: 1fr 1fr;
    }

    .history-grid,
    .detail-grid,
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 992px) {
    .content-grid {
        grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
        align-items: start;
    }

    .swap-card,
    .history-card,
    .request-card,
    .filter-bar,
    .empty-card {
        padding: 24px;
    }

    .history-list {
        max-height: calc(100vh - 220px);
        overflow: auto;
        padding-right: 6px;
    }

    .history-list::-webkit-scrollbar {
        width: 8px;
    }

    .history-list::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.12);
        border-radius: 999px;
    }

    .history-list::-webkit-scrollbar-track {
        background: transparent;
    }

    .hero-head {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .action-panels {
        grid-template-columns: 1.1fr 0.9fr;
    }
}

@media (max-width: 575.98px) {

    .app-shell,
    .admin-shell {
        padding-left: 12px;
        padding-right: 12px;
    }

    .hero-card {
        border-radius: 22px;
        padding: 18px 16px;
    }

    .swap-card,
    .history-card,
    .request-card,
    .filter-bar,
    .empty-card {
        border-radius: 20px;
        padding: 16px;
    }

    .hero-title {
        font-size: 1.38rem;
    }

    .hero-subtitle,
    .section-text,
    .history-value,
    .status-box,
    .detail-value,
    .action-text,
    .filter-text {
        font-size: 0.9rem;
    }

    .app-input,
    .app-btn {
        min-height: 50px;
    }

    .history-top,
    .request-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .history-badge,
    .status-badge {
        min-height: 28px;
    }
}

.input-with-action {
    position: relative;
}

.has-inner-button {
    padding-right: 90px !important;
}

/* tombol MAX */
.inner-action-btn {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);

    height: 36px;
    min-width: 60px;

    padding: 0 14px;
    border-radius: 10px;

    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(135deg, var(--primary), var(--primary-2));

    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    transition: all .18s ease;
}

/* hover glow */
.inner-action-btn:hover {
    opacity: 0.95;
    box-shadow: 0 4px 14px rgba(111, 140, 255, 0.35);
}

/* klik */
.inner-action-btn:active {
    transform: translateY(-50%) scale(0.96);
}

/* mobile tweak */
@media (max-width: 575.98px) {
    .inner-action-btn {
        height: 34px;
        min-width: 56px;
        font-size: 0.75rem;
    }

    .has-inner-button {
        padding-right: 84px !important;
    }
}

.swal-premium-popup {
    background: rgba(13, 20, 38, 0.96) !important;
    color: #f4f7ff !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    border-radius: 22px !important;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 1.2rem !important;
}

.swal-premium-title {
    color: #f4f7ff !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
}

.swal-premium-text {
    color: rgba(244, 247, 255, 0.72) !important;
    line-height: 1.65 !important;
    font-size: 0.95rem !important;
}

.swal-premium-confirm {
    min-height: 46px;
    border-radius: 12px !important;
    padding: 0 18px !important;
    border: none !important;
    background: linear-gradient(135deg, var(--primary), var(--primary-2)) !important;
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(111, 140, 255, 0.24) !important;
}

.swal-premium-confirm:hover {
    opacity: 0.96;
}

.swal-premium-toast {
    border-radius: 16px !important;
    padding: 0.85rem 1rem !important;
}

.swal2-icon.swal2-success [class^='swal2-success-line'],
.swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(30, 215, 96, 0.8) !important;
}

.swal2-icon.swal2-success .swal2-success-line-tip,
.swal2-icon.swal2-success .swal2-success-line-long {
    background-color: #1ed760 !important;
}

.swal2-icon.swal2-error {
    border-color: rgba(255, 93, 115, 0.75) !important;
    color: #ff5d73 !important;
}

.swal2-icon.swal2-warning {
    border-color: rgba(255, 207, 74, 0.75) !important;
    color: #ffcf4a !important;
}

.swal2-icon.swal2-info {
    border-color: rgba(111, 140, 255, 0.75) !important;
    color: #6f8cff !important;
}

.table-card {
    overflow: hidden;
}

.admin-table {
    --bs-table-bg: transparent;
    --bs-table-color: #f4f7ff;
    --bs-table-border-color: rgba(255, 255, 255, 0.08);
    margin: 0;
}

.admin-table thead th {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(244, 247, 255, 0.72);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
}

.admin-table tbody td {
    background: transparent;
    color: #f4f7ff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: middle;
    font-size: 0.92rem;
}

.admin-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.025);
}

.admin-table .app-textarea {
    min-height: 76px !important;
}

@media (max-width: 767.98px) {
    .admin-table {
        min-width: 980px;
    }
}