@import url("https://fonts.googleapis.com/css2?family=Poppins&display=swap");

:root {
    --primary-color: #417dd6;
    --primary-gradient: linear-gradient(135deg, #417dd6, #1976d2);
    --success-color: #2e7d32;
    --warning-color: #f9a825;
    --danger-color: #c62828;
    --light-bg: #f5f7fa;
    --dark-bg: #263238;
    --card-bg: #ffffff;
    --text-color: #212121;
    --sidebar-text: #eceff1;
}

*,
::after,
::before {
    box-sizing: border-box;
}

body {
    font-family: "Poppins", cursive, sans-serif;
    font-size: 0.875rem;
    opacity: 1;
    overflow-y: scroll;
    margin: 0;
    background-color: var(--light-bg);
    color: var(--text-color);
}

/* Background */
.bg-green {
    background-color: rgb(91, 158, 4) !important;
    color: white !important;
}

.bg-purple {
    background-color: purple !important;
    color: white !important;
}

.bg-green-subtle {
    background-color: rgba(91, 158, 4, 0.5);
}

.bg-purple-subtle {
    background-color: rgba(128, 0, 128, 0.5);
}

/* Text */
.text-green {
    color: rgb(53, 92, 2);
}
.text-purple {
    color: rgb(88, 1, 88);
}

/* Summernote */
.summernote ul,
.summernote ol {
    list-style: initial !important;
}

.modal .tooltip {
    transition: none !important;
    animation: none !important;
}

.tooltip {
    transition: none !important;
    animation: none !important;
}

/* Font Custom */
.text-muted {
    color: #70657b !important;
}

.small {
    font-size: 0.75rem !important;
}

.chart-container {
    width: 80%;
    margin: auto;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.breadcrumb {
    display: flex;
    list-style: none;
    padding: 10px;
    background: var(--card-bg);
    width: 100%;
    margin: auto;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: var(--text-color);
}

.breadcrumb li {
    margin: 0 10px;
}

.breadcrumb li a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: bold;
}

.breadcrumb li::after {
    content: ">";
    margin-left: 10px;
    color: #555;
}

.breadcrumb li:last-child::after {
    content: "";
}

a {
    cursor: pointer;
    text-decoration: none;
    color: var(--primary-color);
}

li {
    list-style: none;
}

h4 {
    font-size: 1.275rem;
    color: var(--text-color);
}

/* Layout for admin dashboard skeleton */

.wrapper {
    align-items: stretch;
    display: flex;
    width: 100%;
}

.navbar {
    background: var(--primary-gradient);
    border-bottom: 5px solid #e4eaff;
}

.navbar-brand {
    font-size: 24px;
    font-weight: bold;
    color: #fff !important;
}

.nav-link {
    font-size: 18px;
    color: #aeaeae;
    transition: 0.3s;
}

.nav-link:hover {
    color: var(--primary-color);
}

#sidebar {
    max-width: 264px;
    min-width: 264px;
    background: linear-gradient(112deg, var(--dark-bg), #616161);
    transition: all 0.35s ease-in-out;
}

.main {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    overflow: hidden;
    transition: all 0.35s ease-in-out;
    width: 100%;
    background-color: var(--light-bg);
}

/* Sidebar Elements Style */

.sidebar-logo {
    padding: 1.15rem;
}

.sidebar-logo a {
    color: var(--sidebar-text);
    font-size: 1.15rem;
    font-weight: 600;
}

.sidebar-nav {
    list-style: none;
    margin-bottom: 0;
    padding-left: 0;
    margin-left: 0;
}

.sidebar-header {
    color: var(--sidebar-text);
    font-size: 0.75rem;
    padding: 1.5rem 1.5rem 0.375rem;
    text-transform: uppercase;
    font-weight: bold;
    opacity: 0.7;
}

/* Style dasar sidebar link */
a.sidebar-link {
    padding: 0.625rem 1.625rem;
    color: var(--sidebar-text);
    position: relative;
    display: block;
    font-size: 0.875rem;
    text-decoration: none;
    border-radius: 6px; /* Membuat sudut sedikit rounded */
    transition: all 0.3s ease-in-out;
    overflow: hidden;
}

/* Hover effect modern dengan gradient dan efek glowing */
a.sidebar-link:hover {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 79, 143, 0.5);
    transform: translateY(-2px);
}

/* Efek hover untuk dropdown item */
.sidebar-dropdown .sidebar-link {
    padding-left: 3.2rem;
}

.sidebar-dropdown .sidebar-link:hover {
    background: linear-gradient(
        135deg,
        rgba(13, 71, 161, 0.3),
        rgba(25, 118, 210, 0.6)
    );
    color: #fff;
}

.sidebar-dropdown .sidebar-link.active-sub {
    background: linear-gradient(
        135deg,
        rgba(13, 71, 161, 0.3),
        rgba(25, 118, 210, 0.6)
    );
    color: #fff;
}

/* Animasi tambahan saat hover */
a.sidebar-link::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.1) 10%,
        transparent 10.01%
    );
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s ease-in-out;
}

/* Efek ripple saat hover */
a.sidebar-link:hover::before {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
}

/* Efek animasi untuk dropdown arrow */
.sidebar-link[data-bs-toggle="collapse"]::after {
    border: solid;
    border-width: 0 0.075rem 0.075rem 0;
    content: "";
    display: inline-block;
    padding: 2px;
    position: absolute;
    right: 1.5rem;
    top: 1.4rem;
    transform: rotate(-135deg);
    transition: all 0.3s ease-out;
}

.sidebar-link[data-bs-toggle="collapse"].collapsed::after {
    transform: rotate(45deg);
}

