/* ===========================
   GLOBAL STYLES
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --secondary-color: #6c757d;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-color: #dee2e6;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.18);
    --transition-speed: 0.3s;
}

html,
body {
    height: 100%;
}

body {
    background-color: var(--light-color);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.95rem;
    color: #212529;
    line-height: 1.5;
}

/* ===========================
   CONTAINER & LAYOUT
   =========================== */
.container-fluid {
    padding-left: 0;
    padding-right: 0;
}

main {
    padding-top: 20px;
    padding-bottom: 30px;
}

/* ===========================
   SIDEBAR NAVIGATION
   =========================== */
.sidebar {
    position: fixed;
    top: 62px;
    left: 0;
    /* Updated from 0 */
    z-index: 100;
    width: 250px;
    /* Fixed width for better control */
    height: calc(100vh - 62px);
    background: #fff;
    /* Solid white background */
    border-right: 1px solid var(--border-color);
    transition: left 0.3s ease-in-out;
}

.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Navigation Menu */
.nav {
    list-style: none;
}

.nav-item {
    list-style: none;
}

.sidebar .nav-link {
    color: #495057;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 10px 12px;
    margin: 4px 12px;
    border-radius: 8px;
    transition: all var(--transition-speed) ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    cursor: pointer;
}

.sidebar .nav-link:hover {
    color: var(--primary-color);
    background-color: #eef5ff;
    transform: translateX(4px);
}

.sidebar .nav-link.active {
    color: #fff;
    background-color: var(--primary-color);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
    transform: translateX(4px);
}

.sidebar .nav-link i {
    font-size: 1.1rem;
    min-width: 20px;
}

/* Menu Section Title */
.nav-section-title {
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 600;
    padding: 10px 20px 5px;
    margin-top: 10px;
}

/* ===========================
   CARDS & BOXES
   =========================== */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-speed) ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
}

.card-header h5 {
    margin: 0;
    font-weight: 600;
    color: #212529;
}

.card-body {
    padding: 1.5rem;
}

.card-body p {
    margin-bottom: 0.5rem;
}

/* Stat Cards */
.stat-card {
    border-left: 4px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.stat-card.stat-primary {
    border-left-color: var(--primary-color);
}

.stat-card.stat-success {
    border-left-color: var(--success-color);
}

.stat-card.stat-danger {
    border-left-color: var(--danger-color);
}

.stat-card.stat-warning {
    border-left-color: var(--warning-color);
}

.stat-card.stat-info {
    border-left-color: var(--info-color);
}

.stat-card-icon {
    font-size: 2rem;
    opacity: 0.1;
}

.stat-card-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-card-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===========================
   TABLES
   =========================== */
.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    color: #212529;
    padding: 1rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: background-color var(--transition-speed) ease;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    text-align: left;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive::-webkit-scrollbar {
    height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
    background: transparent;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* ===========================
   BUTTONS
   =========================== */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition-speed) ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn:active {
    transform: translateY(0);
}

/* Primary Button */
.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    border: 1px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0b5ed7;
    color: #fff;
}

.btn-primary:disabled {
    background-color: #cfe2ff;
    border-color: #cfe2ff;
    color: #084298;
    cursor: not-allowed;
    transform: none;
}

