/**
 * Inspektorat Kota Baubau - Professional Website
 * Elegant Design with Light/Dark Mode
 */

:root {
    /* Light Mode Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #6c757d;
    --border-color: #e9ecef;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);
    
    /* Header */
    --header-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --header-text: #ffffff;
    
    /* Bottom Nav */
    --nav-bg: #ffffff;
    --nav-active: #667eea;
    --nav-inactive: #6c757d;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Colors */
.dark-mode {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: #111111;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: #1a1a1a;
    --shadow: rgba(0, 0, 0, 0.5);
    --shadow-hover: rgba(0, 0, 0, 0.7);
    
    --header-bg: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    --header-text: #ffffff;
    
    --nav-bg: #0a0a0a;
    --nav-active: #667eea;
    --nav-inactive: #6c757d;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Hide Scrollbar but keep scrolling functionality */
html {
    scroll-behavior: smooth;
    /* Firefox */
    scrollbar-width: none;
    /* IE and Edge */
    -ms-overflow-style: none;
}

html::-webkit-scrollbar {
    /* Chrome, Safari, Opera */
    display: none;
    width: 0;
    height: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
    min-height: 100vh;
    padding-bottom: 100px; /* Tambah padding bottom untuk memastikan semua konten terlihat */
    /* Firefox */
    scrollbar-width: none;
    /* IE and Edge */
    -ms-overflow-style: none;
    /* Enable scrolling */
    overflow-y: scroll;
    overflow-x: hidden;
}

body::-webkit-scrollbar {
    /* Chrome, Safari, Opera */
    display: none;
    width: 0;
    height: 0;
}

/* Hide scrollbar for scrollable elements (modals, containers, etc) */
.lapor-modal,
.berita-modal,
.data-table-container,
.berita-modal-body,
.form-container,
.main-content,
.container {
    /* Firefox */
    scrollbar-width: none;
    /* IE and Edge */
    -ms-overflow-style: none;
}

.lapor-modal::-webkit-scrollbar,
.berita-modal::-webkit-scrollbar,
.data-table-container::-webkit-scrollbar,
.berita-modal-body::-webkit-scrollbar,
.form-container::-webkit-scrollbar,
.main-content::-webkit-scrollbar,
.container::-webkit-scrollbar {
    /* Chrome, Safari, Opera */
    display: none;
    width: 0;
    height: 0;
}

/* Header Styles */
.header {
    background: var(--header-bg);
    color: var(--header-text);
    padding: 1rem 0;
    box-shadow: 0 2px 20px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-image {
    height: 60px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    transition: var(--transition);
}

.logo-image:hover {
    transform: scale(1.05);
}

.logo-icon {
    font-size: 2.5rem;
    color: #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    color: #ffffff;
}

.logo-subtitle {
    font-size: 0.75rem;
    font-weight: 300;
    margin: 0;
    opacity: 0.9;
    color: #ffffff;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.user-menu {
    font-size: 2rem;
    color: #ffffff;
    cursor: pointer;
    transition: var(--transition);
}

.user-menu:hover {
    transform: scale(1.1);
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    padding-bottom: 6rem; /* Tambah padding bottom untuk memastikan semua card terlihat */
    min-height: calc(100vh - 200px); /* Pastikan konten cukup tinggi */
}

.container {
    width: 100%;
    padding-bottom: 2rem; /* Tambah padding bottom untuk memastikan semua konten terlihat */
}

/* Welcome Section */
.welcome-section {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 2rem 0;
}

.welcome-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    animation: fadeInDown 0.8s ease-out;
}

.welcome-logo {
    max-width: 200px;
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
    transition: var(--transition);
}

.welcome-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.2));
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem; /* Tambah margin bottom */
    padding-bottom: 2rem; /* Tambah padding bottom untuk card terakhir */
}

.menu-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: 0 4px 20px var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    min-height: 80px;
    border: 1px solid var(--border-color);
}

.menu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
}

.menu-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 40px var(--shadow-hover);
}

.menu-card:hover::before {
    opacity: 1;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    z-index: 0;
    transition: var(--transition);
}

.menu-card:hover .card-overlay {
    opacity: 0.2;
}

.card-icon {
    font-size: 2rem;
    z-index: 2;
    position: relative;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    flex-shrink: 0;
}

.menu-card:hover .card-icon {
    transform: scale(1.1);
}

.card-content {
    z-index: 2;
    position: relative;
    text-align: left;
    flex: 1;
}

.card-title {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
    z-index: 2;
    position: relative;
}

.menu-card .card-title {
    font-weight: 500 !important;
}

