﻿@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap");

:root {
    --bg-top: #0a0f1f;
    --bg-bottom: #12182d;
    --card: #151c35;
    --card-strong: #1d2544;
    --accent: #38f2c9;
    --accent-strong: #21b8ff;
    --text: #f4f4f6;
    --muted: #a3a6c7;
    --stroke: #2a2f55;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Outfit", "Segoe UI", sans-serif;
}

body {
    background: radial-gradient(circle at top, rgba(56, 242, 201, 0.18) 0%, transparent 60%),
        linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
    color: var(--text);
    min-height: 100vh;
}

.app {
    max-width: 1100px;
    margin: 0 auto;
    padding: 22px 20px 28px;
}

.app.login {
    max-width: 440px;
}

.layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    min-height: 100vh;
}

.sidebar {
    background: var(--card);
    border-radius: 18px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    box-shadow: 0 14px 30px rgba(15, 18, 40, 0.45);
    position: sticky;
    top: 18px;
    height: fit-content;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #120f1f;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 10px 24px rgba(33, 184, 255, 0.35);
}

.brand-icon svg {
    width: 26px;
    height: 26px;
}

.brand-title {
    font-weight: 600;
}

.brand-sub {
    font-size: 12px;
    color: var(--muted);
}

.user-block {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 10px;
}

.user-block span {
    color: var(--accent);
    font-weight: 600;
}

.balance {
    background: linear-gradient(135deg, rgba(56, 242, 201, 0.12), rgba(33, 184, 255, 0.12));
    border: 1px solid rgba(56, 242, 201, 0.35);
    padding: 14px 16px;
    border-radius: 16px;
    text-align: left;
    min-width: 160px;
    margin-bottom: 16px;
    box-shadow: 0 14px 30px rgba(33, 184, 255, 0.2);
}

.balance span {
    display: block;
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.6px;
}

.balance strong {
    font-size: 20px;
    letter-spacing: 0.4px;
}

.balance.pulse {
    animation: pulseGlow 1.2s ease;
}

.menu {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.menu a {
    text-align: left;
    padding: 12px 12px;
    border-radius: 12px;
    background: var(--card-strong);
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
    line-height: 1;
}

.menu a.active {
    background: #111a30;
    color: var(--text);
    font-weight: 600;
    border-color: rgba(33, 184, 255, 0.35);
    box-shadow: 0 10px 24px rgba(12, 18, 40, 0.45);
}

.menu-icon {
    width: 26px;
    height: 26px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(56, 242, 201, 0.25), rgba(33, 184, 255, 0.25));
    border: 1px solid rgba(56, 242, 201, 0.3);
    color: var(--text);
    font-size: 12px;
}
.menu a.active .menu-icon {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #0b1022;
}
.menu-icon::before {
    content: "";
}
\n.menu-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.menu a:hover {
    transform: translateY(-2px);
    color: var(--text);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.menu a.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--accent), var(--accent-strong));
}

main {
    display: grid;
    gap: 16px;
}

.content {
    padding: 4px 0 18px;
}

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

.page-header h2 {
    font-size: 22px;
    letter-spacing: 0.4px;
}

.card {
    background: var(--card);
    padding: 18px;
    border-radius: 16px;
    box-shadow: 0 14px 30px rgba(15, 18, 40, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
    overflow: hidden;
    animation: floatIn 0.4s ease;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card::after {
    content: "";
    position: absolute;
    top: -120px;
    right: -120px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(56, 242, 201, 0.18), transparent 60%);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(15, 18, 40, 0.65);
}

.card h2 {
    color: var(--accent);
    margin-bottom: 6px;
}

.muted {
    color: var(--muted);
    font-size: 13px;
}

label {
    display: block;
    margin-top: 12px;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--muted);
}

select,
input,
textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #0f1226;
    color: var(--text);
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2391a0c5' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
}