/* Outline Primary Button */
.btn-outline-primary {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* Success Button */
.btn-success {
    background-color: var(--success-color);
    color: #fff;
    border: 1px solid var(--success-color);
}

.btn-success:hover {
    background-color: #157347;
    border-color: #157347;
    color: #fff;
}

/* Outline Success Button */
.btn-outline-success {
    background-color: transparent;
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.btn-outline-success:hover {
    background-color: var(--success-color);
    color: #fff;
}

/* Info Button */
.btn-info {
    background-color: var(--info-color);
    color: #000;
    border: 1px solid var(--info-color);
}

.btn-info:hover {
    background-color: #31d0d8;
    border-color: #31d0d8;
    color: #000;
}

/* Outline Info Button */
.btn-outline-info {
    background-color: transparent;
    color: var(--info-color);
    border: 1px solid var(--info-color);
}

.btn-outline-info:hover {
    background-color: var(--info-color);
    color: #000;
}

/* Danger Button */
.btn-danger {
    background-color: var(--danger-color);
    color: #fff;
    border: 1px solid var(--danger-color);
}

.btn-danger:hover {
    background-color: #bb2d3b;
    border-color: #bb2d3b;
    color: #fff;
}

/* Button Sizes */
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* ===========================
   BADGES
   =========================== */
.badge {
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    white-space: nowrap;
}

.badge-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.badge-success {
    background-color: var(--success-color);
    color: #fff;
}

.badge-danger {
    background-color: var(--danger-color);
    color: #fff;
}

.badge-warning {
    background-color: var(--warning-color);
    color: #000;
}

.badge-info {
    background-color: var(--info-color);
    color: #000;
}

.badge-secondary {
    background-color: var(--secondary-color);
    color: #fff;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-success {
    background-color: var(--success-color) !important;
}

.bg-danger {
    background-color: var(--danger-color) !important;
}

.bg-warning {
    background-color: var(--warning-color) !important;
}

.bg-info {
    background-color: var(--info-color) !important;
}

.bg-light {
    background-color: var(--light-color) !important;
}

.bg-white {
    background-color: #fff !important;
}

/* ===========================
   FORMS
   =========================== */
.form-control,
.form-select {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all var(--transition-speed) ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    outline: none;
}

.form-control::placeholder {
    color: #6c757d;
    opacity: 0.7;
}

.form-label {
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-text {
    font-size: 0.85rem;
    color: #6c757d;
    display: block;
    margin-top: 0.25rem;
}

/* ===========================
   ALERTS
   =========================== */
.alert {
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    border-left: 4px solid;
}

.alert-primary {
    background-color: #cfe2ff;
    border-left-color: var(--primary-color);
    color: #084298;
}

.alert-success {
    background-color: #d1e7dd;
    border-left-color: var(--success-color);
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    border-left-color: var(--danger-color);
    color: #842029;
}

.alert-warning {
    background-color: #fff3cd;
    border-left-color: var(--warning-color);
    color: #664d03;
}

.alert-info {
    background-color: #cff4fc;
    border-left-color: var(--info-color);
    color: #055160;
}

.alert-dismissible {
    padding-right: 2.5rem;
}

.btn-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #000;
    opacity: 0.5;
    cursor: pointer;
    transition: opacity var(--transition-speed) ease;
}

.btn-close:hover {
    opacity: 0.75;
}

/* ===========================
   UTILITIES
   =========================== */
.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.shadow-md {
    box-shadow: var(--shadow-md);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

.h-100 {
    height: 100%;
}

.w-5 {
    width: 5%;
}

.w-20 {
    width: 20%;
}

.text-muted {
    color: #6c757d;
}

.text-primary {
    color: var(--primary-color);
}

.text-success {
    color: var(--success-color);
}

.text-danger {
    color: var(--danger-color);
}

.text-warning {
    color: var(--warning-color);
}

.text-info {
    color: var(--info-color);
}

.transition-transform {
    transition: transform var(--transition-speed) ease;
}

.transition-all {
    transition: all var(--transition-speed) ease;
}

/* ===========================
   PAGINATION
   =========================== */
.pagination {
    display: flex;
    gap: 0.5rem;
}

.page-link {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--primary-color);
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    text-decoration: none;
}

.page-link:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.page-link.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.page-link.disabled {
    color: var(--secondary-color);
    cursor: not-allowed;
    opacity: 0.5;
}

/* ===========================
   MODAL / DIALOG
   =========================== */
.modal-header {
    background-color: var(--primary-color);
    color: #fff;
    border-bottom: none;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-body {
    padding: 1.5rem;
}

/* ===========================
   LOADING SPINNER
   =========================== */
.spinner-border {
    border: 0.25rem solid rgba(13, 110, 253, 0.25);
    border-right-color: var(--primary-color);
    animation: spinner-border 0.75s linear infinite;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2rem;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */
@media (max-width: 768px) {
    .sidebar {
        position: relative;
        top: 0;
        /* Updated from 0 */
        width: 100%;
        height: auto;
        min-height: auto;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .sidebar-sticky {
        height: auto;
        padding: 0;
    }

    main.col-md-10 {
        width: 100%;
        padding: 1rem;
    }

    .sidebar .nav-link {
        padding: 0.75rem 1rem;
        margin: 2px 0;
    }

    .sidebar .nav-link i {
        min-width: 24px;
    }

    .card {
        margin-bottom: 1rem;
    }

    .table {
        font-size: 0.85rem;
    }

    .table thead th,
    .table tbody td {
        padding: 0.75rem 0.5rem;
    }

    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    .col-12 {
        width: 100%;
    }

    .col-sm-6 {
        width: 50%;
    }

    .col-lg-3 {
        width: 100%;
    }

    .col-lg-4 {
        width: 100%;
    }

    .col-lg-6 {
        width: 100%;
    }
}

@media (max-width: 576px) {
    main {
        padding: 0.75rem;
    }

    .card-header,
    .card-body {
        padding: 1rem;
    }

    .table {
        font-size: 0.8rem;
    }

    .table thead th,
    .table tbody td {
        padding: 0.5rem 0.25rem;
    }

    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .alert {
        padding: 0.75rem 1rem;
        margin-bottom: 0.75rem;
    }

    .sidebar-sticky {
        padding-top: 0;
    }

    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .stat-card-value {
        font-size: 1.25rem;
    }

    .w-5 {
        width: 8%;
    }

    .w-20 {
        width: 25%;
    }
}

/* ===========================
   CUSTOM MODAL DIALOG SIZE
   =========================== */
.modal-dialog-custom {
    max-width: 80vw;
    width: 80vw;
}

/* Responsive untuk layar kecil */
@media (max-width: 1024px) {
    .modal-dialog-custom {
        max-width: 90vw;
        width: 90vw;
    }
}

@media (max-width: 768px) {
    .modal-dialog-custom {
        max-width: 95vw;
        width: 95vw;
    }
}

@media (max-width: 576px) {
    .modal-dialog-custom {
        max-width: 100vw;
        width: 100vw;
    }
}

/* Styling untuk content area */
#viewUserContent {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Smooth transition saat content loaded */
#viewUserContent.loaded {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ===========================
   ANIMATIONS
   =========================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

.slide-in-left {
    animation: slideInLeft 0.3s ease-in-out;
}

/* ===========================
   CUSTOM SCROLLBAR
   =========================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* ===========================
   LOGIN PAGE
   =========================== */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
}

@keyframes moveBackground {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

.login-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 420px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px 30px;
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.login-logo i {
    font-size: 2.5rem;
    color: #fff;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #212529;
    margin: 0 0 8px;
    letter-spacing: -0.5px;
}

.login-subtitle {
    font-size: 0.95rem;
    color: #6c757d;
    margin: 0;
}

.login-form {
    margin-bottom: 20px;
}

.login-input {
    height: 48px;
    padding: 12px 16px !important;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all var(--transition-speed) ease;
}

.login-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.1);
    background-color: #f8f9ff;
}

.login-input::placeholder {
    color: #adb5bd;
    opacity: 1;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-label i {
    color: var(--primary-color);
    font-size: 1.1rem;
    min-width: 18px;
}

.btn-login {
    width: 100%;
    height: 48px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login i {
    font-size: 1.1rem;
}

.login-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    margin: 0;
    font-size: 0.95rem;
}

.login-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-speed) ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.login-link:hover {
    color: #764ba2;
    transform: translateX(2px);
}

.login-link i {
    font-size: 1rem;
}

/* Alert Styling untuk Login */
.login-form+.alert,
.login-form~.alert {
    margin-bottom: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.alert-danger {
    background-color: #f8d7da;
    border-left-color: var(--danger-color);
    color: #842029;
}

.alert-success {
    background-color: #d1e7dd;
    border-left-color: var(--success-color);
    color: #0f5132;
}

/* ===========================
   RESPONSIVE LOGIN PAGE
   =========================== */
@media (max-width: 576px) {
    .login-container {
        padding: 30px 20px;
        max-width: 100%;
    }

    .login-logo {
        width: 70px;
        height: 70px;
        margin-bottom: 15px;
    }

    .login-logo i {
        font-size: 2rem;
    }

    .login-title {
        font-size: 1.5rem;
        margin-bottom: 4px;
    }

    .login-subtitle {
        font-size: 0.85rem;
    }

    .login-input {
        height: 44px;
        padding: 10px 14px !important;
        font-size: 0.95rem;
    }

    .btn-login {
        height: 44px;
        font-size: 0.95rem;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    .login-footer p {
        font-size: 0.85rem;
    }
}

@media (max-width: 400px) {
    .login-wrapper {
        padding: 10px;
    }

    .login-container {
        padding: 25px 15px;
    }

    .login-logo {
        width: 60px;
        height: 60px;
    }

    .login-logo i {
        font-size: 1.75rem;
    }

    .login-title {
        font-size: 1.25rem;
    }

    .login-input {
        height: 42px;
        padding: 8px 12px !important;
        font-size: 0.9rem;
    }

    .btn-login {
        height: 42px;
    }
}

/* ===========================
   REGISTRATION PAGE
   =========================== */
.registration-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    padding: 40px 0;
    min-height: 100vh;
    /* Pastikan background menutupi seluruh halaman */
}

.registration-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
    z-index: -1;
    /* Pindahkan ke belakang konten */
}

.registration-wrapper {
    position: relative;
    width: 100%;
    padding: 20px;
}

.registration-wrapper::-webkit-scrollbar {
    width: 8px;
}

.registration-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.registration-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.registration-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.registration-container {
    width: 100%;
    max-width: 900px;
    background-color: #fff;
    margin: 0 auto;
    /* Pusatkan container secara horizontal */
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: visible;
    animation: slideInUp 0.5s ease-out;
}

.registration-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
    /* position: sticky; */
    top: 0;
    z-index: 10;
}

.registration-logo {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.registration-logo i {
    font-size: 2.2rem;
    color: #fff;
}

.registration-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 8px;
    letter-spacing: -0.5px;
}

.registration-subtitle {
    font-size: 1rem;
    opacity: 0.95;
    margin: 0;
}

.registration-body {
    padding: 40px 30px;
}

.registration-body::-webkit-scrollbar {
    width: 6px;
}

.registration-body::-webkit-scrollbar-track {
    background: transparent;
}

.registration-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.registration-body::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.form-section-title {
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 12px;
    margin-top: 30px;
    margin-bottom: 20px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section-title:first-of-type {
    margin-top: 0;
}

.form-section-title i {
    color: var(--primary-color);
    font-size: 1.3rem;
}

.form-check {
    padding: 10px 10px 10px 20px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.form-check:last-child {
    border-bottom: none;
}

.form-check-input {
    margin-top: 0.3rem;
    cursor: pointer;
    width: 1.25em;
    height: 1.25em;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    transition: all var(--transition-speed) ease;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:hover {
    border-color: var(--primary-color);
}

.form-check-label {
    margin-left: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 0.9rem;
    color: #495057;
}

.btn-check-nib {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

#kbli-container {
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 10px 10px 40px;
    max-height: 300px;
    overflow-y: auto;
}

#kbli-container::-webkit-scrollbar {
    width: 6px;
}

#kbli-container::-webkit-scrollbar-track {
    background: transparent;
}

#kbli-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

#kbli-container::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    border-radius: 8px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.alert i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* ===========================
   RESPONSIVE REGISTRATION
   =========================== */
@media (max-width: 768px) {
    .registration-page {
        padding: 20px 0;
    }

    .registration-wrapper {
        padding: 15px;
    }

    .registration-container {
        max-width: 100%;
    }

    .registration-body {
        padding: 30px 20px;
    }

    .registration-header {
        padding: 30px 20px;
    }

    .registration-logo {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }

    .registration-logo i {
        font-size: 1.8rem;
    }

    .registration-title {
        font-size: 1.5rem;
    }

    .registration-subtitle {
        font-size: 0.9rem;
    }

    .form-section-title {
        font-size: 1rem;
        margin-top: 20px;
        margin-bottom: 15px;
    }

    .form-section-title i {
        font-size: 1.1rem;
    }

    .row {
        gap: 0;
    }

    .col-md-6,
    .col-md-8,
    .col-md-4 {
        width: 100%;
    }

    #kbli-container {
        max-height: 250px;
    }
}

@media (max-width: 576px) {
    .registration-page {
        padding: 15px 0;
    }

    .registration-wrapper {
        padding: 10px;
    }

    .registration-container {
        max-width: 100%;
        border-radius: 8px;
    }

    .registration-header {
        padding: 25px 15px;
    }

    .registration-logo {
        width: 50px;
        height: 50px;
        margin-bottom: 10px;
    }

    .registration-logo i {
        font-size: 1.5rem;
    }

    .registration-title {
        font-size: 1.25rem;
        margin-bottom: 4px;
    }

    .registration-subtitle {
        font-size: 0.85rem;
    }

    .form-section-title {
        font-size: 0.95rem;
        margin-top: 15px;
        margin-bottom: 12px;
    }

    .form-section-title i {
        font-size: 1rem;
    }

    .form-label {
        font-size: 0.85rem;
    }

    .form-control,
    .form-select {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }

    .form-text {
        font-size: 0.75rem;
    }

    #kbli-container {
        padding: 12px;
        max-height: 200px;
    }

    .form-check {
        padding: 8px 0;
        margin-bottom: 8px;
    }

    .form-check-label {
        font-size: 0.8rem;
    }

    .d-grid {
        flex-direction: column;
    }

    .d-md-flex {
        display: flex !important;
        flex-direction: column;
    }

    .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    .btn:last-child {
        margin-bottom: 0;
    }

    .alert {
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 400px) {
    .registration-wrapper {
        padding: 5px;
    }

    .registration-body {
        padding: 15px 10px;
    }

    .registration-header {
        padding: 20px 10px;
    }

    .form-section-title {
        font-size: 0.85rem;
        margin-top: 12px;
        margin-bottom: 10px;
    }

    #kbli-container {
        max-height: 180px;
        padding: 10px;
    }
}

/* ===========================
   DELETE CONFIRMATION MODAL
   =========================== */
.modal-header.bg-danger {
    background-color: #dc3545 !important;
}

.alert-with-icon {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert-with-icon i {
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.user-delete-info {
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #495057;
    min-width: 100px;
}

.info-value {
    color: #212529;
    word-break: break-all;
    text-align: right;
    flex-grow: 1;
    padding-left: 10px;
}

.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
}

.modal-content {
    border: none;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 2px solid var(--border-color);
    padding: 1.25rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1rem;
    background-color: #f8f9fa;
}

/* Responsive Modal */
@media (max-width: 576px) {
    .modal-body {
        padding: 1rem;
    }

    .user-delete-info {
        padding: 12px;
    }

    .info-row {
        padding: 8px 0;
        flex-direction: column;
    }

    .info-label {
        margin-bottom: 4px;
    }

    .info-value {
        text-align: left;
        padding-left: 0;
    }

    .modal-footer {
        flex-direction: column;
        gap: 8px;
    }

    .modal-footer .btn {
        width: 100%;
    }
}

/* Instansi Penerbit: tampilkan pilihan radio KKP / Non KKP secara inline dan rapi */
.instansi-options {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

/* setiap item radio */
.instansi-options .form-check {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* sedikit perbesar radio agar mudah diklik */
.instansi-options .form-check-input {
    width: 1.05rem;
    height: 1.05rem;
    margin-top: 0;
}

/* input nama instansi muncul di baris berikutnya tetapi tetap sejajar lebar yang wajar */
#instansi_penerbit_name_wrapper {
    flex-basis: 100%;
    max-width: 520px;
    margin-top: 0.5rem;
}

/* styling field nama instansi agar konsisten */
#instansi_penerbit_name_wrapper .form-control {
    width: 100%;
    box-sizing: border-box;
}

/* responsive: pada layar kecil, stack vertikal */
@media (max-width: 576px) {
    .instansi-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    #instansi_penerbit_name_wrapper {
        max-width: 100%;
    }
}


/* ===========================
   DASHBOARD STAT CARDS (V2)
   =========================== */
.stat-card-v2 {
    border-radius: 8px;
    color: #fff;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
    text-decoration: none;
}

.stat-card-v2:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.15);
    color: #fff;
}

.stat-card-v2 .card-body {
    position: relative;
    z-index: 10;
}

.stat-card-v2 .stat-value {
    font-size: 2.2rem;
    font-weight: 700;
}

.stat-card-v2 .stat-label {
    font-size: 1rem;
}

.stat-card-v2 .stat-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 4.5rem;
    opacity: 0.2;
    transition: transform 0.3s ease;
}

.stat-card-v2:hover .stat-icon {
    transform: translateY(-50%) scale(1.1);
}

.stat-card-v2 .card-footer {
    background-color: rgba(0, 0, 0, 0.15);
    text-align: center;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

/* Fix: Mencegah header berubah tinggi saat dropdown user diklik */
.navbar .dropdown-toggle:focus {
    box-shadow: none;
}

/* Modern Header Style */
.header-modern {
    background: linear-gradient(135deg, #0d6efd 0%, #0043a8 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    height: 62px;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    z-index: 1030;
}

.header-modern .navbar-brand {
    font-weight: 700;
    letter-spacing: 0.5px;
    font-size: 1.25rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.header-user-info {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 15px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

.header-user-info:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-user-info i {
    font-size: 1.2rem;
}