.card-subtitle {
    font-size: 0.75rem;
    font-weight: 400;
    margin: 0.25rem 0 0 0;
    color: rgba(255, 255, 255, 0.85);
    z-index: 2;
    position: relative;
    opacity: 0.9;
    line-height: 1.3;
}

/* Gradient Classes */
.gradient-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.gradient-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #ffffff;
}

.gradient-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #ffffff;
}

.gradient-4 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: #ffffff;
}

.gradient-5 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: #ffffff;
}

.gradient-6 {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
    color: #ffffff;
}

.gradient-7 {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #1a1a1a;
}

.gradient-8 {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #1a1a1a;
}

/* Dark Mode Gradient Adjustments */
.dark-mode .gradient-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.dark-mode .gradient-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #ffffff;
}

.dark-mode .gradient-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #ffffff;
}

.dark-mode .gradient-4 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: #ffffff;
}

.dark-mode .gradient-5 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: #ffffff;
}

.dark-mode .gradient-6 {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
    color: #ffffff;
}

.dark-mode .gradient-7 {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #1a1a1a;
}

.dark-mode .gradient-8 {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #1a1a1a;
}

/* Dashboard Admin - Green Gradient Override */
.dashboard-admin-page .gradient-1 {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #ffffff;
}

.dashboard-admin-page .gradient-2 {
    background: linear-gradient(135deg, #0f9b0f 0%, #00c851 100%);
    color: #ffffff;
}

.dashboard-admin-page .gradient-3 {
    background: linear-gradient(135deg, #134e5e 0%, #71b280 100%);
    color: #ffffff;
}

.dashboard-admin-page .gradient-4 {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
    color: #ffffff;
}

.dashboard-admin-page .gradient-5 {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: #ffffff;
}

.dashboard-admin-page .gradient-6 {
    background: linear-gradient(135deg, #0ba360 0%, #3cba92 100%);
    color: #ffffff;
}

.dashboard-admin-page .gradient-7 {
    background: linear-gradient(135deg, #00b09b 0%, #96c93d 100%);
    color: #ffffff;
}

.dashboard-admin-page .gradient-8 {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #ffffff;
}

/* Dashboard Admin - Dark Mode Green Gradient Override */
.dashboard-admin-page.dark-mode .gradient-1 {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #ffffff;
}

.dashboard-admin-page.dark-mode .gradient-2 {
    background: linear-gradient(135deg, #0f9b0f 0%, #00c851 100%);
    color: #ffffff;
}

.dashboard-admin-page.dark-mode .gradient-3 {
    background: linear-gradient(135deg, #134e5e 0%, #71b280 100%);
    color: #ffffff;
}

.dashboard-admin-page.dark-mode .gradient-4 {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
    color: #ffffff;
}

.dashboard-admin-page.dark-mode .gradient-5 {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: #ffffff;
}

.dashboard-admin-page.dark-mode .gradient-6 {
    background: linear-gradient(135deg, #0ba360 0%, #3cba92 100%);
    color: #ffffff;
}

.dashboard-admin-page.dark-mode .gradient-7 {
    background: linear-gradient(135deg, #00b09b 0%, #96c93d 100%);
    color: #ffffff;
}

.dashboard-admin-page.dark-mode .gradient-8 {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #ffffff;
}

/* Dashboard Admin - Ensure all text in menu cards is white */
.dashboard-admin-page .menu-card {
    color: #ffffff !important;
}

.dashboard-admin-page .menu-card .card-title {
    color: #ffffff !important;
}

.dashboard-admin-page .menu-card .card-subtitle {
    color: #ffffff !important;
}

.dashboard-admin-page .menu-card .card-icon {
    color: #ffffff !important;
}

.dashboard-admin-page .menu-card .card-icon i {
    color: #ffffff !important;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    box-shadow: 0 -2px 20px var(--shadow);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.75rem 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--nav-inactive);
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    min-width: 70px;
    gap: 0.25rem;
}

.nav-item i {
    font-size: 1.5rem;
    transition: var(--transition);
}

.nav-item span {
    font-size: 0.75rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-item.active,
.nav-item:hover {
    color: var(--nav-active);
    background: rgba(102, 126, 234, 0.1);
}

.nav-item.active i,
.nav-item:hover i {
    transform: scale(1.1);
}

/* Desktop - Bottom Nav Lebih Kecil dengan Margin Kiri Kanan */
@media (min-width: 769px) {
    .bottom-nav {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        max-width: 400px;
        width: calc(100% - 2rem);
        border-radius: 20px 20px 0 0;
        margin: 0 auto;
        margin-bottom: 0.5rem;
        box-shadow: 0 -2px 20px var(--shadow), 0 0 0 1px var(--border-color);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        padding: 0 1rem;
    }
    
    .logo-title {
        font-size: 1.2rem;
    }
    
    .logo-subtitle {
        font-size: 0.65rem;
    }
    
    .logo-icon {
        font-size: 2rem;
    }
    
    .logo-image {
        height: 50px;
    }
    
    .welcome-logo {
        max-width: 150px;
    }
    
    .welcome-title {
        font-size: 2rem;
    }
    
    .welcome-subtitle {
        font-size: 1rem;
    }
    
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .menu-card {
        padding: 0.75rem 1rem;
        min-height: 65px;
    }
    
    .card-icon {
        font-size: 1.6rem;
        min-width: 42px;
    }
    
    .card-title {
        font-size: 0.85rem;
        line-height: 1.2;
    }
    
    .card-subtitle {
        font-size: 0.65rem;
        margin-top: 0.2rem;
        line-height: 1.2;
    }
    
    .card-content {
        flex: 1;
        min-width: 0;
    }
    
    .nav-item span {
        font-size: 0.7rem;
    }
    
    .nav-item i {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .logo-text {
        display: flex; /* Restore visibility */
    }
    
    .logo-title {
        font-size: 1rem;
    }

    .logo-subtitle {
        font-size: 0.6rem;
    }

    .logo-image {
        height: 45px;
    }
    
    .welcome-section {
        margin-bottom: 1rem;
        padding: 1.5rem 0;
    }
    
    .welcome-logo {
        max-width: 120px;
    }
    
    .welcome-title {
        font-size: 1.75rem;
    }
    
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .menu-card {
        min-height: 60px;
        padding: 0.6rem 0.8rem;
    }
    
    .card-icon {
        font-size: 1.3rem;
        min-width: 35px;
    }
    
    .card-title {
        font-size: 0.8rem; /* Increased from 0.65rem */
        line-height: 1.2;
    }
    
    .card-subtitle {
        display: block; /* Restore visibility */
        font-size: 0.6rem;
    }
    
    .card-content {
        flex: 1;
        min-width: 0;
    }
    
    .main-content {
        padding: 1.5rem 1rem;
        padding-bottom: 5rem; /* Pastikan padding bottom cukup di mobile */
    }
}

/* Smooth Scroll - Already defined above */

/* Global hide scrollbar for all scrollable elements */
textarea,
select,
.berita-modal-content,
.lapor-modal-content,
.data-table-container,
.form-container {
    /* Firefox */
    scrollbar-width: none;
    /* IE and Edge */
    -ms-overflow-style: none;
}

textarea::-webkit-scrollbar,
select::-webkit-scrollbar,
.berita-modal-content::-webkit-scrollbar,
.lapor-modal-content::-webkit-scrollbar,
.data-table-container::-webkit-scrollbar,
.form-container::-webkit-scrollbar {
    /* Chrome, Safari, Opera */
    display: none;
    width: 0;
    height: 0;
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-card {
    animation: fadeIn 0.6s ease-out;
}

.menu-card:nth-child(1) { animation-delay: 0.1s; }
.menu-card:nth-child(2) { animation-delay: 0.2s; }
.menu-card:nth-child(3) { animation-delay: 0.3s; }
.menu-card:nth-child(4) { animation-delay: 0.4s; }
.menu-card:nth-child(5) { animation-delay: 0.5s; }
.menu-card:nth-child(6) { animation-delay: 0.6s; }
.menu-card:nth-child(7) { animation-delay: 0.7s; }
.menu-card:nth-child(8) { animation-delay: 0.8s; }

/* Modal Popup Lapor */
.lapor-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.lapor-modal-content {
    background: var(--bg-card);
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lapor-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* Make header consistent with general app gradient */
    color: #ffffff;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    border-radius: 20px 20px 0 0; /* Add border radius to top corners */
}

.lapor-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.lapor-modal-close {
    background: rgba(255, 255, 255, 0.25); /* Button background */
    border: 2px solid rgba(255, 255, 255, 0.5); /* Button border */
    color: #ffffff;
    font-size: 0.95rem; /* Adjusted font size */
    font-weight: 600; /* Make text bolder */
    cursor: pointer;
    padding: 0.5rem 1.25rem; /* More padding for button look */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px; /* Rounded corners for button */
    transition: var(--transition);
    line-height: 1;
    width: auto;
    height: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); /* Button shadow */
}

.lapor-modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.lapor-modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lapor-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-radius: 15px;
    text-decoration: none;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
}

.lapor-option:hover {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #ffffff;
    border-color: transparent;
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(79, 172, 254, 0.3);
}

.lapor-option-icon {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    transition: var(--transition);
}

.lapor-option:hover .lapor-option-icon {
    transform: scale(1.1);
}

.lapor-option-text h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Dark Mode Modal */
.dark-mode .lapor-modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.dark-mode .lapor-option {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

/* Form Buku Tamu */
.form-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 20px var(--shadow);
    border: 1px solid var(--border-color);
}

.form-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.form-subtitle-wrapper {
    text-align: center;
    margin-bottom: 2rem;
}

.form-subtitle-wrapper .form-subtitle {
    margin-bottom: 0.25rem;
}

.form-subtitle-main {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0.5rem 0;
    letter-spacing: 2px;
}

.form-subtitle-small {
    text-align: center;
    color: var(--text-secondary);
    margin: 0 0 0 0;
    font-size: 0.9rem;
    font-style: italic;
}

.form-divider {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    margin: 1.5rem 0;
    border: none;
    border-radius: 2px;
}

.buku-tamu-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-label .required {
    color: #dc3545;
}

.required {
    color: #dc3545;
}

.form-input,
.form-textarea,
.form-select,
.form-input select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition);
}

select.form-input,
.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    background-color: var(--bg-secondary);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus,
select.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Form Buttons - Global Style */
.btn-submit,
.btn-cancel {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
}

.btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-cancel {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-cancel:hover {
    background: var(--border-color);
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.file-upload-wrapper {
    position: relative;
}

.form-file-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.file-upload-label:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.file-upload-label i {
    font-size: 1.5rem;
    color: #667eea;
}

.foto-preview {
    margin-top: 1rem;
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 300px;
}

.foto-preview img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    object-fit: cover;
}

.remove-foto {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #f5576c;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.remove-foto:hover {
    background: #e63946;
    transform: scale(1.1);
}

.form-submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.form-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.form-submit-btn:active {
    transform: translateY(0);
}

.back-button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    text-decoration: none;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert i {
    font-size: 1.2rem;
}

/* Detail Modal - Global Style (konsisten dengan Detail Data PTL) */
.detail-group {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.detail-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    display: block;
}

.detail-value {
    font-size: 1rem;
    color: var(--text-primary);
    word-wrap: break-word;
    line-height: 1.6;
}

.detail-value.text-area {
    white-space: pre-wrap;
    line-height: 1.6;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

/* Styling for detail KTP image */
.detail-foto-ktp-img {
    max-width: 100%;
    border-radius: 10px;
    margin-top: 0.5rem;
    border: 2px solid var(--border-color);
}

/* Styling for bukti files in detail modal */
.bukti-files {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.bukti-file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.bukti-file-icon {
    font-size: 1.5rem;
    color: #667eea;
}

.bukti-file-link {
    flex: 1;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.bukti-file-link:hover {
    color: #667eea;
}

/* Responsive Form */
@media (max-width: 768px) {
    .form-container {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .form-title {
        font-size: 1.75rem;
    }
    
    .form-subtitle {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .form-container {
        padding: 1rem;
        margin: 0.5rem;
        border-radius: 15px;
    }
    
    .form-title {
        font-size: 1.5rem;
    }
    
    .form-input,
    .form-textarea {
        padding: 0.75rem;
        font-size: 0.95rem;
    }
    
    .form-submit-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .bottom-nav,
    .lapor-modal {
        display: none;
    }
    
    body {
        padding-bottom: 0;
    }
}

/* Custom styles from data_lapor_bukan_asn.php */
/* --- Scrollbar Hiding (already global, ensure consistency) --- */
html {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

html::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
    width: 0;
    height: 0;
}

body {
    scrollbar-width: none;
    -ms-overflow-style: none;
    overflow-y: scroll;
    overflow-x: hidden;
}

body::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.main-content,
.data-container,
.data-table-container,
.lapor-bukan-asn-modal,
.lapor-bukan-asn-modal-content,
.lapor-bukan-asn-modal-body {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.main-content::-webkit-scrollbar,
.data-container::-webkit-scrollbar,
.data-table-container::-webkit-scrollbar,
.lapor-bukan-asn-modal::-webkit-scrollbar,
.lapor-bukan-asn-modal-content::-webkit-scrollbar,
.lapor-bukan-asn-modal-body::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* Data Container specific styles */
.data-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.action-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-container {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background-color: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

/* Data Table styles */
.data-table-container {
    background-color: var(--bg-card);
    border-radius: 15px;
    box-shadow: 0 2px 10px var(--shadow);
    overflow: hidden;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    max-width: 100%;
}

.data-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    font-size: 0.9rem;
    white-space: normal;
    overflow-wrap: anywhere; /* cegah teks nabrak border untuk string panjang tanpa spasi */
    word-break: break-word;
    box-sizing: border-box;
}

.data-table th {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Kolom kecil yang umumnya ada di semua tabel */
.data-table th:first-child,
.data-table td:first-child {
    width: 56px;
    min-width: 56px;
    white-space: nowrap;
    text-align: center;
}

.data-table th:last-child,
.data-table td:last-child {
    width: 160px;
    min-width: 160px;
    white-space: nowrap;
    text-align: center;
}

/* Cell berisi gambar biasanya tidak perlu melebar */
.data-table td.image-cell,
.data-table th.image-cell {
    width: 90px;
    min-width: 90px;
    text-align: center;
}

/* Wrapper isi cell: maksimal 6 baris, sisanya bisa discroll (bukan dipotong setengah) */
.data-table .cell-scroll {
    display: block;
    line-height: 1.4;
    max-height: calc(1.4em * 6);
    overflow: auto;
    padding-right: 2px; /* ruang kecil agar teks tidak ketempelan scrollbar */
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background-color: var(--bg-secondary);
}

.foto-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid var(--border-color);
}

.foto-thumbnail:hover {
    transform: scale(1.1);
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-action-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-action {
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-edit {
    background-color: #ffc107;
    color: #000;
}

.btn-edit:hover {
    background-color: #ffb300;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

.btn-delete {
    background-color: #dc3545;
    color: #fff;
}

.btn-delete:hover {
    background-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.btn-detail {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-detail:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Modal Styles - specific for lapor-bukan-asn-modal */
.lapor-bukan-asn-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.lapor-bukan-asn-modal-content {
    background-color: var(--bg-card);
    border-radius: 20px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    position: relative;
}

.lapor-bukan-asn-modal-header-detail {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    border-radius: 20px 20px 0 0;
    z-index: 10;
}

.lapor-bukan-asn-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.lapor-bukan-asn-modal-close-detail {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.lapor-bukan-asn-modal-close-detail:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.lapor-bukan-asn-modal-body {
    padding: 2rem;
    text-align: left;
}

/* Bukti files */
.bukti-files {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.bukti-file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.bukti-file-icon {
    font-size: 1.5rem;
    color: #667eea;
}

.bukti-file-link {
    flex: 1;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.bukti-file-link:hover {
    color: #667eea;
}

/* Mobile View - Card Layout */
.mobile-view {
    display: none;
}

.lapor-bukan-asn-card {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px var(--shadow);
    border: 1px solid var(--border-color);
}

.card-header-content {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.card-foto-ktp-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-1 {
    flex: 1;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.text-secondary-sm {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.card-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.card-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
}

.card-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

.card-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.action-buttons-mobile {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.action-buttons-mobile .btn-action {
    flex: 1;
    min-width: 100px;
}

/* Utility classes */
.text-center-padded {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.text-muted-italic {
    color: var(--text-secondary);
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .lapor-bukan-asn-modal-header-detail .lapor-bukan-asn-modal-title {
        font-size: 1.15rem;
    }
    .lapor-bukan-asn-modal-header-detail .lapor-bukan-asn-modal-close-detail {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    .lapor-bukan-asn-modal-body {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .data-container {
        padding: 0 0.5rem;
    }
    .page-title {
        font-size: 1.5rem;
    }
    .page-subtitle {
        font-size: 0.85rem;
    }
    .lapor-bukan-asn-modal-content {
        border-radius: 15px;
    }
    .lapor-bukan-asn-modal-header-detail {
        padding: 1rem;
        border-radius: 15px 15px 0 0;
    }
    .lapor-bukan-asn-modal-body {
        padding: 1rem;
    }
}

/* Override global .lapor-modal-header for detail modals for now to maintain specific styles */
.lapor-bukan-asn-modal .lapor-modal-header {
    background: none; /* remove global gradient */
    border-radius: 0; /* remove global border radius */
}

.lapor-bukan-asn-modal .lapor-modal-title {
    color: var(--text-primary); /* ensure it matches the lapor-bukan-asn-modal-title */
}

.lapor-bukan-asn-modal .lapor-modal-close {
    background: none;
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
}

.lapor-bukan-asn-modal .lapor-modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    transform: none;
    box-shadow: none;
}

.detail-group--no-border-bottom {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
}




