:root {
    --erp-bg: #f4f8fc;
    --erp-surface: #ffffff;
    --erp-text: #17212f;
    --erp-muted: #5f7186;
    --erp-primary: #0f6f8f;
    --erp-primary-2: #1c8fb3;
    --erp-accent: #18a67d;
    --erp-danger: #d6425b;
    --erp-border: #dce6ef;
    --erp-shadow: 0 10px 30px rgba(8, 30, 52, 0.08);
    --erp-shadow-soft: 0 6px 18px rgba(8, 30, 52, 0.06);
}

* {
    box-sizing: border-box;
}

html,
body {
    font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    color: var(--erp-text);
    background: var(--erp-bg);
    min-height: 100vh;
    overflow-x: clip;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
}

.erp-shell {
    position: relative;
    overflow-x: hidden;
}

.erp-bg-shape {
    position: fixed;
    border-radius: 50%;
    z-index: 0;
    filter: blur(2px);
    pointer-events: none;
}

.erp-bg-shape-a {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle at 30% 30%, rgba(28, 143, 179, 0.2), rgba(28, 143, 179, 0));
    top: -120px;
    right: -120px;
}

.erp-bg-shape-b {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle at 70% 70%, rgba(24, 166, 125, 0.16), rgba(24, 166, 125, 0));
    left: -180px;
    bottom: -170px;
}

.erp-navbar,
main,
.erp-footer {
    position: relative;
    z-index: 1;
    max-width: 100%;
}

.erp-navbar {
    background: linear-gradient(115deg, #0a607c, #1b8cae);
    box-shadow: 0 8px 22px rgba(11, 59, 82, 0.22);
    z-index: 1100;
}

.erp-navbar .dropdown-menu {
    z-index: 1200;
}

.erp-brand {
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}

.erp-brand:hover {
    color: #fff;
}

.erp-brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
}

.erp-brand-text {
    letter-spacing: 0.2px;
    font-weight: 700;
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.84);
    border-radius: 10px;
    padding: 0.52rem 0.8rem;
    margin-right: 0.2rem;
    transition: all 0.18s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
}

.erp-chip {
    border: 1px solid rgba(255, 255, 255, 0.32);
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.erp-chip:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
}

.erp-user-btn {
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.erp-user-btn:hover,
.erp-user-btn:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.22);
}

.card {
    border: 1px solid var(--erp-border);
    border-radius: 1rem;
    background: var(--erp-surface);
    box-shadow: var(--erp-shadow-soft);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--erp-border);
    padding: 0.9rem 1rem;
}

.table {
    margin-bottom: 0;
    width: 100%;
}

.table thead th {
    border-top: none;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--erp-muted);
    background-color: #f7fafc;
}

.table > :not(caption) > * > * {
    padding: 0.82rem 0.8rem;
    border-color: #edf2f6;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive > .table {
    min-width: 0;
}

.table-responsive > .table.table-wide {
    min-width: 720px;
}

.erp-page-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.erp-page-head .erp-head-actions {
    margin-left: auto;
}

.erp-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn {
    border-radius: 0.72rem;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(115deg, var(--erp-primary), var(--erp-primary-2));
    border-color: transparent;
}

.btn-primary:hover,
.btn-primary:focus {
    border-color: transparent;
    background: linear-gradient(115deg, #0d6382, #137c9d);
}

.btn-success {
    background: linear-gradient(115deg, #129c74, #17b586);
    border-color: transparent;
}

.form-label {
    font-size: 0.86rem;
    margin-bottom: 0.32rem;
}

.form-control,
.form-select,
.input-group-text {
    border-radius: 0.72rem;
    border-color: #d6e2eb;
}

.input-group > .form-control,
.input-group > .form-select {
    border-radius: 0;
}

.input-group > :first-child {
    border-top-left-radius: 0.72rem;
    border-bottom-left-radius: 0.72rem;
}

.input-group > :last-child {
    border-top-right-radius: 0.72rem;
    border-bottom-right-radius: 0.72rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #67acc5;
    box-shadow: 0 0 0 0.2rem rgba(30, 125, 155, 0.16);
}

.badge {
    border-radius: 999px;
    font-weight: 600;
    padding: 0.42em 0.7em;
}

.alert.erp-alert {
    border: 1px solid transparent;
    box-shadow: var(--erp-shadow-soft);
    border-radius: 0.9rem;
}

.erp-footer {
    color: #72859a;
    padding: 1rem 0 1.2rem;
}

.erp-sticky-panel {
    top: 92px !important;
}

.erp-auth-body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 20%, rgba(24, 166, 125, 0.10), transparent 22%),
        radial-gradient(circle at 85% 18%, rgba(28, 143, 179, 0.10), transparent 24%),
        radial-gradient(circle at 75% 80%, rgba(15, 111, 143, 0.08), transparent 22%),
        linear-gradient(180deg, #f4fbf8 0%, #eef7fb 52%, #edf8f4 100%);
    overflow: hidden;
    position: relative;
}

.erp-auth-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    position: relative;
    z-index: 2;
}

