:root {
    --dc-sidebar-width: 270px;
    --dc-dark: #111827;
    --dc-dark-soft: #1f2937;
    --dc-border: #e5e7eb;
    --dc-muted: #6b7280;
    --dc-bg: #f4f6f9;
}

body {
    background: var(--dc-bg);
    color: #1f2937;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 18% 15%, rgba(13, 110, 253, .16), transparent 28%),
        linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
}

.auth-card {
    width: min(100%, 430px);
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(17, 24, 39, .12);
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.app-sidebar {
    width: var(--dc-sidebar-width);
    min-height: 100vh;
    position: fixed;
    inset: 0 auto 0 0;
    background: var(--dc-dark);
    color: #fff;
    padding: 20px 16px;
    z-index: 1030;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    margin-bottom: 16px;
}

.app-brand-icon {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: #0d6efd;
}

.app-sidebar .nav-link {
    color: rgba(255, 255, 255, .75);
    border-radius: 8px;
    padding: 11px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-sidebar .nav-link:hover,
.app-sidebar .nav-link.active {
    color: #fff;
    background: var(--dc-dark-soft);
}

.app-main {
    width: 100%;
    margin-left: var(--dc-sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    background: #fff;
    border-bottom: 1px solid var(--dc-border);
    min-height: 72px;
    display: flex;
    align-items: center;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.app-content {
    flex: 1;
    padding: 28px;
}

.app-footer {
    border-top: 1px solid var(--dc-border);
    color: var(--dc-muted);
    padding: 18px 28px;
    background: #fff;
}

.metric-card,
.content-card {
    background: #fff;
    border: 1px solid var(--dc-border);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}

.metric-icon {
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
}

.table > :not(caption) > * > * {
    vertical-align: middle;
}

.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.empty-state {
    border: 1px dashed var(--dc-border);
    border-radius: 8px;
    padding: 32px;
    text-align: center;
    color: var(--dc-muted);
    background: #fff;
}

.public-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 16% 12%, rgba(13, 110, 253, .16), transparent 28%),
        radial-gradient(circle at 84% 4%, rgba(16, 185, 129, .13), transparent 26%),
        #f5f7fb;
}

.public-shell {
    min-height: 100vh;
    padding: 28px;
    background-size: cover;
    background-position: center;
}

.public-shell.has-cover {
    display: grid;
    place-items: center;
}

.public-hero {
    min-height: 380px;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, .86), rgba(15, 23, 42, .42)),
        linear-gradient(135deg, #172033, #31415d);
    background-size: cover;
    background-position: center;
    display: grid;
    place-items: center;
    padding: 48px 24px;
    color: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .18);
}

.public-hero-content {
    width: min(100%, 760px);
    text-align: center;
}

.public-hero h1 {
    font-size: 3.25rem;
    font-weight: 750;
    margin: 18px 0 12px;
}

.public-hero p {
    max-width: 720px;
    margin: 0 auto;
    color: rgba(255, 255, 255, .84);
    font-size: 1.08rem;
}

.public-logo {
    width: 96px;
    height: 96px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    padding: 10px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
}

.public-logo-fallback {
    display: inline-grid;
    place-items: center;
    color: var(--public-primary, #0d6efd);
    font-size: 2rem;
}

.public-registration-wrap {
    width: min(100%, 980px);
    margin: -72px auto 0;
    position: relative;
    z-index: 2;
}

.public-card {
    width: min(100%, 980px);
    margin: 0 auto;
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 8px;
    box-shadow: 0 28px 90px rgba(15, 23, 42, .18);
    padding: 40px;
    backdrop-filter: blur(14px);
}

.public-thanks {
    max-width: 640px;
}

.public-kicker {
    color: var(--public-primary, #0d6efd);
    text-transform: uppercase;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: 0;
}

.public-submit {
    background: var(--public-primary, #0d6efd);
    border-color: var(--public-primary, #0d6efd);
    color: #fff;
    font-weight: 700;
    padding: 12px 18px;
    border-radius: 8px;
}

.public-submit:hover {
    color: #fff;
    filter: brightness(.94);
}

.public-success-icon {
    width: 70px;
    height: 70px;
    display: inline-grid;
    place-items: center;
    margin: 24px auto 18px;
    border-radius: 999px;
    background: #eef4ff;
    color: var(--public-primary, #0d6efd);
    font-size: 2rem;
}

.merchant-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 10%, rgba(13, 110, 253, .14), transparent 28%),
        radial-gradient(circle at 88% 0%, rgba(25, 135, 84, .12), transparent 26%),
        #f4f6f9;
}

.merchant-login-wrap,
.merchant-shell {
    min-height: 100vh;
    padding: 24px;
}

.merchant-login-wrap {
    display: grid;
    place-items: center;
}

.merchant-login-card,
.merchant-card,
.merchant-header {
    background: rgba(255, 255, 255, .98);
    border: 1px solid var(--dc-border);
    border-radius: 8px;
    box-shadow: 0 22px 70px rgba(15, 23, 42, .12);
}

.merchant-login-card {
    width: min(100%, 440px);
    padding: 34px;
}

.merchant-shell {
    width: min(100%, 980px);
    margin: 0 auto;
}

.merchant-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    margin-bottom: 18px;
}

.merchant-card {
    padding: 28px;
}

.merchant-card .form-control-lg,
.merchant-card .form-select-lg {
    min-height: 54px;
}

.merchant-save {
    min-height: 58px;
    font-weight: 750;
}

@media (max-width: 991.98px) {
    .app-sidebar {
        position: static;
        width: 100%;
        min-height: auto;
        border-radius: 0;
    }

    .app-shell {
        display: block;
    }

    .app-main {
        margin-left: 0;
    }

    .app-header,
    .app-content,
    .app-footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    .public-shell {
        padding: 14px;
    }

    .public-hero {
        min-height: 320px;
    }

    .public-hero h1 {
        font-size: 2.25rem;
    }

    .public-card {
        padding: 24px;
    }

    .public-registration-wrap {
        margin-top: -44px;
    }

    .merchant-login-wrap,
    .merchant-shell {
        padding: 14px;
    }

    .merchant-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .merchant-card,
    .merchant-login-card {
        padding: 22px;
    }
}
