:root {
    --vm-bg: #f4f7f8;
    --vm-surface: #ffffff;
    --vm-surface-soft: #eef4f5;
    --vm-border: #dbe5e8;
    --vm-text: #102a43;
    --vm-text-soft: #5c6f82;
    --vm-primary: #11b8c8;
    --vm-primary-dark: #0f7f8a;
    --vm-secondary: #28496b;
    --vm-accent: #7fdde4;
    --vm-navy: #17324d;
    --vm-danger-bg: #fff1f2;
    --vm-danger-border: #fecdd3;
    --vm-danger-text: #b42318;
    --vm-success-bg: #ecfdf3;
    --vm-success-border: #abefc6;
    --vm-success-text: #067647;
    --vm-warning-bg: #fffaeb;
    --vm-warning-border: #fedf89;
    --vm-warning-text: #b54708;
    --vm-info-bg: #eff8ff;
    --vm-info-border: #b2ddff;
    --vm-info-text: #175cd3;
    --vm-shadow: 0 20px 45px rgba(16, 42, 67, 0.08);
    --vm-shadow-sm: 0 10px 22px rgba(16, 42, 67, 0.08);
    --vm-radius-lg: 24px;
    --vm-radius-md: 16px;
    --vm-radius-sm: 12px;
    --vm-font: "Segoe UI", Inter, Arial, sans-serif;
}

html {
    font-size: 14px;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top right, rgba(127, 221, 228, 0.18), transparent 22%), linear-gradient(135deg, #f7fbfc 0%, #eef5f6 100%);
    color: var(--vm-text);
    font-family: var(--vm-font);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

.table > :not(caption) > * > * {
    background-color: transparent;
}

.text-decoration-none {
    text-decoration: none !important;
}

/* Layout */
.vm-shell {
    min-height: 100vh;
    display: flex;
}

.vm-sidebar {
    width: 280px;
    background: linear-gradient(180deg, #17324d 0%, #102a43 100%);
    color: #fff;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.25rem;
    box-shadow: var(--vm-shadow);
    flex-shrink: 0;
}

.vm-sidebar-top {
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.vm-brand {
    display: block;
}

.vm-brand-logo {
    max-width: 180px;
    width: 100%;
    height: auto;
    display: block;
}

.vm-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.vm-nav-link {
    display: block;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 600;
    transition: 0.2s ease;
}

    .vm-nav-link:hover,
    .vm-nav-link.active {
        background: linear-gradient(135deg, rgba(17, 184, 200, 0.18), rgba(127, 221, 228, 0.12));
        color: #fff;
    }

.vm-sidebar-footer {
    margin-top: auto;
    padding-top: 1.5rem;
}

.vm-release-card {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1rem;
}

.vm-release-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.52);
    margin-bottom: 0.35rem;
    font-weight: 700;
}

.vm-release-version {
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.2rem;
}

.vm-release-date {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.62);
    margin-bottom: 0.65rem;
}

.vm-release-link {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--vm-accent);
    text-decoration: none;
}

    .vm-release-link:hover {
        color: #ffffff;
        text-decoration: underline;
    }

.vm-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.vm-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem 2rem 1rem;
}

.vm-topbar-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--vm-text);
}

.vm-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--vm-text-soft);
    font-size: 0.95rem;
    font-weight: 600;
}

.vm-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--vm-primary);
    box-shadow: 0 0 0 6px rgba(17, 184, 200, 0.12);
}

.vm-content {
    padding: 0 2rem 2rem;
}

/* Page */
.vm-page-header {
    margin-bottom: 1.5rem;
}

.vm-page-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 0.35rem;
}

.vm-page-copy {
    color: var(--vm-text-soft);
    margin: 0;
}

.vm-muted {
    color: var(--vm-text-soft);
}

/* Cards */
.vm-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--vm-border);
    border-radius: var(--vm-radius-lg);
    box-shadow: var(--vm-shadow);
}

.vm-card-body {
    padding: 1.5rem;
}

/* Forms */
.vm-field {
    margin-bottom: 1.1rem;
}

.vm-label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--vm-text);
}

.vm-input {
    width: 100%;
    border: 1px solid var(--vm-border);
    background: #fff;
    border-radius: 14px;
    padding: 0.95rem 1rem;
    outline: none;
    transition: 0.2s ease;
    color: var(--vm-text);
}

    .vm-input:focus {
        border-color: var(--vm-primary);
        box-shadow: 0 0 0 4px rgba(17, 184, 200, 0.14);
    }

