/* public/assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Prompt:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,600&family=Sarabun:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,600&display=swap');

:root {
    --font-family-base: 'Prompt', 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --primary: #1e3a8a;
    --primary-hover: #1e40af;
    --secondary: #3b82f6;
    --bg-light: #f4f8fc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --card-shadow: 0 4px 6px -1px rgba(30, 58, 138, 0.08), 0 2px 4px -1px rgba(30, 58, 138, 0.04);
    --card-shadow-hover: 0 10px 15px -3px rgba(30, 58, 138, 0.12), 0 4px 6px -2px rgba(30, 58, 138, 0.06);
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

body {
    font-family: var(--font-family-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--bg-light);
    color: var(--text-main);
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6,
.navbar-brand, .nav-link, .btn, .badge, .dropdown-item, .card-title,
.stat-value, .stat-title, .form-label, .table th {
    font-family: var(--font-family-base);
}

/* Navbar - Modern Dark Navy Blue */
.navbar-custom {
    background: linear-gradient(135deg, #00204a 0%, #003366 100%) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 32, 74, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 10px;
    padding-bottom: 10px;
    position: sticky;
    top: 0;
    z-index: 1020;
}
.navbar-custom .navbar-brand {
    color: #ffffff !important;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 0.2px;
}
.navbar-custom .nav-link {
    color: rgba(255, 255, 255, 0.82) !important;
    font-weight: 500;
    font-size: 0.92rem;
    padding: 8px 14px !important;
    border-radius: 10px;
    transition: all 0.2s ease;
    margin: 2px 3px;
    display: flex;
    align-items: center;
}
.navbar-custom .nav-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}
.navbar-custom .nav-link.active {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.22) !important;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.navbar-custom .nav-link i {
    font-size: 1.05rem;
    margin-right: 6px;
    opacity: 0.9;
}
.navbar-custom .nav-link.active i {
    color: #fbbf24 !important;
    opacity: 1;
}
.navbar-custom .navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}
.navbar-custom .navbar-toggler:focus {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}
.navbar-custom .navbar-toggler-icon {
    filter: invert(1);
}
.user-navbar-badge {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 6px 14px;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

/* Modern User Dropdown */
.btn-user-dropdown {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 50px !important;
    padding: 5px 14px 5px 6px !important;
    color: #ffffff !important;
    transition: all 0.25s ease !important;
    cursor: pointer;
}
.btn-user-dropdown:hover, .btn-user-dropdown:focus {
    background: rgba(255, 255, 255, 0.22) !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}
.btn-user-dropdown::after {
    margin-left: 8px;
    vertical-align: middle;
    color: rgba(255, 255, 255, 0.8);
}
.user-avatar-circle {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #00204a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.dropdown-menu {
    border-radius: 14px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    animation: fadeInDown 0.2s ease;
}
.dropdown-item {
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s ease;
    border-radius: 6px;
    margin: 2px 6px;
    width: auto;
}
.dropdown-item:hover {
    background-color: #f1f5f9;
    color: var(--primary);
    transform: translateX(3px);
}
.dropdown-item.text-danger:hover {
    background-color: #fef2f2;
    color: #dc2626 !important;
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(0, 24, 58, 0.98);
        border-radius: 16px;
        padding: 16px;
        margin-top: 12px;
        border: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    }
    .navbar-custom .nav-link {
        padding: 10px 14px !important;
        margin-bottom: 4px;
    }
}

/* Cards */
.modern-card {
    background: #ffffff;
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}
.modern-card:hover {
    box-shadow: var(--card-shadow-hover);
}
.stat-card {
    border-left: 5px solid var(--primary);
}
.stat-icon {
    font-size: 2.5rem;
    color: var(--primary);
    opacity: 0.8;
}

/* Buttons */
.btn-modern {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
    letter-spacing: 0.3px;
}
.btn-primary-custom {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}
.btn-primary-custom:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: white;
    transform: translateY(-1px);
}
.btn-soft-primary {
    background-color: rgba(30, 58, 138, 0.1);
    color: var(--primary) !important;
    border: 1px solid rgba(30, 58, 138, 0.25);
    font-weight: 700;
    transition: all 0.2s ease-in-out;
}
.btn-soft-primary:hover, .btn-soft-primary:focus {
    background-color: var(--primary);
    color: #ffffff !important;
    border-color: var(--primary);
    box-shadow: 0 4px 6px -1px rgba(30, 58, 138, 0.2);
}

/* Tables */
.table-wrapper {
    background: #fff;
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
}
.table-hover tbody tr:hover {
    background-color: #f9fafb;
}
table.dataTable.no-footer {
    border-bottom: 1px solid var(--border-color) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current, 
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
    border-radius: 6px;
}

