/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #0891b2;
    --primary-light: #06b6d4;
    --primary-rgb: 8, 145, 178;
    --secondary-color: #d4af37;
    --secondary-light: #f1c40f;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --accent-color: #4f46e5;
    --body-bg: #f3f4f6;
    --sidebar-width: 260px;
    --sidebar-bg: #0e3f45;
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --hover-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-radius: 12px;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--body-bg);
    color: var(--dark-color);
    overflow-x: hidden;
}

/* Sidebar Styling */
#sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--sidebar-bg);
    color: #ffffff;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.05);
}

#sidebar .sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#sidebar .logo-img {
    height: 45px;
    width: 45px;
    object-fit: contain;
    border-radius: 8px;
    background-color: #fff;
    padding: 2px;
}

#sidebar .nav-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 20px;
    margin: 4px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

#sidebar .nav-link i {
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

#sidebar .nav-link:hover, #sidebar .nav-link.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

#sidebar .nav-link.active {
    background-color: var(--primary-color);
    border-left: 4px solid var(--secondary-color);
}

#sidebar .nav-link.active i {
    color: var(--secondary-color);
}

#sidebar .nav-link:hover i {
    transform: translateX(3px);
}

/* Main Content Wrapper */
#content {
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);
    transition: all 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top Navbar */
.navbar-custom {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 15px 30px;
}

.toggle-sidebar-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark-color);
    cursor: pointer;
    padding: 0;
    display: none;
}

/* Cards & Layout */
.card-custom {
    background-color: #ffffff;
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-custom:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.card-stats {
    border-left: 5px solid var(--primary-color);
}

.card-stats.stats-primary { border-left-color: var(--primary-color); }
.card-stats.stats-secondary { border-left-color: var(--secondary-color); }
.card-stats.stats-danger { border-left-color: #dc3545; }
.card-stats.stats-info { border-left-color: var(--accent-color); }

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.icon-box-primary { background-color: rgba(8, 145, 178, 0.1); color: var(--primary-color); }
.icon-box-secondary { background-color: rgba(212, 175, 55, 0.1); color: var(--secondary-color); }
.icon-box-danger { background-color: rgba(220, 53, 69, 0.1); color: #dc3545; }
.icon-box-info { background-color: rgba(79, 70, 229, 0.1); color: var(--accent-color); }

/* Table styling */
.table-custom-wrapper {
    background-color: #ffffff;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.table-custom th {
    background-color: rgba(8, 145, 178, 0.04);
    color: var(--primary-color);
    font-weight: 600;
    border-bottom: 2px solid rgba(8, 145, 178, 0.1);
    padding: 15px;
}

.table-custom td {
    padding: 15px;
    vertical-align: middle;
}

.table-custom tr {
    transition: all 0.15s ease;
}

.table-custom tr:hover {
    background-color: rgba(8, 145, 178, 0.01);
}

/* Custom Buttons */
.btn-primary-custom {
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    font-weight: 500;
    padding: 8px 20px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-primary-custom:hover {
    background-color: #0e7490;
    color: #ffffff;
}

.btn-secondary-custom {
    background-color: var(--secondary-color);
    color: #ffffff;
    border: none;
    font-weight: 500;
    padding: 8px 20px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-secondary-custom:hover {
    background-color: #bfa131;
    color: #ffffff;
}

/* Badge Styling */
.badge-custom {
    padding: 6px 12px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Modals */
.modal-content-custom {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-header-custom {
    background-color: var(--primary-color);
    color: #ffffff;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
    padding: 20px;
}

.modal-header-custom .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Login Page CSS */
.login-body {
    background: linear-gradient(135deg, #0e3f45 0%, #0891b2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.login-logo {
    max-height: 90px;
    width: auto;
    object-fit: contain;
    border-radius: 12px;
}

/* Floating Form Control */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--primary-color);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(8, 145, 178, 0.25);
}

/* Photo Gallery */
.photo-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}

.photo-card img {
    height: 200px;
    width: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.photo-card:hover img {
    transform: scale(1.1);
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(14, 63, 69, 0.9) 0%, rgba(14, 63, 69, 0.4) 60%, transparent 100%);
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    color: #ffffff;
}

.photo-card:hover .photo-overlay {
    opacity: 1;
}

/* Responsive Rules */
@media (max-width: 991.98px) {
    #sidebar {
        left: calc(-1 * var(--sidebar-width));
    }
    
    #sidebar.active {
        left: 0;
    }
    
    #content {
        width: 100%;
        margin-left: 0;
    }
    
    #content.active {
        margin-left: 0;
    }
    
    #sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }
    
    #sidebar-overlay.active {
        display: block;
    }
    
    .toggle-sidebar-btn {
        display: block;
    }
    
    .navbar-custom {
        padding: 15px 20px;
    }
}

/* Override Bootstrap Success Classes to Turquoise/Tosca */
.text-success {
    color: #0891b2 !important;
}
.bg-success {
    background-color: #0891b2 !important;
}
.bg-success.bg-opacity-10 {
    background-color: rgba(8, 145, 178, 0.1) !important;
}
.btn-success {
    background-color: #0891b2 !important;
    border-color: #0891b2 !important;
    color: #fff !important;
}
.btn-success:hover, .btn-success:focus, .btn-success:active {
    background-color: #0e7490 !important;
    border-color: #0e7490 !important;
    color: #fff !important;
}
.btn-outline-success {
    color: #0891b2 !important;
    border-color: #0891b2 !important;
}
.btn-outline-success:hover, .btn-outline-success:focus, .btn-outline-success:active,
.btn-outline-success.active, .btn-outline-success:active {
    background-color: #0891b2 !important;
    border-color: #0891b2 !important;
    color: #fff !important;
}
.border-success {
    border-color: #0891b2 !important;
}
.border-success-subtle {
    border-color: rgba(8, 145, 178, 0.25) !important;
}
.alert-success {
    background-color: rgba(8, 145, 178, 0.1) !important;
    border-color: rgba(8, 145, 178, 0.2) !important;
    color: #0e7490 !important;
}
.alert-success .btn-close {
    filter: invert(15%) sepia(95%) saturate(3000%) hue-rotate(170deg) brightness(85%) contrast(90%) !important;
}

/* Print Styling */
@media print {
    #sidebar, .navbar-custom, .btn, .no-print, footer, .toggle-sidebar-btn, #sidebar-overlay {
        display: none !important;
    }
    #content {
        margin-left: 0 !important;
        width: 100% !important;
        min-height: auto !important;
        background: white !important;
    }
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
    }
    .card-custom {
        box-shadow: none !important;
        border: none !important;
    }
    .print-container {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .print-table {
        border-collapse: collapse !important;
        width: 100% !important;
    }
    .print-table th, .print-table td {
        border: 1px solid #000000 !important;
        padding: 6px 10px !important;
        font-size: 11pt !important;
    }
    .print-table th {
        background-color: #f2f2f2 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .kop-surat {
        border-bottom: 3px double #000000;
        margin-bottom: 20px;
        padding-bottom: 10px;
    }
}