.vm-button,
.vm-logout-button {
    border: 0;
    border-radius: 14px;
    padding: 0.95rem 1rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    transition: 0.2s ease;
}

.vm-button {
    width: 100%;
    background: linear-gradient(135deg, var(--vm-primary), var(--vm-primary-dark));
    color: #fff;
    box-shadow: 0 14px 28px rgba(15, 127, 138, 0.22);
}

    .vm-button:hover {
        transform: translateY(-1px);
        filter: brightness(1.02);
        color: #fff;
    }

.vm-logout-button {
    border: 1px solid var(--vm-border);
    background: rgba(255, 255, 255, 0.75);
    color: var(--vm-text);
    padding: 0.65rem 0.95rem;
    font-weight: 700;
}

    .vm-logout-button:hover {
        border-color: var(--vm-primary);
        color: var(--vm-primary-dark);
        box-shadow: 0 0 0 4px rgba(17, 184, 200, 0.12);
    }

.vm-download-button,
.vm-process-button {
    display: inline-block;
    padding: 0.5rem 0.85rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    transition: 0.2s ease;
    white-space: nowrap;
}

.vm-download-button {
    background: rgba(17, 184, 200, 0.12);
    color: var(--vm-primary-dark);
    border: 1px solid rgba(17, 184, 200, 0.25);
}

    .vm-download-button:hover {
        background: var(--vm-primary);
        color: #fff;
        box-shadow: 0 6px 14px rgba(17, 184, 200, 0.25);
    }

.vm-process-button {
    background: rgba(40, 73, 107, 0.10);
    color: var(--vm-secondary);
    border: 1px solid rgba(40, 73, 107, 0.18);
}

    .vm-process-button:hover {
        background: var(--vm-secondary);
        color: #fff;
        box-shadow: 0 6px 14px rgba(40, 73, 107, 0.20);
    }

/* Alerts */
.vm-alert {
    background: var(--vm-danger-bg);
    border: 1px solid var(--vm-danger-border);
    color: var(--vm-danger-text);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.vm-success-alert {
    background: var(--vm-success-bg);
    border: 1px solid var(--vm-success-border);
    color: var(--vm-success-text);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    font-weight: 600;
}

/* Tables */
.vm-table {
    margin-bottom: 0;
}

    .vm-table th {
        color: var(--vm-text-soft);
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        border-bottom-color: var(--vm-border);
        font-weight: 800;
    }

    .vm-table td {
        color: var(--vm-text);
        border-bottom-color: var(--vm-border);
        vertical-align: middle;
    }

.vm-table-subtext {
    margin-top: 0.2rem;
    color: var(--vm-text-soft);
    font-size: 0.82rem;
}

.vm-zero-row td {
    color: var(--vm-text-soft);
}

/* Pagination */
.pagination .page-link {
    border-radius: 10px;
    margin: 0 0.15rem;
    border-color: var(--vm-border);
    color: var(--vm-secondary);
    font-weight: 700;
    box-shadow: none;
}

    .pagination .page-link:hover {
        background: var(--vm-surface-soft);
        color: var(--vm-primary-dark);
        border-color: var(--vm-primary);
    }

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--vm-primary), var(--vm-primary-dark));
    border-color: transparent;
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    color: #98a2b3;
    background: #fff;
    border-color: var(--vm-border);
}

/* Badges */
.vm-badge {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.vm-badge-success {
    background: var(--vm-success-bg);
    color: var(--vm-success-text);
    border: 1px solid var(--vm-success-border);
}

.vm-badge-warning {
    background: var(--vm-warning-bg);
    color: var(--vm-warning-text);
    border: 1px solid var(--vm-warning-border);
}

.vm-badge-danger {
    background: #fef3f2;
    color: #b42318;
    border: 1px solid #fecdca;
}

.vm-badge-pending {
    background: var(--vm-info-bg);
    color: var(--vm-info-text);
    border: 1px solid var(--vm-info-border);
}

/* Dashboard */
.vm-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.vm-metric {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--vm-border);
    border-radius: 22px;
    padding: 1.25rem;
    box-shadow: var(--vm-shadow);
}

.vm-metric-label {
    color: var(--vm-text-soft);
    font-weight: 700;
    font-size: 0.88rem;
    margin-bottom: 0.5rem;
}

.vm-metric-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--vm-text);
}