/* Forms & Inputs System */
.form-label {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.92rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.form-control, .form-select {
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    color: #1e293b;
    background-color: #ffffff;
    transition: all 0.2s ease-in-out;
}
.form-control:focus, .form-select:focus {
    border-color: #00204a;
    box-shadow: 0 0 0 3.5px rgba(0, 32, 74, 0.12);
    background-color: #ffffff;
}
.form-control::placeholder {
    color: #94a3b8;
    font-size: 0.9rem;
}
.input-group-text {
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    background-color: #f8fafc;
    color: #64748b;
    font-weight: 500;
    padding: 0.65rem 1rem;
}

/* Unified Modals */
.modal-content {
    border-radius: 20px !important;
    border: none !important;
    box-shadow: 0 20px 40px -10px rgba(0, 32, 74, 0.25) !important;
    overflow: hidden;
}
.modal-header {
    background: linear-gradient(135deg, #001e47 0%, #003366 100%) !important;
    color: #ffffff !important;
    padding: 18px 24px !important;
    border-bottom: none !important;
}
.modal-header .modal-title {
    font-weight: 700;
    font-size: 1.15rem;
    color: #ffffff !important;
    display: flex;
    align-items: center;
}
.modal-header .btn-close {
    filter: invert(1);
    opacity: 0.85;
}
.modal-header .btn-close:hover {
    opacity: 1;
}
.modal-header.bg-warning {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%) !important;
}
.modal-header.bg-danger {
    background: linear-gradient(135deg, #b91c1c 0%, #ef4444 100%) !important;
}
.modal-header.bg-success {
    background: linear-gradient(135deg, #047857 0%, #10b981 100%) !important;
}
.modal-body {
    padding: 24px !important;
    background-color: #f8fafc;
}
.modal-footer {
    border-top: 1px solid #e2e8f0 !important;
    padding: 14px 24px !important;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

/* Page Hero Banner System */
.page-hero-banner {
    background: linear-gradient(135deg, #001e47 0%, #003366 50%, #0f4c81 100%);
    border-radius: 20px;
    color: white;
    padding: 30px 28px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 32, 74, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 24px;
}
.page-hero-banner::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.2) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    pointer-events: none;
}
.page-hero-badge {
    background: rgba(251, 191, 36, 0.18);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.35);
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    margin-bottom: 10px;
}

/* Utilities */
.text-primary-custom {
    color: var(--primary) !important;
}
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
}

/* Modern DataTables Export Buttons */
.dt-buttons {
    margin-bottom: 1.25rem !important;
    display: inline-flex !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}
.dt-buttons .btn {
    border-radius: 50px !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    padding: 7px 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.2s ease !important;
}
.dt-buttons .btn-export-excel {
    background-color: #10b981 !important;
    color: #ffffff !important;
}
.dt-buttons .btn-export-excel:hover {
    background-color: #059669 !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.35) !important;
}
.dt-buttons .btn-export-csv {
    background-color: #0284c7 !important;
    color: #ffffff !important;
}
.dt-buttons .btn-export-csv:hover {
    background-color: #0369a1 !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.35) !important;
}
.dt-buttons .btn-export-print {
    background-color: #475569 !important;
    color: #ffffff !important;
}
.dt-buttons .btn-export-print:hover {
    background-color: #1e293b !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 10px rgba(71, 85, 105, 0.35) !important;
}

/* User Badge in Navbar */
.user-navbar-badge {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 6px 14px;
    font-size: 0.875rem;
    color: #ffffff !important;
    display: inline-flex;
    align-items: center;
}

/* ========================================== */
/* Item-by-Item Report Detail Cards & Photo Grid */
/* ========================================== */
.task-item-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}
.task-item-card.done {
    border-left: 4px solid #10b981;
    background: #fafdfb;
}
.task-item-card.undone {
    border-left: 4px solid #cbd5e1;
    background: #f8fafc;
    opacity: 0.75;
}
.task-item-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}
.task-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.task-photo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
    align-items: center;
}
.task-photo-thumb {
    width: 60px;
    height: 60px;
    min-width: 60px;
    max-width: 60px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    border: 1.5px solid #cbd5e1;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8fafc;
    display: inline-block;
}
.task-photo-thumb:hover {
    border-color: #0284c7;
    transform: scale(1.08);
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.25);
    z-index: 2;
}
.task-photo-thumb img {
    width: 60px !important;
    height: 60px !important;
    max-width: 60px !important;
    max-height: 60px !important;
    object-fit: cover !important;
    display: block;
}
