:root {
    --bg: #0b0b0b;
    --fg: #f7f7f7;
    --muted: #9a9a9a;
    --card: #111111;
    --line: #1f1f1f;
    --accent: #ffffff;
    --pill: #0f0f0f;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    --radius: 16px;
    --font: "Space Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: radial-gradient(220% 120% at 20% 20%, #141414 0%, #050505 40%, #000000 100%);
    color: var(--fg);
    font-family: var(--font);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 18px 96px;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    backdrop-filter: blur(12px);
    background: rgba(0, 0, 0, 0.7);
    border-bottom: 1px solid var(--line);
}

.nav-brand {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: center;
}

.brand-logo {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #0a0a0a;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.brand-title {
    font-weight: 700;
    letter-spacing: 0.5px;
}

.brand-subtitle {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav-links a {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: border 0.2s ease, background 0.2s ease;
}

.nav-links a:hover {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.05);
}

.pill {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--pill);
    font-size: 13px;
    color: var(--fg);
}

.pill.large {
    padding: 10px 16px;
    font-weight: 600;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border 0.2s ease, background 0.2s ease;
}

.btn.primary {
    background: var(--accent);
    color: #000;
    box-shadow: 0 14px 30px rgba(255, 255, 255, 0.15);
}

.btn.secondary {
    background: #121212;
    color: var(--fg);
    border: 1px solid var(--line);
}

.btn.ghost {
    background: transparent;
    color: var(--fg);
    border: 1px solid var(--line);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.btn.disabled,
.btn[aria-disabled="true"] {
    opacity: 0.5;
    pointer-events: none;
}

.btn.wide {
    width: 100%;
}

.hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
    align-items: center;
    padding: 48px 0 32px;
}

.hero-text h1 {
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.15;
    margin: 8px 0 12px;
}

.lead {
    color: var(--muted);
    max-width: 620px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 12px;
    color: var(--muted);
}

.cta-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 18px 0 8px;
}

.status-row {
    color: var(--muted);
    font-size: 14px;
}

.hero-card {
    background: linear-gradient(160deg, #111111, #0a0a0a);
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 4px);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    font-weight: 600;
    background: rgba(255, 255, 255, 0.01);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.06);
}

.card-body {
    padding: 18px;
}

.list-title {
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--muted);
    margin-bottom: 10px;
}

.service-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #0c0c0c;
}

.service-name {
    font-weight: 600;
}

.card-foot {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.tiny-label {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.metric {
    font-size: 22px;
    font-weight: 700;
}

.section {
    padding: 48px 0 8px;
}

.section-head h2,
.section-head h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 36px);
}

.section-head p {
    color: var(--muted);
    max-width: 640px;
    margin-top: 8px;
}

.section-head.subhead h2 {
    margin: 8px 0 4px;
    font-size: clamp(24px, 3vw, 28px);
}

.section-head.subhead p {
    margin: 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-title {
    font-weight: 700;
    font-size: 18px;
    color: var(--fg);
}

.text-link {
    color: var(--accent);
    font-weight: 600;
}

.text-link:hover {
    text-decoration: underline;
}

.section.highlight {
    background: linear-gradient(180deg, #0f0f0f 0%, #050505 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow);
    margin-top: 32px;
}

.section.highlight h3 {
    margin: 10px 0 6px;
    font-size: 28px;
}

.section.highlight p {
    color: var(--muted);
    margin-bottom: 14px;
}

.footer {
    border-top: 1px solid var(--line);
    padding: 20px 18px 36px;
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.dashboard-grid .action-card {
    gap: 14px;
}

.dashboard-grid .actions {
    margin-top: auto;
}

.tool-card {
    position: relative;
    overflow: hidden;
    padding: 20px;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.tool-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.16);
    background: linear-gradient(180deg, #121212 0%, #0b0b0b 100%);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
}

.tool-card .card-title {
    margin-top: 6px;
    margin-bottom: 6px;
}

.tool-card p {
    color: var(--muted);
    margin: 0;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: #0e0e0e;
    border: 1px solid var(--line);
    font-weight: 600;
    font-size: 13px;
}

.chip.muted {
    color: var(--muted);
}

.pill.small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    padding: 4px 10px;
    background: #0e0e0e;
    border: 1px solid var(--line);
    margin-bottom: 8px;
}

.tool-card-form {
    margin: 0;
}

.tool-card-form button {
    width: 100%;
    text-align: left;
    border: inherit;
    background: inherit;
    color: inherit;
    padding: inherit;
    border-radius: inherit;
    appearance: none;
    cursor: pointer;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
    display: grid;
    place-items: center;
    padding: 18px;
    z-index: 50;
}

.modal {
    width: min(780px, 100%);
    background: #0e0e0e;
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 2px);
    padding: 22px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.modal::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.28), rgba(255,255,255,0.12), rgba(255,255,255,0.32));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    animation: modalGlow 2.4s ease infinite;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.modal-head h3 {
    margin: 6px 0;
}

