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

:root {
    --primary-teal: #0d9488;
    --primary-teal-hover: #0f766e;
    --primary-teal-light: #f0fdfa;
    --primary-teal-opaque: rgba(13, 148, 136, 0.12);
    --secondary-emerald: #059669;
    --secondary-emerald-hover: #047857;
    --secondary-emerald-light: #ecfdf5;
    --accent-sky: #0284c7;
    --accent-sky-light: #f0f9ff;
    --bg-slate: #f8fafc;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -6px rgba(0, 0, 0, 0.1);
    --sidebar-width: 260px;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-slate);
    color: var(--text-dark);
    font-size: 0.95rem;
    overflow-x: hidden;
}

/* Custom Color Utilities & Contrast Fixes */
.text-teal { color: #0d9488 !important; }
.text-teal-dark { color: #0f766e !important; }
.text-emerald { color: #059669 !important; }
.text-emerald-dark { color: #047857 !important; }
.text-sky { color: #0284c7 !important; }
.text-sky-dark { color: #0369a1 !important; }

/* Background Utilities */
.bg-teal { background-color: #0d9488 !important; color: #ffffff !important; }
.bg-emerald { background-color: #059669 !important; color: #ffffff !important; }
.bg-sky { background-color: #0284c7 !important; color: #ffffff !important; }

.bg-teal-opaque {
    background-color: rgba(13, 148, 136, 0.14) !important;
    color: #0f766e !important;
}
.bg-emerald-opaque {
    background-color: rgba(5, 150, 105, 0.14) !important;
    color: #047857 !important;
}
.bg-sky-opaque {
    background-color: rgba(2, 132, 199, 0.14) !important;
    color: #0369a1 !important;
}

/* Button Utilities */
.btn-teal {
    background-color: #0d9488 !important;
    border-color: #0d9488 !important;
    color: #ffffff !important;
}
.btn-teal:hover, .btn-teal:focus {
    background-color: #0f766e !important;
    border-color: #0f766e !important;
    color: #ffffff !important;
}

.btn-outline-teal {
    color: #0d9488 !important;
    border-color: #0d9488 !important;
    background-color: transparent !important;
}
.btn-outline-teal:hover, 
.btn-outline-teal:focus,
.btn-outline-teal:active,
.btn-check:checked + .btn-outline-teal {
    background-color: #0d9488 !important;
    border-color: #0d9488 !important;
    color: #ffffff !important;
}

.btn-emerald {
    background-color: #059669 !important;
    border-color: #059669 !important;
    color: #ffffff !important;
}
.btn-emerald:hover, .btn-emerald:focus {
    background-color: #047857 !important;
    border-color: #047857 !important;
    color: #ffffff !important;
}

.btn-outline-emerald {
    color: #059669 !important;
    border-color: #059669 !important;
    background-color: transparent !important;
}
.btn-outline-emerald:hover,
.btn-outline-emerald:focus,
.btn-check:checked + .btn-outline-emerald {
    background-color: #059669 !important;
    border-color: #059669 !important;
    color: #ffffff !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Glassmorphism Navigation */
.glass-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(13, 148, 136, 0.15);
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: all 0.3s ease;
}

/* Hero Section style for home */
.hero-section {
    background: linear-gradient(135deg, #0d9488 0%, #0284c7 100%);
    border-radius: 0 0 40px 40px;
    color: #ffffff;
    padding: 60px 0 100px;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

/* Premium Cards */
.custom-card {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}
.custom-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-shadow-hover);
    border-color: rgba(13, 148, 136, 0.25);
}

.custom-card .card-header-teal {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    color: #ffffff;
    font-weight: 700;
    border-bottom: none;
    padding: 20px;
}

.custom-card .card-header-emerald {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #ffffff;
    font-weight: 700;
    border-bottom: none;
    padding: 20px;
}

/* Quick Action Cards */
.action-card {
    border-radius: 20px;
    padding: 24px;
    height: 100%;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: var(--text-dark);
}
.action-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
    border-color: rgba(13, 148, 136, 0.3);
}
.action-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}
.action-card:hover .action-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Responsive Table Wrapper & Horizontal Swipe Scroll */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    margin-bottom: 0.5rem;
}

.table-responsive .table-custom {
    min-width: 720px;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.table-custom tr {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    transition: all 0.2s ease;
}
.table-custom tr:hover {
    background-color: #f1f5f9;
}
.table-custom th {
    background-color: transparent !important;
    border-bottom: none;
    color: #475569;
    font-weight: 700;
    padding: 12px 16px;
    white-space: nowrap;
}
.table-custom td {
    padding: 14px 16px;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
    white-space: nowrap;
    color: #1e293b;
}
.table-custom td:first-child {
    border-left: 1px solid #e2e8f0;
    border-radius: 12px 0 0 12px;
}
.table-custom td:last-child {
    border-right: 1px solid #e2e8f0;
    border-radius: 0 12px 12px 0;
}

/* Form Styling */
.form-control, .form-select {
    border-radius: 12px;
    border: 1.5px solid #cbd5e1;
    padding: 12px 16px;
    background-color: #ffffff;
    color: #0f172a;
    transition: all 0.2s ease;
}
.form-control:focus, .form-select:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.15);
    background-color: #ffffff;
    color: #0f172a;
}
.btn {
    border-radius: 12px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.2s ease;
}

/* Badge styles */
.badge-status {
    padding: 6px 14px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.8rem;
}
.badge-teal {
    background-color: #ccfbf1 !important;
    color: #0f766e !important;
    border: 1px solid rgba(13, 148, 136, 0.25) !important;
}
.badge-emerald {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
    border: 1px solid rgba(5, 150, 105, 0.25) !important;
}
.badge-sky {
    background-color: #e0f2fe !important;
    color: #0369a1 !important;
    border: 1px solid rgba(2, 132, 199, 0.25) !important;
}

/* Sidebar & Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: #ffffff;
    border-right: 1px solid #e2e8f0;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    padding: 24px 16px;
    overflow-y: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1035;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.sidebar-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 30px 40px;
    transition: margin-left 0.3s ease, padding 0.3s ease;
    width: calc(100% - var(--sidebar-width));
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 800;
    color: #0d9488 !important;
    margin-bottom: 24px;
    padding-left: 8px;
    text-decoration: none;
}

.menu-category-title {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin: 20px 0 8px 12px;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}
.nav-menu-item {
    margin-bottom: 4px;
}
.nav-menu-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    color: #475569 !important;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}
.nav-menu-link:hover {
    background-color: #f1f5f9;
    color: #0f172a !important;
}
.nav-menu-link.active {
    background-color: #0d9488 !important;
    color: #ffffff !important;
}
.nav-menu-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* Floating Action Button */
.fab-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #0d9488;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 10px 25px rgba(13, 148, 136, 0.4);
    z-index: 1000;
    border: none;
    transition: all 0.3s ease;
}
.fab-btn:hover {
    transform: scale(1.1) rotate(90deg);
    background-color: #0f766e;
    color: #ffffff;
}

/* Tablet & Mobile responsive adjustments */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: 10px 0 30px rgba(0,0,0,0.15);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 20px 16px;
    }
    .hero-section {
        padding: 40px 0 70px;
        border-radius: 0 0 25px 25px;
    }
    .table-responsive .table-custom {
        min-width: 680px;
    }
}

@media (max-width: 575.98px) {
    .main-content {
        padding: 16px 12px;
    }
    .table-responsive .table-custom {
        min-width: 600px;
    }
    .custom-card {
        border-radius: 16px;
    }
}

/* Print styles for Laporan */
@media print {
    .sidebar, .sidebar-backdrop, .btn, .no-print, header, nav, footer, .fab-btn {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    body {
        background-color: white !important;
        color: black !important;
    }
    .card, .custom-card {
        border: none !important;
        box-shadow: none !important;
    }
}
