:root {
    --primary: #082c5c;
    --secondary: #0d6efd;
    --accent: #8F0422;
    --light: #f5f8fc;
    --dark: #1d2939;
    --text: #475467;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', "Segoe UI", sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1180px;
}

/* HEADER */
.top-header {
    background:
        radial-gradient(circle at 8% 20%, rgba(8, 44, 92, 0.07) 0, rgba(8, 44, 92, 0) 28%),
        radial-gradient(circle at 85% 70%, rgba(143, 4, 34, 0.06) 0, rgba(143, 4, 34, 0) 30%),
        linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 3px solid var(--accent);
    padding: 18px 0;
    position: relative;
    overflow: hidden;
}

.top-header::before {
    content: "";
    position: absolute;
    top: -40px;
    right: 45px;
    width: 210px;
    height: 210px;
    background-image: url("https://upload.wikimedia.org/wikipedia/commons/thumb/6/60/Coat_of_arms_of_Johor.svg/250px-Coat_of_arms_of_Johor.svg.png");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    opacity: 0.035;
    pointer-events: none;
}

.top-header::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 360px;
    height: 100%;
    opacity: 0.08;
    background-image: repeating-linear-gradient(
        45deg,
        #082c5c,
        #082c5c 2px,
        transparent 2px,
        transparent 14px
    );
    pointer-events: none;
}

.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.brand-area {
    display: flex;
    align-items: center;
    gap: 26px;
}

.jata-wrap {
    width: 300px;
    height: 150px;
    flex: 0 0 300px;
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    border: none;
}

.jata-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.brand-text h1 {
    font-size: 30px;
    margin: 0;
    font-weight: 900;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: .5px;
    line-height: 1.18;
}

.brand-text p {
    margin: 6px 0 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: .3px;
}

/* NAVBAR */
.main-navbar {
    background: var(--primary);
    padding: 0;
    border-top: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 8px 20px rgba(8,44,92,.22);
    z-index: 9999;
}

.main-navbar .navbar-toggler {
    border: 0;
    padding: 10px 0;
}

.main-navbar .navbar-toggler:focus {
    box-shadow: none;
}

.main-navbar .navbar-toggler-icon {
    filter: invert(1);
}

.main-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.main-menu .nav-item {
    position: relative;
}

.main-navbar .main-menu .nav-link {
    color: #ffffff !important;
    padding: 17px 22px !important;
    font-size: 16px;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    letter-spacing: .1px;
}

.main-navbar .main-menu .nav-link i {
    color: #ffffff !important;
    font-size: 16px;
}

.main-navbar .main-menu .nav-link span {
    color: #ffffff !important;
}

.main-navbar .main-menu .nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 4px;
    background: var(--accent);
    transform: translateX(-50%);
    transition: .25s ease;
    border: none !important;
}

.main-navbar .main-menu .nav-link:hover,
.main-navbar .main-menu .nav-link.active {
    background: rgba(255,255,255,.14);
    color: #ffffff !important;
}

.main-navbar .main-menu .nav-link:hover::after,
.main-navbar .main-menu .nav-link.active::after {
    width: 100%;
}

.main-navbar .dropdown-toggle::after {
    position: static !important;
    width: auto !important;
    height: auto !important;
    margin-left: 4px;
    vertical-align: middle;
    background: transparent !important;
    transform: none !important;
    border-top: .35em solid #ffffff !important;
    border-right: .35em solid transparent !important;
    border-left: .35em solid transparent !important;
}

.main-navbar .dropdown-menu {
    background: #ffffff !important;
    border: 1px solid #dce4f0;
    border-radius: 14px;
    padding: 10px;
    margin-top: 0;
    min-width: 300px;
    box-shadow: 0 18px 42px rgba(8,44,92,.24);
    z-index: 99999;
}

.main-navbar .unit-dropdown {
    min-width: 450px;
}