.modal-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-description {
    color: var(--muted);
    margin: 6px 0 12px;
}

.lock-fields {
    display: grid;
    gap: 16px;
    margin: 14px 0 6px;
}

.field-label {
    font-weight: 600;
    margin-bottom: 4px;
    display: inline-block;
}

.file-drop {
    position: relative;
    border: 1px dashed var(--line);
    border-radius: 12px;
    padding: 16px;
    display: grid;
    place-items: center;
    background: #0c0c0c;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.file-drop:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: #101010;
}

.file-drop.has-file {
    border-color: rgba(255, 255, 255, 0.3);
    background: #121212;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 10px 26px rgba(0, 0, 0, 0.45);
}

.file-drop.has-file .file-drop-text {
    color: var(--fg);
    font-weight: 600;
}

.file-drop input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-drop-text {
    color: var(--muted);
}

.lock-fields input[type="password"] {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #0a0a0a;
    color: var(--fg);
    margin-top: -4px;
}

.download-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.download-note {
    color: var(--muted);
    font-size: 14px;
}

.tags-box {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    background: #0a0a0a;
    display: grid;
    gap: 10px;
}

.tags-row {
    display: flex;
    gap: 8px;
}

.tag-input {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #0b0b0b;
    color: var(--fg);
}

.tags-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #0d0d0d;
}

.tag-chip button {
    background: transparent;
    color: var(--fg);
    border: none;
    cursor: pointer;
}

.tags-suggestions {
    border-top: 1px solid var(--line);
    padding-top: 10px;
    display: grid;
    gap: 8px;
}

.tags-suggestions .tags-search input {
    width: 100%;
    background: #0f0f0f;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: #f5f5f5;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
}

.tags-suggestions .tags-list {
    max-height: 220px;
    overflow-y: auto;
    overflow-x: auto;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.tags-suggestions .page-chip {
    position: relative;
    background: #0c0c0c;
}

.pages-box {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    background: #0a0a0a;
    display: grid;
    gap: 10px;
}

.pages-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pages-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
}

.pages-list .merge-empty {
    grid-column: 1 / -1;
}

.page-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #0d0d0d;
    cursor: pointer;
    position: relative;
}

.page-chip input {
    width: 14px;
    height: 14px;
}

.page-preview {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: #0b0b0b;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px;
    box-shadow: var(--shadow);
    z-index: 5;
    display: none;
}

.page-preview img {
    max-width: 160px;
    max-height: 200px;
    display: block;
    border-radius: 8px;
}

