/* Custom CSS Shared for Admin Pages (Perubahan Biodata, Sinkronisasi Data Lulusan, dll.) */

.input-group .select2-container .select2-selection--single {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.table thead th {
    background-color: #3699FF !important;
    color: #FFFFFF !important;
    font-weight: 800 !important;
}

/* Zebra stripe untuk baris ganjil */
.table tbody tr:nth-child(odd) {
    background-color: #fafafa !important;
}

/* Zebra stripe untuk baris genap */
.table tbody tr:nth-child(even) {
    background-color: #ffffff !important;
}

/* Hover effect */
.table tbody tr:hover {
    background-color: #e8f0fe !important;
    transition: background-color 0.3s ease;
}

/* Gridline/Border kotak-kotak pada tabel */
.table-modern, .table-modern th, .table-modern td {
    border: 1px solid #eeeeee !important;
}

/* Supaya tabel responsif di mobile bisa di-scroll horizontal */
.table-responsive {
    min-height: 200px;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

/* Custom Card & Input Elements */
.card-modern {
    border: none !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important;
    border-radius: 10px !important;
}

.card-header-modern {
    background-color: #ffffff;
    border-bottom: 1px solid #eeeeee;
    padding: 1.25rem 1.5rem;
    border-top-left-radius: 10px !important;
    border-top-right-radius: 10px !important;
}

.input-group-text-modern {
    background-color: #f8f9fa;
    border-color: #ced4da;
    font-weight: 600;
    color: #495057;
}

.form-control-modern, .form-select-modern {
    border-color: #ced4da;
}

.form-control-modern:focus, .form-select-modern:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.btn-modern {
    font-weight: 600;
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
}

.row-fakultas-clickable {
    cursor: pointer;
}

.subtable-card {
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
}

/* Override Toastr Success Background to Bright Green with Black Text */
.toast-success, .toastr-success, #toast-container > .toast-success {
    background-color: #148831 !important;
    color: #ffffff !important;
    opacity: 0.95 !important;
}

.toast-success .toast-title, .toast-success .toast-message, .toast-success .toast-close-button {
    color: #000000 !important;
}

.toastr .toastr-message {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
}

/* Custom Switch Text ON / OFF styling - Small and Centered */
.custom-switch-text {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 20px;
}
.custom-switch-text .custom-control-input {
    position: absolute;
    z-index: -1;
    opacity: 0;
}
.custom-switch-text .custom-control-label {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding-left: 0;
    margin-bottom: 0;
    cursor: pointer;
    user-select: none;
}
/* Track (Background Pill) */
.custom-switch-text .custom-control-label::before {
    content: "Off";
    position: absolute;
    left: 0;
    top: 0;
    width: 42px;
    height: 20px;
    background-color: #e4e6ef;
    border-radius: 100px;
    color: #7e8299;
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    text-align: right;
    padding-right: 5px;
    line-height: 20px;
    transition: background-color 0.2s ease, color 0.2s ease;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}
/* Handle (White Knob) */
.custom-switch-text .custom-control-label::after {
    content: "";
    position: absolute;
    left: 2px;
    top: 2px;
    width: 16px;
    height: 16px;
    background-color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}
/* Checked state (ON) */
.custom-switch-text .custom-control-input:checked ~ .custom-control-label::before {
    content: "On";
    background-color: #50cd89;
    color: #ffffff;
    text-align: left;
    padding-left: 5px;
}
.custom-switch-text .custom-control-input:checked ~ .custom-control-label::after {
    transform: translateX(22px);
}
/* Disabled state */
.custom-switch-text .custom-control-input:disabled ~ .custom-control-label {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Pagination Overrides */
nav[role="navigation"] {
    font-size: 0.875rem;
}

nav[role="navigation"] .inline-flex.shadow-sm.rounded-md {
    gap: 1px;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}

nav[role="navigation"] span[aria-current="page"] span,
nav[role="navigation"] a,
nav[role="navigation"] span {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
    padding-left: 0.55rem !important;
    padding-right: 0.55rem !important;
    font-size: 0.875rem !important;
    line-height: 1.25rem !important;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

nav[role="navigation"] svg {
    width: 0.95rem !important;
    height: 0.95rem !important;
}

nav[role="navigation"] .sm\:hidden span,
nav[role="navigation"] .sm\:hidden a {
    padding: 0.3rem 0.7rem !important;
    font-size: 0.8rem !important;
}

nav[role="navigation"] .shadow-sm {
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.06) !important;
}

nav[role="navigation"] .sm\:hidden {
    display: none !important;
}

nav[role="navigation"] span[aria-label*="Previous"],
nav[role="navigation"] span[aria-label*="Next"] {
    display: none !important;
}

nav[role="navigation"] .hidden.sm\:flex {
    justify-content: flex-end;
    width: 100%;
}

nav[role="navigation"] .inline-flex.shadow-sm.rounded-md {
    gap: 2px;
    box-shadow: none !important;
}

nav[role="navigation"] span[aria-current="page"] span,
nav[role="navigation"] a {
    padding: 0.25rem 0.6rem !important;
    font-size: 0.875rem !important;
    line-height: 1.25rem !important;
    min-width: 32px;
    text-align: center;
    border-radius: 6px !important;
}

nav[role="navigation"] svg {
    width: 16px !important;
    height: 16px !important;
}

nav[role="navigation"] span.rounded-l-md,
nav[role="navigation"] span.rounded-r-md {
    border-radius: 6px !important;
}

nav[role="navigation"] span[aria-current="page"] span {
    background-color: #0d6efd !important;
    color: white !important;
    border-color: #0d6efd !important;
    font-weight: 600;
}

nav[role="navigation"] p.text-sm.text-gray-700 {
    display: none !important;
}

nav[role="navigation"] .hidden.sm\:flex .flex-1:first-child {
    display: none !important;
}