.erp-auth-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(8px);
}

.erp-auth-glow-a {
    width: 340px;
    height: 340px;
    top: -120px;
    left: -100px;
    background: radial-gradient(circle, rgba(24, 166, 125, 0.12), rgba(24, 166, 125, 0));
}

.erp-auth-glow-b {
    width: 360px;
    height: 360px;
    right: -130px;
    bottom: -140px;
    background: radial-gradient(circle, rgba(28, 143, 179, 0.12), rgba(28, 143, 179, 0));
}

.erp-login-card {
    width: min(440px, 100%);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(220, 230, 239, 0.95);
    border-radius: 1.5rem;
    box-shadow: 0 22px 50px rgba(8, 30, 52, 0.10);
    overflow: hidden;
}

.erp-login-card .card-body {
    padding: 2rem 2rem 1.5rem;
}

.erp-login-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    color: #fff;
    background: linear-gradient(135deg, var(--erp-accent), var(--erp-primary-2));
    box-shadow: 0 10px 24px rgba(16, 97, 126, 0.18);
}

.erp-login-card h1 {
    font-size: 1.9rem;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: #17212f;
}

.erp-login-card .text-muted {
    color: #6f8094 !important;
}

.erp-login-card .form-label {
    font-size: 0.92rem;
    font-weight: 700;
    color: #253247;
    margin-bottom: 0.45rem;
}

.erp-login-card .input-group {
    border: 1px solid #d6e2eb;
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
    box-shadow: none;
}

.erp-login-card .input-group-text {
    background: #fff;
    border: 0;
    color: #8a9aae;
    padding-left: 1rem;
    padding-right: 0.5rem;
}

.erp-login-card .form-control {
    border: 0;
    box-shadow: none !important;
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
    font-size: 1rem;
    color: #17212f;
}

.erp-login-card .form-control::placeholder {
    color: #95a3b5;
}

.erp-login-card .input-group:focus-within {
    border-color: #8fc7b2;
    box-shadow: 0 0 0 0.22rem rgba(24, 166, 125, 0.10);
}

.erp-login-card .btn-outline-secondary {
    border: 0;
    background: #fff;
    color: #8a9aae;
}

.erp-login-card .btn-outline-secondary:hover,
.erp-login-card .btn-outline-secondary:focus {
    color: var(--erp-primary);
    box-shadow: none;
}

.erp-btn-hero {
    border-radius: 1rem;
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
    font-size: 1rem;
    font-weight: 700;
    background: linear-gradient(115deg, var(--erp-accent), var(--erp-primary-2));
    border: none;
    box-shadow: 0 12px 26px rgba(24, 166, 125, 0.16);
}

.erp-btn-hero:hover,
.erp-btn-hero:focus {
    background: linear-gradient(115deg, #149570, #1a86a7);
    border: none;
}

@media (max-width: 576px) {
    .erp-auth-wrap {
        padding: 1rem;
    }

    .erp-login-card .card-body {
        padding: 1.5rem 1.25rem 1.25rem;
    }

    .erp-login-card h1 {
        font-size: 1.6rem;
    }
}
@media (max-width: 991px) {
    .navbar-collapse {
        margin-top: 0.8rem;
        background: rgba(9, 56, 73, 0.45);
        padding: 0.7rem;
        border-radius: 0.9rem;
    }

    .erp-sticky-panel {
        position: static !important;
        top: auto !important;
    }

    .table-responsive > .table.table-wide {
        min-width: 620px;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding-left: 0.9rem !important;
        padding-right: 0.9rem !important;
    }

    .card {
        border-radius: 0.85rem;
    }

    .table thead th {
        font-size: 0.72rem;
    }

    .erp-page-head {
        align-items: flex-start;
    }

    .erp-page-head .erp-head-actions {
        margin-left: 0;
        width: 100%;
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .erp-actions .btn,
    .erp-page-head .btn {
        width: 100%;
    }

    .table-responsive > .table.table-wide {
        min-width: 520px;
    }
}

@media print {
    .navbar,
    .btn,
    footer,
    .alert,
    .no-print {
        display: none !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #d7dde3 !important;
    }

    body {
        background: #fff !important;
    }
}
