:root {
    --primary-color: #34369b;
    --primary-hover: #292b7e;
    --heading-color: #081c4c;
    --text-color: #646984;
    --border-color: #dfe2e8;
}

/* Layout aplikasi utama */
.app-page {
    --sidebar-width: 270px;
    --primary-color: #34369b;
    --primary-dark: #292b7d;
    --body-background: #f4f7fb;
    --text-color: #252764;
    --muted-color: #7a7d91;
    --border-color: #e8eaf1;
}

* {
    box-sizing: border-box;
}

.app-page {
    min-height: 100vh;
    margin: 0;
    color: var(--text-color);
    background-color: var(--body-background);
    font-family: Arial, Helvetica, sans-serif;
}

.app-layout {
    min-height: 100vh;
}

/* Sidebar */

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    display: flex;
    width: var(--sidebar-width);
    padding: 24px 18px;
    flex-direction: column;
    background-color: #fff;
    border-right: 1px solid var(--border-color);
    box-shadow: 6px 0 25px rgba(32, 39, 90, 0.06);
    transition: transform 0.25s ease;
}

.sidebar-brand {
    display: flex;
    min-height: 74px;
    margin-bottom: 24px;
    padding: 10px 12px;
    align-items: center;
    gap: 12px;
    color: var(--text-color);
    text-decoration: none;
}

.sidebar-brand-logo {
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    border-radius: 12px;
    color: #fff;
    background-color: var(--primary-color);
    font-size: 23px;
}

.sidebar-brand-text {
    line-height: 1.25;
}

.sidebar-brand-text strong {
    display: block;
    font-size: 17px;
}

.sidebar-brand-text small {
    color: var(--muted-color);
    font-size: 12px;
}

.sidebar-section-title {
    margin: 8px 14px 10px;
    color: #a0a3b2;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.sidebar-menu {
    display: flex;
    overflow-y: auto;
    padding: 0;
    margin: 0;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    list-style: none;
}

.sidebar-link {
    display: flex;
    min-height: 48px;
    padding: 12px 15px;
    align-items: center;
    gap: 13px;
    border-radius: 10px;
    color: #56596e;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sidebar-link i {
    width: 22px;
    text-align: center;
    font-size: 17px;
}

.sidebar-link:hover {
    color: var(--primary-color);
    background-color: #f1f2ff;
}

.sidebar-link.active {
    color: #fff;
    background-color: var(--primary-color);
    box-shadow: 0 7px 18px rgba(52, 54, 155, 0.24);
}

.sidebar-menu-button {
    width: 100%;
    border: 0;
    background-color: transparent;
    text-align: left;
}

.sidebar-menu-button[aria-expanded="true"] .submenu-chevron {
    transform: rotate(180deg);
}

.submenu-chevron {
    transition: transform 0.2s ease;
}

.sidebar-submenu {
    margin: 0 0 4px 28px;
    padding-left: 14px;
    border-left: 1px solid var(--border-color);
}

.sidebar-sublink {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    color: #6b6e80;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.sidebar-sublink:hover,
.sidebar-sublink.active {
    color: var(--primary-color);
    background-color: #f1f2ff;
}

.sidebar-user {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
}

.logout-button {
    width: 100%;
    border: 0;
    color: #d63447;
    background: transparent;
    text-align: left;
}

.logout-button:hover {
    color: #fff;
    background-color: #d63447;
}

/* Konten utama */

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

.app-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    min-height: 82px;
    padding: 15px 32px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.96);
    box-shadow: 0 4px 16px rgba(39, 45, 90, 0.04);
}

.sidebar-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    color: var(--primary-color);
    background-color: #fff;
}

.header-title h1 {
    margin: 0;
    color: var(--text-color);
    font-size: 21px;
    font-weight: 700;
}

.header-title p {
    margin: 3px 0 0;
    color: var(--muted-color);
    font-size: 13px;
}

.header-profile {
    display: flex;
    align-items: center;
    gap: 11px;
}

.header-profile-button {
    padding: 6px 8px;
    border: 0;
    border-radius: 10px;
    color: var(--text-color);
    background: transparent;
    text-align: left;
}