.main-navbar .dropdown-item {
    color: #082c5c !important;
    background: transparent !important;
    padding: 12px 15px !important;
    font-size: 15px;
    font-weight: 800;
    border-radius: 10px;
    display: flex !important;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
    white-space: normal;
    line-height: 1.35;
}

.main-navbar .dropdown-item i {
    width: 20px;
    color: var(--accent) !important;
    font-size: 15px;
}

.main-navbar .dropdown-item span {
    color: #082c5c !important;
}

.main-navbar .dropdown-item:hover,
.main-navbar .dropdown-item.active {
    background: #eef5ff !important;
    color: var(--accent) !important;
}

.main-navbar .dropdown-item:hover span,
.main-navbar .dropdown-item.active span {
    color: var(--accent) !important;
}

@media (min-width: 992px) {
    .main-navbar .dropdown:hover > .dropdown-menu {
        display: block;
    }
}

/* HERO */
.hero-section {
    background:
        linear-gradient(135deg, rgba(8,44,92,0.95), rgba(13,110,253,0.85)),
        url('../img/bg-hero.jpg') center/cover;
    color: var(--white);
    padding: 80px 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 40px;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    background: rgba(143, 4, 34, 0.25);
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-text h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 18px;
    color: #eaf2ff;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-primary-custom {
    background: var(--accent);
    color: #ffffff;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: 0.3s;
}

.btn-primary-custom:hover {
    background: #6f031a;
    color: #ffffff;
}

.btn-outline-custom {
    border: 2px solid rgba(255,255,255,0.6);
    color: var(--white);
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
}

.btn-outline-custom:hover {
    background: rgba(255,255,255,0.12);
    color: #ffffff;
}

/* GENERAL */
.section-padding {
    padding: 70px 0;
}

.section-title {
    max-width: 760px;
    margin-bottom: 35px;
}

.section-title span {
    color: var(--accent);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: .08em;
}

.section-title h2 {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    margin-top: 8px;
}

.section-title p {
    color: var(--text);
    font-size: 16px;
    line-height: 1.7;
}

/* CONTENT */
.content-card {
    background: var(--white);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 12px 30px rgba(16, 24, 40, 0.08);
    border: 1px solid #eef2f7;
}

.content-card h2 {
    color: var(--primary);
    font-weight: 800;
    font-size: 26px;
    margin-bottom: 15px;
}

.content-card p {
    color: var(--text);
    line-height: 1.8;
}

/* TABLE */
.custom-table {
    font-size: 14px;
    vertical-align: middle;
}

.custom-table thead th {
    background: var(--primary);
    color: var(--white);
    padding: 14px;
}

.custom-table tbody td {
    padding: 14px;
}

/* CARTA ORGANISASI */
.carta-page {
    background: #f5f8fc;
    padding: 35px 0 55px;
}

.carta-page h1 {
    font-size: 30px;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 4px;
}

.carta-page p {
    font-size: 14px;
    color: var(--text);
    margin-bottom: 22px;
}

.carta-box {
    background: #ffffff;
    border-radius: 18px;
    padding: 18px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 12px 30px rgba(16, 24, 40, .08);
    text-align: center;
    overflow: hidden;
}