select:focus,
input:focus,
textarea:focus {
    outline: none;
    border-color: rgba(33, 184, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(33, 184, 255, 0.15);
}

textarea {
    min-height: 110px;
    resize: vertical;
}

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

.stack {
    display: grid;
    gap: 4px;
}

.btn {
    margin-top: 14px;
    width: 100%;
    padding: 12px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    font-weight: 600;
    cursor: pointer;
    color: #12101f;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.ghost {
    background: transparent;
    border: 1px solid var(--stroke);
    color: var(--text);
    width: auto;
    padding: 8px 12px;
    margin: 0;
}

.btn.ghost.danger {
    border-color: rgba(255, 122, 122, 0.4);
    color: #ff9a9a;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(33, 184, 255, 0.35);
}

.notice {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #10132b;
    border: 1px solid var(--stroke);
    color: var(--accent);
    animation: popIn 0.25s ease;
    box-shadow: 0 12px 24px rgba(10, 12, 26, 0.4);
}

.notice.error {
    color: #ff7a7a;
    border-color: rgba(255, 122, 122, 0.4);
}

.notice.success {
    color: #7ff0c0;
    border-color: rgba(127, 240, 192, 0.4);
}

.table {
    display: grid;
    gap: 8px;
}

.table-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 0.8fr;
    gap: 10px;
    align-items: center;
    background: #11142b;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: transform 0.2s ease, border 0.2s ease;
}