.page-chip:hover .page-preview {
    display: block;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.close-btn {
    background: transparent;
    color: var(--fg);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
}

.modal-message {
    margin-top: 10px;
    color: var(--muted);
    font-size: 14px;
    animation: pulseNotice 0.5s ease;
}

.credit-warning {
    padding: 10px 12px;
    border-radius: 12px;
    background: #1a0f0f;
    border: 1px solid #402020;
    color: #ffb3b3;
    font-size: 14px;
    margin-top: 10px;
    animation: pulseNotice 0.5s ease;
}

[data-modal-backdrop][hidden] {
    display: none !important;
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tool-icon {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #0e0e0e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-size: 18px 18px;
    background-position: center;
    background-repeat: no-repeat;
}

.icon-lock {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23ffffff' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect x='5' y='11' width='14' height='9' rx='2'/%3E%3Cpath d='M9 11V8a3 3 0 0 1 6 0v3'/%3E%3Cpath d='M12 14v2'/%3E%3C/svg%3E");
}

.icon-unlock {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23ffffff' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect x='5' y='11' width='14' height='9' rx='2'/%3E%3Cpath d='M9 11V8a3 3 0 0 1 5-2'/%3E%3Cpath d='M12 14v2'/%3E%3C/svg%3E");
}

.icon-merge {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23ffffff' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M7 4v7a4 4 0 0 0 4 4h2'/%3E%3Cpath d='M17 4v6.5'/%3E%3Cpath d='M13 13l-2 2'/%3E%3Cpath d='M13 13l2 2'/%3E%3C/svg%3E");
}

.icon-split {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23ffffff' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 4v6'/%3E%3Cpath d='M7 20l5-10 5 10'/%3E%3Cpath d='M9 20h6'/%3E%3C/svg%3E");
}

.icon-compress {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23ffffff' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M8 10l-3 3 3 3'/%3E%3Cpath d='M16 10l3 3-3 3'/%3E%3Cpath d='M10 7h4'/%3E%3Cpath d='M10 17h4'/%3E%3C/svg%3E");
}

.icon-pdf-to-image {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23ffffff' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect x='5' y='4' width='9' height='14' rx='2'/%3E%3Cpath d='M14 9h5v9a2 2 0 0 1-2 2H8'/%3E%3Cpath d='M9 7h3'/%3E%3Cpath d='M9 11h2'/%3E%3Cpath d='M9 15h1'/%3E%3Ccircle cx='16' cy='12' r='1.5'/%3E%3C/svg%3E");
}

.icon-image-to-pdf {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23ffffff' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect x='6' y='5' width='12' height='14' rx='2'/%3E%3Cpath d='M6 15l3.5-3.5a1 1 0 0 1 1.4 0L15 16l2-2'/%3E%3Ccircle cx='10' cy='9' r='1.2'/%3E%3Cpath d='M12 5v-1h3l3 3v2'/%3E%3C/svg%3E");
}

.icon-remove {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23ffffff' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect x='5' y='4' width='14' height='16' rx='2'/%3E%3Cpath d='M9 9h6'/%3E%3Cpath d='M9 13h6'/%3E%3Cpath d='M9 17h6'/%3E%3C/svg%3E");
}

.icon-redact {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23ffffff' stroke='%23000' stroke-width='0' viewBox='0 0 24 24'%3E%3Crect x='4' y='6' width='16' height='3' rx='1.5'/%3E%3Crect x='4' y='11' width='12' height='3' rx='1.5'/%3E%3Crect x='4' y='16' width='8' height='3' rx='1.5'/%3E%3C/svg%3E");
}

.icon-generic {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23ffffff' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='6'/%3E%3Cpath d='M12 8v4l2 2'/%3E%3C/svg%3E");
}

.credit-panel {
    width: 100%;
    background: linear-gradient(135deg, rgba(0, 140, 255, 0.1), rgba(0, 255, 200, 0.05)), #060606;
    border: 1px solid rgba(0, 150, 255, 0.35);
    border-radius: calc(var(--radius) + 6px);
    padding: 20px;
    box-shadow: 0 0 30px rgba(0, 140, 255, 0.12), 0 10px 40px rgba(0, 0, 0, 0.35);
    margin: 14px 0 18px;
    position: relative;
    overflow: hidden;
}

.credit-panel::before {
    content: "";
    position: absolute;
    inset: -30%;
    background: radial-gradient(circle at 20% 30%, rgba(0, 180, 255, 0.3), transparent 45%),
        radial-gradient(circle at 80% 10%, rgba(0, 255, 170, 0.2), transparent 35%);
    filter: blur(30px);
    z-index: 0;
}

.credit-panel > * {
    position: relative;
    z-index: 1;
}

.credit-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.credit-pill {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(0, 200, 255, 0.5);
    background: rgba(0, 200, 255, 0.08);
    color: #dff6ff;
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.credit-glow {
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(circle, #4df3ff 0%, rgba(77, 243, 255, 0) 65%);
    box-shadow: 0 0 12px rgba(77, 243, 255, 0.7);
    animation: pulse 2s infinite;
}

.credit-panel .credit-label {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
    color: #9fdcff;
}

.credit-label {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
    color: var(--muted);
}

.credit-value {
    font-size: 36px;
    font-weight: 800;
    margin: 4px 0 6px;
    color: #e8f8ff;
    text-shadow: 0 0 20px rgba(0, 200, 255, 0.4);
}

.credit-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

.topup-btn {
    background: linear-gradient(135deg, #ff003c, #ff5e62);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    box-shadow: 0 10px 28px rgba(255, 0, 60, 0.55), 0 0 28px rgba(255, 94, 98, 0.7), 0 0 12px rgba(255, 94, 98, 0.8);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.topup-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 34px rgba(255, 0, 60, 0.65), 0 0 32px rgba(255, 94, 98, 0.85), 0 0 14px rgba(255, 94, 98, 0.9);
    filter: saturate(1.1);
}

.topup-btn:active {
    transform: translateY(0);
}

.topup-wrap {
    position: relative;
    padding: 0;
    margin: 0;
}

.topup-wrap[hidden] {
    display: none;
}

.topup-tooltip {
    position: absolute;
    top: 50%;
    left: calc(100% + 10px);
    transform: translateY(-50%);
    background: rgba(15, 15, 15, 0.95);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    border: 1px solid rgba(255, 94, 98, 0.4);
    box-shadow: 0 8px 20px rgba(0,0,0,0.35);
    z-index: 2;
}

.topup-wrap.modal .topup-tooltip {
    display: none;
}

.topup-btn.small {
    padding: 10px;
    font-size: 12px;
}

.modal-credit-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topup-table-wrap {
    margin-top: 18px;
    background: #0a0a0a;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.topup-table-header {
    padding: 12px 16px;
    font-weight: 700;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(0, 140, 255, 0.15), rgba(0, 255, 200, 0.08));
}

.topup-table {
    width: 100%;
    border-collapse: collapse;
}

.topup-table th,
.topup-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.topup-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.topup-table td:nth-child(1) {
    font-weight: 700;
}

.topup-action {
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 700;
}

.topup-hint {
    margin: 12px 16px 16px;
    color: var(--muted);
    font-size: 14px;
}

.support-card {
    margin: 12px 0 16px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.14), rgba(0, 255, 200, 0.08));
    border: 1px solid rgba(0, 200, 255, 0.4);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.support-title {
    font-weight: 800;
    font-size: 18px;
}

.support-copy {
    margin: 4px 0 10px;
    color: var(--muted);
}

.support-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pill.strong {
    font-weight: 700;
    letter-spacing: 0.4px;
}

.topup-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: grid;
    place-items: center;
    z-index: 999;
}

.topup-modal-backdrop[hidden] {
    display: none !important;
}

.topup-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.topup-modal {
    background: #0b0b0b;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    padding: 26px 26px 30px;
    position: relative;
    width: min(580px, 92vw);
}

.topup-modal-body h3 {
    margin: 0 0 6px;
}

.topup-modal-copy {
    margin: 0 0 12px;
    color: var(--muted);
}

.topup-qr {
    display: flex;
    justify-content: center;
    margin: 10px 0 14px;
}

.topup-qr img {
    width: 420px;
    height: auto;
    border-radius: 10px;
    border: 1px solid var(--line);
}

.topup-modal-meta {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
}

.topup-instructions {
    margin: 10px 0 12px;
    padding: 10px;
    border: 1px dashed rgba(0, 200, 255, 0.5);
    border-radius: 10px;
    background: rgba(0, 200, 255, 0.05);
}

.support-links.inline {
    gap: 8px;
}

.search-row {
    display: flex;
    gap: 10px;
    margin: 12px 0;
}

.search-row input[type="text"] {
    flex: 1;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #0f0f0f;
    color: #f5f5f5;
}

.meta-list {
    display: grid;
    gap: 4px;
}

.meta-item {
    font-size: 12px;
    color: var(--muted);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #0f0f0f;
    border-top: 1px solid var(--line);
}

.pagination a {
    color: #dff6ff;
}

.pagination .disabled {
    color: var(--muted);
}

.pagination .page-count {
    color: var(--muted);
}

.credit-note {
    color: var(--muted);
    margin: 0;
    font-size: 14px;
}

.chip.credit-chip {
    background: linear-gradient(90deg, rgba(0, 200, 255, 0.16), rgba(0, 255, 200, 0.1));
    border: 1px solid rgba(0, 200, 255, 0.4);
    color: #dff6ff;
    box-shadow: 0 0 12px rgba(0, 200, 255, 0.25);
}

.message-stack {
    display: grid;
    gap: 8px;
    margin: 12px 0;
}

.message {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #0f0f0f;
    animation: pulseNotice 0.5s ease;
}

.message.success {
    border-color: #1f3b1f;
    background: #0f1a0f;
    color: #c0f6c0;
}

.message.error {
    border-color: #402020;
    background: #1a0f0f;
    color: #ffb3b3;
}

.modal-message.error,
[data-modal-message].error {
    color: #ffb3b3;
    font-weight: 600;
}

.modal-message.warning,
[data-modal-message].warning {
    color: #ffd580;
    font-weight: 600;
}

.btn.highlight {
    box-shadow: 0 0 0 2px rgba(255, 213, 128, 0.4), 0 10px 30px rgba(255, 213, 128, 0.25);
    transform: translateY(-1px);
    animation: pulseGlow 1s ease infinite alternate;
}

@keyframes pulseGlow {
    from { box-shadow: 0 0 0 2px rgba(255, 213, 128, 0.4), 0 10px 30px rgba(255, 213, 128, 0.25); }
    to { box-shadow: 0 0 0 3px rgba(255, 213, 128, 0.6), 0 14px 36px rgba(255, 213, 128, 0.35); }
}

@keyframes pulseNotice {
    0% { transform: scale(1); }
    40% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.auth {
    display: grid;
    place-items: center;
    min-height: 60vh;
}

.auth-card {
    width: min(420px, 100%);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.auth-card form {
    display: grid;
    gap: 12px;
}

.auth-card label {
    font-weight: 600;
}

.auth-card input {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #0a0a0a;
    color: var(--fg);
}

.form-errors,
.field-errors {
    margin-top: 6px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #1a0f0f;
    border: 1px solid #402020;
    color: #ffb3b3;
    font-size: 14px;
    line-height: 1.4;
}

.form-errors {
    margin-bottom: 10px;
}

.auth-actions {
    margin: 12px 0;
}

.divider {
    text-align: center;
    color: var(--muted);
    margin: 12px 0;
    position: relative;
}

.divider::before,
.divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 38%;
    height: 1px;
    background: var(--line);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

@media (max-width: 700px) {
    .navbar {
        position: static;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .hero {
        grid-template-columns: 1fr;
    }
    .card-foot {
        grid-template-columns: 1fr;
    }
    .footer {
        flex-direction: column;
        gap: 8px;
    }
}



