:root {
    --portal-primary: #0d6efd;
    --portal-teal: #0dcaf0;
    --portal-dark: #1a1d23;
    --portal-gray: #6c757d;
    --portal-light-bg: #f0f4f8;
    --portal-card-border: #e9ecef;
    --portal-sidebar-width: 250px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--portal-light-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.portal-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 0.6rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.navbar .nav-link {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem !important;
    border-radius: 0.25rem;
    transition: background 0.2s;
}

.navbar .nav-link:hover {
    background: rgba(255,255,255,0.1);
}

.navbar .nav-link i {
    margin-right: 0.35rem;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    border-radius: 0.5rem;
}

.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s, transform 0.2s;
    margin-bottom: 1.25rem;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--portal-card-border);
    font-weight: 600;
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background: transparent;
    border-top: 1px solid var(--portal-card-border);
}

.dashboard-card {
    cursor: default;
    overflow: hidden;
}

.dashboard-card .card-icon {
    font-size: 2rem;
    opacity: 0.15;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.dashboard-card .card-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.dashboard-card .card-label {
    font-size: 0.85rem;
    color: var(--portal-gray);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.card-dashboard {
    background: #fff;
    position: relative;
    min-height: 130px;
}

.welcome-banner {
    background: linear-gradient(135deg, var(--portal-primary), #0b5ed7);
    color: #fff;
    border-radius: 0.75rem;
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
}

.welcome-banner h1 {
    font-weight: 700;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.welcome-banner p {
    opacity: 0.9;
    font-size: 1rem;
    margin-bottom: 0;
}

.landing-hero {
    background: linear-gradient(135deg, var(--portal-primary) 0%, #0b5ed7 50%, var(--portal-teal) 100%);
    color: #fff;
    padding: 4rem 0;
    text-align: center;
}

.landing-hero h1 {
    font-weight: 800;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.landing-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.landing-hero .btn {
    padding: 0.6rem 2rem;
    font-weight: 600;
    border-radius: 2rem;
}

.benefit-card {
    text-align: center;
    padding: 2rem 1.5rem;
    height: 100%;
}

.benefit-card .benefit-icon {
    font-size: 2.5rem;
    color: var(--portal-primary);
    margin-bottom: 1rem;
}

.benefit-card h5 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.benefit-card p {
    font-size: 0.9rem;
    color: var(--portal-gray);
    margin-bottom: 0;
}

.login-card {
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
}

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

.login-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-logo i {
    font-size: 3rem;
    color: var(--portal-primary);
}

.login-logo h3 {
    font-weight: 700;
    margin-top: 0.5rem;
}

.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--portal-gray);
    border-top: none;
    padding: 0.75rem 0.75rem;
}

.table td {
    padding: 0.75rem;
    vertical-align: middle;
    font-size: 0.9rem;
}

.table-responsive {
    border-radius: 0.5rem;
}

.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    font-size: 0.8rem;
}

.page-title {
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

.page-title i {
    margin-right: 0.5rem;
    color: var(--portal-primary);
}

.section-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--portal-primary);
}

.portal-footer {
    background: var(--portal-dark);
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    padding: 1.5rem 0;
    margin-top: auto;
}

.portal-footer a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

.portal-footer a:hover {
    color: #fff;
}

.form-control:focus {
    border-color: var(--portal-primary);
    box-shadow: 0 0 0 0.2rem rgba(13,110,253,0.15);
}

.btn-primary {
    background: var(--portal-primary);
    border-color: var(--portal-primary);
}

.btn-primary:hover {
    background: #0b5ed7;
    border-color: #0b5ed7;
}

.form-label {
    font-weight: 500;
    font-size: 0.9rem;
    color: #444;
}

.alert {
    border-radius: 0.5rem;
    border: none;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--portal-gray);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.empty-state p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .landing-hero {
        padding: 3rem 0;
    }

    .landing-hero h1 {
        font-size: 1.75rem;
    }

    .welcome-banner {
        padding: 1.5rem;
    }

    .welcome-banner h1 {
        font-size: 1.35rem;
    }

    .dashboard-card .card-number {
        font-size: 1.6rem;
    }

    .page-title {
        font-size: 1.2rem;
    }

    .navbar-brand {
        font-size: 1.05rem;
    }

    .table th,
    .table td {
        font-size: 0.8rem;
        padding: 0.5rem;
    }

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

    .benefit-card {
        padding: 1.5rem 1rem;
    }

    .benefit-card .benefit-icon {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .landing-hero h1 {
        font-size: 1.4rem;
    }

    .landing-hero p {
        font-size: 0.95rem;
    }

    .welcome-banner {
        padding: 1.25rem;
    }

    .card-body {
        padding: 1rem;
    }

    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* Shared ERP breadcrumb format: Home | parent | current page. */
.breadcrumb-container {
    background: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.05);
}
.breadcrumb-container .breadcrumb-item a { color: #4e73df; text-decoration: none; }
.breadcrumb-container .breadcrumb-item.active { color: #5a5c69; }