.header-profile-button:hover,
.header-profile-button:focus,
.header-profile-button[aria-expanded="true"] {
    background-color: #f4f5fb;
}

.profile-chevron {
    margin-left: 4px;
    color: var(--muted-color);
    font-size: 11px;
}

.profile-avatar {
    display: inline-flex;
    width: 43px;
    height: 43px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background-color: var(--primary-color);
    font-weight: 700;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-photo-preview {
    display: inline-flex;
    width: 96px;
    height: 96px;
    flex: 0 0 96px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
    color: #fff;
    background-color: var(--primary-color);
    font-size: 32px;
    font-weight: 700;
}

.profile-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-information {
    line-height: 1.3;
}

.profile-information strong {
    display: block;
    max-width: 220px;
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-information small {
    color: var(--muted-color);
    font-size: 12px;
    text-transform: capitalize;
}

.app-content {
    width: 100%;
    padding: 32px;
    flex: 1;
}

.app-footer {
    padding: 20px 32px;
    color: var(--muted-color);
    font-size: 13px;
    text-align: center;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1030;
    display: none;
    background-color: rgba(19, 22, 52, 0.5);
}

@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
    }

    body.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
    }

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

    .sidebar-toggle {
        display: inline-flex;
    }

    .app-header {
        padding: 15px 20px;
    }

    .header-left {
        display: flex;
        align-items: center;
        gap: 14px;
    }

    .app-content {
        padding: 24px 20px;
    }
}

@media (max-width: 575.98px) {
    .app-header {
        min-height: 70px;
        padding: 12px 15px;
    }

    .header-title p,
    .profile-information {
        display: none;
    }

    .header-title h1 {
        font-size: 18px;
    }

    .app-content {
        padding: 20px 14px;
    }

    .app-footer {
        padding: 18px 14px;
    }
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    color: var(--heading-color);
    background-color: #fff;
    font-family: Arial, Helvetica, sans-serif;
}

.login-page {
    min-height: 100vh;
}

/* Bagian gambar kiri */
.login-banner {
    min-height: 100vh;
    background-image: url("../images/login-banner.jpg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

/* Bagian formulir kanan */
.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 50px;
    background-color: #fff;
}

.login-form {
    width: 100%;
    max-width: 490px;
}

.login-title {
    margin-bottom: 18px;
    color: var(--heading-color);
    font-size: 21px;
    font-weight: 600;
}

.login-description {
    margin-bottom: 38px;
    color: var(--text-color);
    font-size: 17px;
    line-height: 1.5;
}

.password-container {
    position: relative;
}

.password-container .form-control {
    padding-right: 55px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    color: #667085;
    background: transparent;
    transform: translateY(-50%);
}

.password-toggle:hover {
    color: var(--primary-color);
}

.password-toggle svg {
    width: 22px;
    height: 22px;
}

.login-link {
    color: #1455ff;
    text-decoration: none;
}

.login-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.register-text {
    margin-top: 27px;
    color: var(--heading-color);
    text-align: center;
}

/* Tablet */
@media (max-width: 1199.98px) {
    .login-panel {
        padding: 40px;
    }
}

/* Ponsel */
@media (max-width: 991.98px) {
    .login-banner-column {
        display: none;
    }

    .login-panel {
        min-height: 100vh;
        padding: 35px 22px;
    }

    .login-form {
        max-width: 500px;
    }

}

.register-form {
    width: 100%;
    max-width: 490px;
}

.register-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 50px;
    background-color: #fff;
}

.register-title {
    margin-bottom: 18px;
    color: var(--heading-color);
    font-size: 21px;
    font-weight: 600;
}

.register-description {
    margin-bottom: 30px;
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.5;
}

@media (max-width: 991.98px) {
    .register-panel {
        min-height: 100vh;
        padding: 35px 22px;
    }

    .register-form {
        max-width: 500px;
    }
}

.student-page {
    min-height: 100vh;
    margin: 0;
    color: #343447;
    background-color: #f5f6fa;
}

.student-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    padding: 0 32px;
    border-bottom: 1px solid #e5e6eb;
    background-color: #fff;
}

.student-brand {
    color: #34369b;
    font-size: 21px;
    font-weight: 700;
    text-decoration: none;
}

.student-user-button {
    color: #44445a;
    border: 0;
    background: transparent;
}