.table-head {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.table-row input,
.table-row select {
    width: 100%;
    margin: 0;
    padding: 8px 10px;
    background: #0e1328;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.table-row:hover {
    transform: translateY(-1px);
    border-color: rgba(199, 125, 255, 0.2);
}

.inline {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr auto;
    align-items: center;
}

.variation-row {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.product-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.product-card {
    background: #11142b;
    border-radius: 16px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: grid;
    gap: 16px;
}

.product-card.compact {
    padding: 0;
    overflow: hidden;
}

.product-toolbar {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 12px;
    margin-bottom: 16px;
}

.history-toolbar form {
    display: grid;
    gap: 8px;
    max-width: 320px;
    margin-bottom: 12px;
}

.product-toggle {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--text);
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    cursor: pointer;
}

.product-toggle.open {
    background: rgba(33, 184, 255, 0.08);
}

.product-title {
    font-weight: 600;
    font-size: 15px;
}

.product-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.product-panel {
    display: none;
    padding: 0 16px 16px;
    animation: floatIn 0.3s ease;
}

.product-panel.open {
    display: grid;
    gap: 16px;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.title-input {
    font-size: 16px;
    font-weight: 600;
}

.status-select {
    min-width: 120px;
}

.product-variations {
    display: grid;
    gap: 12px;
}

.variation-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    background: #0f1226;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.variation-actions {
    display: grid;
    grid-auto-flow: column;
    gap: 8px;
}

.product-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

@media (max-width: 720px) {
    .product-toolbar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .cost-panel {
        grid-template-columns: 1fr;
    }
}

.accordion {
    display: grid;
    gap: 12px;
}

.accordion-item {
    border-radius: 16px;
    background: #11142b;
    border: 1px solid rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.accordion-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    background: transparent;
    border: none;
    color: var(--text);
    padding: 14px 16px;
    cursor: pointer;
}

.accordion-toggle.open {
    background: rgba(199, 125, 255, 0.08);
}

.accordion-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.accordion-panel {
    display: none;
    padding: 0 16px 16px;
}

.accordion-panel.open {
    display: block;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.panel-title {
    font-weight: 600;
}

.empty-state {
    background: #0f1226;
    border-radius: 12px;
    padding: 12px;
    color: var(--muted);
    border: 1px dashed rgba(255, 255, 255, 0.08);
}

.table.compact .table-row {
    grid-template-columns: 1.6fr 0.6fr 0.6fr 1fr;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.actions {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    align-items: center;
}

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

.chip {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: #0f1226;
    border: 1px solid var(--stroke);
    font-size: 12px;
    margin-right: 6px;
}

.chip.ok {
    color: #7ff0c0;
}

.chip.warn {
    color: #ffdf7a;
}

.key-list {
    display: grid;
    gap: 8px;
}

.key-item {
    padding: 10px 12px;
    border-radius: 12px;
    background: #0f1226;
    border: 1px dashed rgba(199, 125, 255, 0.35);
    font-family: "Courier New", monospace;
}

.cost-panel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    background: #0f1226;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 12px;
}

.cost-panel strong {
    display: block;
    margin-top: 4px;
    font-size: 15px;
}

.profile-grid {
    display: grid;
    gap: 14px;
}

.mono {
    font-family: "Courier New", monospace;
    font-size: 12px;
}

footer {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: var(--muted);
}

.login {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.login .card {
    width: 100%;
}

.login-hint {
    margin-top: 10px;
    font-size: 12px;
    color: var(--muted);
}

.login-hint span {
    color: var(--accent);
    font-weight: 600;
}

.login-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: rgba(15, 18, 38, 0.8);
    border: 1px solid rgba(56, 242, 201, 0.3);
    box-shadow: 0 14px 30px rgba(33, 184, 255, 0.35);
}

.login-logo svg {
    width: 36px;
    height: 36px;
}

.toast {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translate(-50%, -8px);
    opacity: 0;
    padding: 10px 16px;
    border-radius: 999px;
    background: #12142b;
    border: 1px solid var(--stroke);
    color: var(--accent);
    z-index: 50;
    transition: opacity 0.25s ease, transform 0.25s ease;
    box-shadow: 0 12px 26px rgba(12, 14, 30, 0.5);
}

.toast.success {
    color: #7ff0c0;
    border-color: rgba(127, 240, 192, 0.4);
}

.toast.error {
    color: #ff7a7a;
    border-color: rgba(255, 122, 122, 0.4);
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.splash {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(9, 11, 25, 0.6);
    backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 40;
}

.splash.show {
    opacity: 1;
    pointer-events: auto;
}

.security-banner {
    position: fixed;
    bottom: 18px;
    right: 18px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(15, 18, 38, 0.9);
    border: 1px solid rgba(255, 122, 122, 0.4);
    color: #ff9a9a;
    font-size: 12px;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 60;
}

.devtools-detected .security-banner {
    opacity: 1;
    transform: translateY(0);
}

.devtools-detected .content,
.devtools-detected .sidebar {
    filter: blur(2px);
}

.splash-card {
    background: #141836;
    border-radius: 18px;
    padding: 20px 22px;
    border: 1px solid rgba(56, 242, 201, 0.3);
    text-align: center;
    box-shadow: 0 18px 40px rgba(12, 14, 30, 0.6);
    animation: popIn 0.3s ease;
}

.splash-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 10px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #120f1f;
    font-weight: 700;
    display: grid;
    place-items: center;
    letter-spacing: 1px;
}

.splash-text {
    font-weight: 600;
    margin-bottom: 12px;
}

.splash-bar {
    height: 6px;
    background: #0f1226;
    border-radius: 999px;
    overflow: hidden;
}

.splash-bar span {
    display: block;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
    animation: barFill 1.2s ease forwards;
}

.voucher {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(9, 11, 25, 0.7);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 55;
}

.voucher.show {
    opacity: 1;
    pointer-events: auto;
}

.voucher-card {
    width: min(360px, 92vw);
    background: #121735;
    border-radius: 18px;
    padding: 18px;
    border: 1px solid rgba(56, 242, 201, 0.35);
    box-shadow: 0 20px 40px rgba(9, 12, 26, 0.6);
    display: grid;
    gap: 12px;
    animation: popIn 0.25s ease;
}

.voucher-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.voucher-title {
    font-weight: 600;
}

.voucher-badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    letter-spacing: 0.6px;
    background: rgba(56, 242, 201, 0.2);
    color: var(--accent);
    border: 1px solid rgba(56, 242, 201, 0.4);
}

.voucher-row {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
}

.voucher-row strong {
    color: var(--text);
}

.voucher-row.total {
    padding-top: 6px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.credit-splash {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(9, 11, 25, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 55;
}

.credit-splash.show {
    opacity: 1;
}

.credit-card {
    background: #121735;
    border-radius: 18px;
    padding: 18px 20px;
    border: 1px solid rgba(56, 242, 201, 0.35);
    box-shadow: 0 20px 40px rgba(9, 12, 26, 0.6);
    text-align: center;
    display: grid;
    gap: 8px;
    min-width: 260px;
}

.credit-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #0b1022;
    font-weight: 700;
    display: grid;
    place-items: center;
}

.credit-title {
    font-weight: 600;
}

.credit-amount {
    font-size: 22px;
    color: var(--accent);
    font-weight: 700;
}

.credit-note {
    font-size: 12px;
    color: var(--muted);
}

.credit-balance {
    font-size: 12px;
    color: var(--text);
}

@media (max-width: 520px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .menu {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .table-row {
        grid-template-columns: 1fr;
    }
}

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

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes barFill {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 rgba(56, 242, 201, 0.0);
    }
    50% {
        box-shadow: 0 0 18px rgba(56, 242, 201, 0.45);
    }
    100% {
        box-shadow: 0 0 0 rgba(56, 242, 201, 0.0);
    }
}

.menu a.active::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(56, 242, 201, 0.08), transparent 60%);
    pointer-events: none;
}