.carta-box img {
    width: 100%;
    max-width: 1050px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* PIAGAM PELANGGAN */
.piagam-page {
    background: #f5f8fc;
    padding: 45px 0 70px;
}

.piagam-hero {
    background: linear-gradient(135deg, #082c5c, #0d6efd);
    color: #ffffff;
    border-radius: 24px;
    padding: 38px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 14px 35px rgba(16, 24, 40, 0.12);
}

.piagam-hero h1 {
    font-size: 42px;
    font-weight: 900;
    margin-bottom: 12px;
}

.piagam-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.piagam-card {
    background: #ffffff;
    border: 1px solid #e5eaf3;
    border-radius: 18px;
    padding: 16px;
    display: grid;
    grid-template-columns: 70px 1fr 95px;
    gap: 14px;
    align-items: center;
    box-shadow: 0 8px 22px rgba(16, 24, 40, 0.07);
}

.piagam-no {
    background: var(--primary);
    color: #ffffff;
    border-radius: 14px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 900;
}

.piagam-text {
    color: #101828;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}

.piagam-tempoh {
    background: #f0f5ff;
    color: var(--primary);
    border-radius: 14px;
    padding: 10px 8px;
    text-align: center;
    border: 1px solid #dbe7f6;
}

.piagam-tempoh strong {
    display: block;
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
}

/* SISTEM DALAMAN */
.launcher-page {
    background: #f5f8fc;
    padding: 42px 0 70px;
}

.launcher-header {
    text-align: center;
    margin-bottom: 26px;
}

.launcher-header span {
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.launcher-header h1 {
    color: var(--primary);
    font-size: 34px;
    font-weight: 900;
    margin: 8px 0 4px;
}

.launcher-header p {
    color: var(--text);
    font-size: 15px;
    margin: 0;
}

.launcher-filter {
    background: #ffffff;
    border: 1px solid #e5eaf3;
    border-radius: 18px;
    padding: 14px;
    display: grid;
    grid-template-columns: 1fr 230px;
    gap: 12px;
    max-width: 760px;
    margin: 0 auto 28px;
    box-shadow: 0 8px 22px rgba(16, 24, 40, .06);
}

.launcher-filter input,
.launcher-filter select {
    border: 1px solid #d0d7e2;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    background: #ffffff;
}

.launcher-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
}

.launcher-card {
    min-height: 170px;
    background: #ffffff;
    border: 1px solid #e5eaf3;
    border-radius: 22px;
    padding: 18px 12px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .07);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: .25s ease;
    position: relative;
    overflow: hidden;
}

.launcher-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 38px rgba(8,44,92,.15);
}

.launcher-card::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 5px;
    width: 100%;
}

.launcher-icon {
    width: 68px;
    height: 68px;
    border-radius: 22px;
    background: #eef5ff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: .25s ease;
}

.launcher-card:hover .launcher-icon {
    transform: scale(1.08);
    color: #ffffff;
}

.launcher-card h3 {
    color: var(--primary);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.25;
    margin: 0;
}

.launcher-card span {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.launcher-card.blue::after,
.launcher-card.blue:hover .launcher-icon {
    background: #0d6efd;
}

.launcher-card.red::after,
.launcher-card.red:hover .launcher-icon {
    background: #8F0422;
}

.launcher-card.green::after,
.launcher-card.green:hover .launcher-icon {
    background: #067647;
}

.launcher-card.purple::after,
.launcher-card.purple:hover .launcher-icon {
    background: #6941c6;
}

.launcher-card.orange::after,
.launcher-card.orange:hover .launcher-icon {
    background: #f97316;
}

.launcher-card.teal::after,
.launcher-card.teal:hover .launcher-icon {
    background: #0f766e;
}

/* UNIT */
.unit-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

.unit-card {
    background: var(--white);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 12px 30px rgba(16, 24, 40, 0.08);
    border-top: 5px solid var(--accent);
}

.unit-card h3 {
    color: var(--primary);
    font-weight: 800;
    font-size: 21px;
    margin-bottom: 16px;
}

/* FOOTER */
.footer {
    background: #041631;
    color: var(--white);
    padding: 40px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
}

.footer h3 {
    font-size: 18px;
    font-weight: 800;
    margin: 0;
}

.footer p {
    margin: 0;
    color: #c8d6ea;
    font-size: 13px;
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .launcher-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .main-navbar .main-menu .nav-link {
        font-size: 15px;
        padding: 16px 16px !important;
    }
}

@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
    }

    .piagam-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991px) {
    .main-menu {
        align-items: stretch;
        gap: 0;
        padding: 8px 0 12px;
    }

    .main-navbar .main-menu .nav-link {
        width: 100%;
        padding: 14px 0 !important;
        border-bottom: 1px solid rgba(255,255,255,.08);
    }

    .main-navbar .main-menu .nav-link::after {
        display: none;
    }

    .main-navbar .dropdown-menu,
    .main-navbar .unit-dropdown {
        min-width: 100%;
        box-shadow: none;
        border-radius: 10px;
        margin-bottom: 8px;
    }
}