.student-layout {
    display: flex;
    min-height: calc(100vh - 72px);
}

.student-sidebar {
    width: 285px;
    flex-shrink: 0;
    padding: 32px 22px;
    border-right: 1px solid #e5e6eb;
    background-color: #fff;
}

.student-sidebar-title {
    margin-bottom: 24px;
    color: #777789;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

.registration-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.registration-step {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px;
    border-radius: 6px;
    color: #69697c;
    text-decoration: none;
}

.registration-step.active {
    color: #34369b;
    background-color: #eeeeff;
    font-weight: 600;
}

.registration-step.disabled {
    opacity: 0.6;
}

.step-number {
    display: grid;
    width: 31px;
    height: 31px;
    flex-shrink: 0;
    place-items: center;
    border: 1px solid #d6d6e4;
    border-radius: 50%;
    background-color: #fff;
    font-size: 13px;
}

.registration-step.active .step-number {
    color: #fff;
    border-color: #34369b;
    background-color: #34369b;
}

.student-content {
    width: 100%;
    padding: 35px;
}

.registration-card {
    max-width: 1050px;
    margin: 0 auto;
    padding: 32px;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    background-color: #fff;
}

.registration-title {
    margin-bottom: 8px;
    color: #303046;
    font-size: 24px;
    font-weight: 600;
}

.registration-description {
    margin-bottom: 30px;
    color: #777789;
}

.registration-section-title {
    margin: 30px 0 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e8e8ef;
    color: #34369b;
    font-size: 17px;
    font-weight: 600;
}

@media (max-width: 991.98px) {
    .student-layout {
        display: block;
    }

    .student-sidebar {
        width: 100%;
        border-right: 0;
        border-bottom: 1px solid #e5e6eb;
    }

    .registration-steps {
        overflow-x: auto;
        flex-direction: row;
    }

    .registration-step {
        min-width: 220px;
    }

    .student-content {
        padding: 20px;
    }
}

.document-current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 14px 16px;
    border: 1px solid #dce9df;
    border-radius: 6px;
    color: #356140;
    background-color: #f1faf3;
}

.document-current a {
    color: #34369b;
    font-weight: 600;
    text-decoration: none;
}

.employment-item {
    margin-bottom: 24px;
    padding: 26px;
    border: 1px solid #e3e4eb;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 4px 14px rgba(33, 35, 80, 0.04);
}

.employment-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid #ececf2;
}

.employment-title {
    margin: 0;
    color: #252764;
    font-size: 18px;
    font-weight: 600;
}

.certificate-field[hidden] {
    display: none !important;
}

@media (max-width: 575.98px) {
    .employment-item {
        padding: 18px;
    }

    .employment-heading {
        align-items: flex-start;
    }
}

/* Halaman riwayat pekerjaan */
.employment-item {
    position: relative;
    margin-bottom: 28px;
    padding: 30px;
    border: 1px solid #e6e8f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(31, 35, 75, 0.08);
    transition: box-shadow .2s ease, transform .2s ease;
}

/* Progres status mahasiswa */
.student-status-scroll {
    overflow-x: auto;
    padding: 8px 4px 4px;
}

.student-status-progress {
    position: relative;
    display: grid;
    min-width: 820px;
    grid-template-columns: repeat(6, 1fr);
}

.student-status-progress::before,
.student-status-progress::after {
    position: absolute;
    top: 23px;
    left: 8.333%;
    height: 8px;
    content: "";
}

.student-status-progress::before {
    right: 8.333%;
    background-color: #cbd1eb;
}

.student-status-progress::after {
    width: var(--student-progress);
    max-width: 83.334%;
    background-color: var(--primary-color);
}

.student-status-step {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    flex-direction: column;
    color: var(--muted-color);
    text-align: center;
}

.student-status-marker {
    display: flex;
    width: 46px;
    height: 46px;
    margin-bottom: 16px;
    align-items: center;
    justify-content: center;
    border: 9px solid #cbd1eb;
    border-radius: 50%;
    background-color: #fff;
    color: #fff;
    font-size: 12px;
}

.student-status-step.active .student-status-marker,
.student-status-step.completed .student-status-marker {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
}

