/* ===============================
   RESET & BASE
================================ */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background-color: #f4f6f9;
}

/*  HEADER  */
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}


.demo-banner {
    background: #ff9800;
    color: #000;
    text-align: center;
    padding: 6px 12px;
    font-weight: 600;
    font-size: 13px;
}


/*  NAVBAR */
.navbar {
    background: #0B3C89;
    padding: 14px 0;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    height: 40px;
    width: auto;
}

.brand-text {
    line-height: 1.1;
}

.brand-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.brand-subtitle {
    font-size: 12px;
    color: #d4d4d4;
}

.user-dropdown { position: relative; }

.user-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid rgba(255,255,255,.6);
    border-radius: 10px;
    padding: 6px 12px;
    cursor: pointer;
}

.user-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: #1D4ED8;
}

.user-role {
    font-size: 11px;
    color: #6B7280;
}

.caret {
    font-size: 12px;
    color: #6B7280;
}

/* ===============================
   DROPDOWN MENU (HEADER)
================================ */
.dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: #ffffff;
    border-radius: 12px;
    min-width: 160px;
    box-shadow: 0 10px 30px rgba(0,0,0,.15);
    display: none;
    overflow: hidden;
    z-index: 1000;
    padding: 6px;
}

/* isi dropdown */
.dropdown-menu a {
    display: block;
    padding: 10px 14px;
    font-size: 14px;
    color: #111827;
    text-decoration: none;
}

.dropdown-menu a:hover {
    background: #F1F5F9;
}

/* show dropdown */
.user-dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-group a {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}

/* hover */
.dropdown-group a:hover {
    background: #F1F5F9;
}

/* active */
.dropdown-group a.active {
    background: #E0ECFF;
    color: #1D4ED8;
    font-weight: 600;
}

/* divider */
.dropdown-divider {
    height: 1px;
    background: #E5E7EB;
    margin: 6px 0;
}

/* logout */
.dropdown-group.danger a {
    color: #DC2626;
}

.dropdown-group.danger a:hover {
    background: #FEE2E2;
}


/* CONTAINER */
.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}


/* BUTTON */
.btn-login {
    background: #fff;
    color: #1D4ED8;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,.7);
    transition: all .2s ease;
}

.btn-login:hover {
    background: #E0ECFF;
}

.btn-primary {
    background: #1E88E5;
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
}

.btn-primary:hover {
    background: #1565C0;
}


.btn-outline {
    border: 1px solid #fff;
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
}

a.btn-outline {
    color: #2563EB;
}


/* FOOTER */
.footer {
    background: #0B3C89;
    color: #fff;
    height: 60px;

    display: flex;
    align-items: center; 
    justify-content: center;

    font-size: 14px;
}

@media (max-width: 768px) {

    .header-inner {
        flex-direction: column;
        gap: 12px;
    }

    .navbar ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .user-name {
        font-size: 12px;
    }

    .user-role {
        font-size: 10px;
    }

    .user-btn {
        padding: 6px 10px;
    }

    .footer {
        height: auto;
        padding: 12px 16px;
        text-align: center;
    }

    .footer-sep {
        display: none; /* hilangkan "-" */
    }

    .footer-break {
        display: block; /* pindah ke baris bawah */
        margin-top: 4px;
    }
}


/* ===============================
   MODAL
================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    border-radius: 16px;
    padding: 28px 24px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,.2);
}

.modal-card h3 {
    margin: 0 0 8px;
    font-size: 20px;
    color: #111827;
}

.modal-desc {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 24px;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-modal {
    display: block;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
}

.btn-modal.primary {
    background: #1E88E5;
    color: #fff;
}

.btn-modal.primary:hover {
    background: #1565C0;
}

.btn-modal.outline {
    border: 1px solid #1E88E5;
    color: #1E88E5;
}

.btn-modal.outline:hover {
    background: #E3F2FD;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
    color: #6b7280;
}

/* ===============================
   LINK GLOBAL
================================ */
a,
a:visited {
    color: #2563EB;          /* biru konsisten */
    text-decoration: none;
}

a:hover {
    color: #1D4ED8;
    text-decoration: none;
}

a:active {
    color: #1E40AF;
}

/* ===============================
   BUTTON PRIMARY (LINK)
================================ */
a.btn-primary,
a.btn-primary:visited {
    color: #ffffff;           /* warna teks tombol */
    background: #1E88E5;
    text-decoration: none;
}

a.btn-primary:hover {
    color: #ffffff;
    background: #1565C0;
    text-decoration: none;
}

a.btn-primary:active {
    background: #0D47A1;
}

/* ===============================
   DROPDOWN MENU – ACTIVE STATE
================================ */

.user-dropdown .dropdown-menu a {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}

/* hover biasa */
.user-dropdown .dropdown-menu a:hover {
    background: #F1F5F9;
}

/* ACTIVE – HARUS KELIHATAN */
.user-dropdown .dropdown-menu a.active {
    background: #E0ECFF !important;
    color: #1D4ED8 !important;
    font-weight: 700;
}

/* divider */
.dropdown-divider {
    height: 1px;
    background: #E5E7EB;
    margin: 6px 0;
}

/* logout */
.dropdown-group.danger a {
    color: #DC2626;
}

.dropdown-group.danger a:hover {
    background: #FEE2E2;
}

.user-dropdown .dropdown-menu a.active {
    position: relative;
}

.user-dropdown .dropdown-menu a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 4px;
    border-radius: 4px;
    background: #1D4ED8;
}

/* ===============================
   DEMO SELECT (PILIH WILAYAH)
================================ */
.demo-select {
    width: 100%;
    height: 56px;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    margin-bottom: 5px;

    border-radius: 14px;
    border: 2px solid #E5E7EB;
    background-color: #ffffff;

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    cursor: pointer;
    transition: all .2s ease;

    /* arrow custom */
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 18px;
}

/* hover */
.demo-select:hover {
    border-color: #93C5FD;
}

/* focus */
.demo-select:focus {
    outline: none;
    border-color: #2563EB;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

/* disabled */
.demo-select:disabled {
    background: #F3F4F6;
    color: #9CA3AF;
    cursor: not-allowed;
}