.vm-metric-note {
    margin-top: 0.5rem;
    color: var(--vm-text-soft);
    font-size: 0.9rem;
}

/* Details / Info blocks */
.vm-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.vm-detail-item {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--vm-border);
    border-radius: 16px;
    padding: 1rem;
}

.vm-detail-label {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--vm-text-soft);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.35rem;
}

.vm-detail-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--vm-text);
}

/* Markets */
.vm-market-list,
.vm-market-admin-list,
.vm-stall-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.vm-stall-list {
    gap: 0.75rem;
}

.vm-market-block {
    border: 1px solid var(--vm-border);
    border-radius: 18px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.7);
}

.vm-market-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.vm-market-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--vm-text);
}

.vm-market-subtitle {
    color: var(--vm-text-soft);
    font-size: 0.9rem;
    margin-top: 0.2rem;
}

.vm-stall-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid var(--vm-border);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    background: #fff;
}

.vm-stall-name {
    font-weight: 700;
    color: var(--vm-text);
}

.vm-market-admin-card {
    border: 1px solid rgba(10, 27, 52, 0.08);
    border-radius: 18px;
    padding: 1rem 1rem 0.75rem;
    background: rgba(255, 255, 255, 0.55);
}

.vm-market-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.vm-market-admin-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--vm-navy);
    margin-bottom: 0.2rem;
}

.vm-market-admin-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    color: var(--vm-text-soft);
    font-size: 0.92rem;
}

.vm-market-admin-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.vm-market-admin-divider {
    height: 1px;
    background: rgba(10, 27, 52, 0.08);
    margin: 1rem 0;
}

/* Login */
.vm-login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
}

.vm-login-brand-panel {
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, rgba(16, 42, 67, 0.96), rgba(20, 69, 97, 0.92)), linear-gradient(135deg, #17324d 0%, #0f7f8a 100%);
    color: #fff;
    padding: 4rem;
    display: flex;
    align-items: flex-end;
}

    .vm-login-brand-panel::before,
    .vm-login-brand-panel::after {
        content: "";
        position: absolute;
        border-radius: 32px;
        transform: rotate(-35deg);
        opacity: 0.22;
    }

    .vm-login-brand-panel::before {
        width: 420px;
        height: 420px;
        background: linear-gradient(135deg, var(--vm-primary), transparent);
        top: -120px;
        right: -80px;
    }

    .vm-login-brand-panel::after {
        width: 380px;
        height: 380px;
        background: linear-gradient(135deg, var(--vm-accent), transparent);
        bottom: -160px;
        left: -100px;
    }

.vm-login-brand-content {
    position: relative;
    z-index: 1;
    max-width: 520px;
}

.vm-login-logo {
    max-width: 260px;
    width: 100%;
    height: auto;
    margin-bottom: 2rem;
    display: block;
}

.vm-login-kicker {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
    font-weight: 700;
    opacity: 0.72;
    margin-bottom: 1rem;
}

.vm-login-headline {
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.05;
    font-weight: 800;
    margin: 0 0 1rem;
}

.vm-login-copy {
    font-size: 1.02rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.84);
    margin: 0;
}

.vm-login-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.vm-login-card {
    width: 100%;
    max-width: 460px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(219, 229, 232, 0.9);
    border-radius: 28px;
    box-shadow: var(--vm-shadow);
    padding: 2rem;
}

    .vm-login-card h1 {
        font-size: 1.75rem;
        font-weight: 800;
        margin: 0 0 0.35rem;
    }

.vm-login-subtitle {
    color: var(--vm-text-soft);
    margin-bottom: 1.75rem;
}

/* Responsive */
@media (max-width: 1199.98px) {
    .vm-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .vm-login-page {
        grid-template-columns: 1fr;
    }

    .vm-login-brand-panel {
        min-height: 300px;
        padding: 2.5rem 2rem;
    }

    .vm-sidebar {
        display: none;
    }

    .vm-topbar,
    .vm-content {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .vm-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .vm-metrics {
        grid-template-columns: 1fr;
    }

    .vm-topbar {
        flex-direction: column;
        align-items: flex-start;
        padding-top: 1rem;
    }

    .vm-page-title {
        font-size: 1.6rem;
    }

    .vm-card-body {
        padding: 1rem;
    }

    .vm-stall-item,
    .vm-market-header,
    .vm-market-admin-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .vm-market-admin-actions {
        width: 100%;
    }
}