.student-status-step.active .student-status-marker::after {
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-radius: 50%;
    content: "";
}

.student-status-icon {
    margin-bottom: 7px;
    color: var(--text-color);
    font-size: 20px;
}

.student-status-step span {
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
}

.student-status-step.active span {
    color: var(--primary-color);
    font-weight: 700;
}

.material-viewer {
    position: relative;
    height: calc(100vh - 230px);
    min-height: 620px;
    background-color: #30323a;
}

.material-flipbook-card:fullscreen {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    background-color: #202128;
}

.material-flipbook-card:fullscreen .material-viewer {
    height: calc(100vh - 72px);
}

.flipbook-toolbar {
    display: flex;
    min-height: 66px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #fff;
    background-color: #252764;
}

.flipbook-page-input {
    width: 68px;
    text-align: center;
}

.flipbook-loading {
    display: flex;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #fff;
}

.material-flipbook {
    width: 100%;
    height: 100%;
    margin: 0 auto;
}

.material-flipbook .stf__parent,
.material-flipbook .stf__wrapper {
    margin: 0 auto;
}

.material-watermark {
    position: absolute;
    right: 24px;
    bottom: 18px;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.65);
    background-color: rgba(0, 0, 0, 0.28);
    font-size: 12px;
    pointer-events: none;
}

@media (max-width: 767.98px) {
    .material-viewer {
        height: 70vh;
        min-height: 480px;
    }
}

/* Pemeriksaan akhir pendaftaran */
.dashboard-registration-icon {
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    border-radius: 12px;
    color: #fff;
    background-color: var(--primary-color);
    font-size: 19px;
}

.registration-summary {
    display: flex;
    min-height: 82px;
    padding: 16px 18px;
    flex-direction: column;
    gap: 5px;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    background-color: #fafbff;
}

.registration-summary strong {
    color: #252764;
    font-size: 15px;
}

.employment-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(31, 35, 75, 0.12);
}

.employment-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eef0f5;
}

.employment-title {
    margin: 0;
    color: #20235f;
    font-size: 18px;
    font-weight: 700;
}

.remove-employment-button {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: #ed3447;
    box-shadow: 0 5px 12px rgba(237, 52, 71, 0.25);
    transition: background-color .2s ease, transform .2s ease;
}

.remove-employment-button[hidden] {
    display: inline-flex !important;
}

.remove-employment-button svg {
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.remove-employment-button:hover,
.remove-employment-button:focus {
    color: #fff;
    background: #cf2335;
    transform: translateY(-1px);
}

.remove-employment-button:focus-visible {
    outline: 3px solid rgba(237, 52, 71, 0.25);
    outline-offset: 3px;
}

.certificate-field[hidden] {
    display: none !important;
}

@media (max-width: 575.98px) {
    .employment-item {
        padding: 22px 18px;
    }

    .employment-heading {
        align-items: flex-start;
    }
}
/* Select2 mengikuti tampilan form Bootstrap aplikasi. */
.select2-container {
    width: 100% !important;
}

.select2-container .select2-selection--single {
    min-height: 38px;
    border: 1px solid #dee2e6;
    border-radius: .375rem;
    display: flex;
    align-items: center;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #212529;
    line-height: 36px;
    padding-left: 12px;
    padding-right: 34px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
    right: 7px;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #86b7fe;
    box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .25);
}

.select2-dropdown {
    border-color: #86b7fe;
    border-radius: .375rem;
    overflow: hidden;
    z-index: 1080;
}

.select2-search--dropdown {
    padding: 8px;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #dee2e6;
    border-radius: .375rem;
    padding: 7px 10px;
    outline: 0;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #363ca5;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    margin-right: 30px;
}

.is-invalid + .select2-container .select2-selection--single {
    border-color: #dc3545;
}

.sidebar-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.site-brand-preview {
    min-height: 90px;
    padding: 16px;
    border: 1px dashed #ced4da;
    border-radius: .5rem;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    gap: 16px;
}

.site-logo-preview {
    max-width: 220px;
    max-height: 80px;
    object-fit: contain;
}

.site-favicon-preview {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.login-site-logo {
    display: block;
    max-width: 240px;
    max-height: 90px;
    object-fit: contain;
}