/* Efek aktif untuk menu yang dipilih */
.sidebar-item.active > .sidebar-link {
    background: var(--primary-gradient);
    color: #fff;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0, 76, 143, 0.5);
}

.avatar {
    height: 40px;
    width: 40px;
}

.navbar-expand .navbar-nav {
    margin-left: auto;
}

.content {
    flex: 1;
    max-width: 100vw;
    width: 100vw;
}

@media (min-width: 768px) {
    .content {
        max-width: auto;
        width: auto;
    }
}

.illustration {
    background-color: var(--primary-color);
    color: var(--text-color);
}

.illustration-img {
    max-width: 150px;
    width: 100%;
}

/* Sidebar Toggle */
#sidebar.collapsed {
    margin-left: -264px;
}

/* Form Styling */
.form-control,
.form-select {
    border-radius: 8px;
    padding: 0.375rem 2.25rem 0.375rem 0.75rem;
    font-size: 1rem;
    background-color: var(--light-bg) !important;
    color: var(--text-color);
    border: 1px solid #ccc;
}

.form-check-input:checked {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

input {
    background-color: var(--light-bg) !important;
    color: var(--text-color);
}

select {
    background-color: var(--light-bg) !important;
    color: var(--text-color);
}

textarea {
    background-color: var(--light-bg) !important;
    color: var(--text-color);
}

/* Select 2 Custom */
/* Container utama Select2 */
.select2-container .select2-selection--single {
    height: 40px !important;
    padding: 6px 12px;
    background-color: var(--card-bg) !important;
    border-radius: 8px !important;
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--text-color);
    box-shadow: none;
    transition: border 0.2s ease-in-out;
}

.select2-container--default
    .select2-selection--single
    .select2-selection__rendered {
    color: var(--text-color);
    line-height: 1.5;
    padding-left: 0;
}

.select2-container--default
    .select2-selection--single
    .select2-selection__arrow {
    height: 100%;
    right: 10px;
}

.select2-container--default.select2-container--focus
    .select2-selection--single {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 71, 161, 0.25);
}

.select2-dropdown {
    border: 2px solid var(--primary-color);
    border-radius: 6px;
}

.select2-results__option--highlighted {
    background-color: var(--primary-color) !important;
    color: white;
}

/* Tombol */
.btn-warning {
    background-color: var(--warning-color);
    border: none;
    color: white;
}
.btn-warning:hover {
    background-color: #fcdc4d;
    color: white;
}
.btn-warning:active {
    background-color: #fcdc4d !important;
    color: white !important;
}

.btn-danger {
    background-color: var(--danger-color);
    border: none;
}
.btn-danger:hover {
    background-color: #a52727;
}

.btn-indigo {
    background-color: var(--primary-color);
    color: white;
    border: none;
    transition: background-color 0.2s ease;
}
.btn-indigo:hover {
    background-color: #115293;
    color: white;
}
.btn-indigo:active {
    background-color: #0b3c71 !important;
    color: white !important;
}

/* Tabel Modern */
.table thead {
    background: var(--primary-color);
    color: white;
}

/* Datatable */
#datatable tbody tr:nth-child(odd) {
    background-color: #f2f2f2;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 1rem;
}

/* Card Styling */
.card-header {
    background: var(--primary-color);
    color: white;
    font-weight: bold;
    border-radius: 8px 8px 0 0;
    text-align: center;
    padding: 12px;
}

.card {
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: var(--card-bg);
}

.stroke {
    position: absolute;
    top: 0;
    left: 0;
    width: 5cm;
    height: 4px;
    background: var(--warning-color);
    border-radius: 2px;
}

/* Modal */
.modal-header {
    border-bottom: none;
}

.modal-footer {
    border-top: none;
}

.modal-content {
    border-radius: 20px;
    overflow: visible;
    background-color: var(--card-bg);
    color: var(--text-color);
}

.modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
    animation: bubblePop 0.5s ease-out;
}

@keyframes bubblePop {
    0% {
        transform: scale(0.7);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
    100% {
        transform: scale(1);
    }
}

/* Animasi saat muncul */
.fade {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.show {
    opacity: 1;
    transform: translateY(0);
}

/* Primary Alert */
.toyui-alert-primary {
    background: linear-gradient(135deg, #dbe7ff, #b3d4ff);
    border-left: 5px solid var(--primary-color);
    color: #004085;
    font-weight: 500;
}

/* Danger Alert */
.toyui-alert-danger {
    background: linear-gradient(135deg, #ffdadb, #ffb3b5);
    border-left: 5px solid var(--danger-color);
    color: #b71c1c;
    font-weight: 500;
}

/* Tombol close */
.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 20px;
    font-weight: bold;
    background: none;
    border: none;
    color: rgba(0, 0, 0, 0.6);
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.close-btn:hover {
    opacity: 1;
    color: black;
}

/* Footer and Nav */

@media (max-width: 767.98px) {
    .js-sidebar {
        margin-left: -264px;
    }

    #sidebar.collapsed {
        margin-left: 0;
    }

    .navbar,
    footer {
        width: 100vw;
    }
}

.time-input-group {
    max-width: 350px; /* desktop */
}

@media (max-width: 576px) {
    .time-input-group {
        display: block !important; /* ubah jadi vertikal */
        max-width: 100%;
    }
    .time-input-group .input-group-text {
        display: block;
        width: 100%;
        border-radius: 0.375rem 0.375rem 0 0;
        text-align: left;
    }
    .time-input-group .form-control {
        width: 100%;
        border-radius: 0 0 0.375rem 0.375rem;
    }
}