@media (max-width: 768px) {
    .top-header {
        padding: 14px 0;
    }

    .brand-area {
        gap: 14px;
    }

    .brand-text h1 {
        font-size: 17px;
    }

    .brand-text p {
        font-size: 11px;
    }

    .jata-wrap {
        width: 180px;
        height: 90px;
        flex: 0 0 180px;
    }

    .launcher-filter {
        grid-template-columns: 1fr;
    }

    .launcher-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .unit-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .brand-area {
        gap: 10px;
    }

    .brand-text h1 {
        font-size: 14px;
    }

    .brand-text p {
        font-size: 10px;
    }

    .jata-wrap {
        width: 135px;
        height: 68px;
        flex: 0 0 135px;
    }

    .launcher-grid {
        grid-template-columns: 1fr;
    }
    .login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(11, 47, 91, 0.16), transparent 34%),
        linear-gradient(135deg, #f5f7fb, #ffffff);
}

.login-box {
    width: min(100%, 420px);
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 30px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.login-header {
    text-align: center;
    margin-bottom: 24px;
}

.login-header img {
    width: 76px;
    height: 76px;
    object-fit: contain;
    margin: 0 auto 12px;
}

.login-header h1 {
    margin: 0;
    font-size: 22px;
    color: #082447;
}

.login-header p {
    margin: 6px 0 0;
    color: #6b7280;
    font-size: 13px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 700;
    color: #263238;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #0b2f5b;
    box-shadow: 0 0 0 3px rgba(11, 47, 91, 0.12);
}

.btn-primary {
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    background: #0b2f5b;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.btn-primary:hover {
    background: #082447;
}

.alert-error {
    margin-bottom: 16px;
    padding: 11px 13px;
    border-radius: 12px;
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fecaca;
    font-size: 13px;
}

.admin-layout {
    min-height: 100vh;
    display: flex;
    background: #f5f7fb;
}

.admin-sidebar {
    width: 270px;
    flex: 0 0 270px;
    background: #082447;
    color: #ffffff;
    padding: 22px;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 22px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.16);
}

.admin-logo img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    background: #ffffff;
    border-radius: 50%;
    padding: 6px;
}

.admin-logo strong {
    font-size: 17px;
}

.admin-menu {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.admin-menu a {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    color: rgba(255,255,255,0.88);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
}

.admin-menu a:hover,
.admin-menu a.active {
    background: rgba(255,255,255,0.14);
    color: #ffffff;
}

.admin-main {
    flex: 1;
    padding: 32px;
}

.admin-top {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-bottom: 26px;
}

.admin-top h1 {
    margin: 0;
    color: #082447;
    font-size: 32px;
}

.admin-top p {
    margin: 5px 0 0;
    color: #6b7280;
}

.admin-user-badge {
    padding: 9px 14px;
    border-radius: 999px;
    background: #e8f0fb;
    color: #0b2f5b;
    font-weight: 800;
    font-size: 12px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.dashboard-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.dashboard-card span {
    display: block;
    color: #6b7280;
    font-weight: 700;
    font-size: 13px;
}

.dashboard-card strong {
    display: block;
    margin: 10px 0 14px;
    font-size: 38px;
    color: #082447;
}

.dashboard-card a {
    color: #0b2f5b;
    font-weight: 800;
    font-size: 13px;
    text-decoration: none;
}

@media (max-width: 900px) {
    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        flex-basis: auto;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}
}