﻿/* ============================================================
   GLOBAL FONT - FIXED
   ============================================================ */

/* Import Google Font as fallback */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #3b8af0 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Force all elements to use the same font */
input, select, textarea, button, label, a, p, h1, h2, h3, h4, h5, h6, 
div, span, td, th, li, .navbar, .logo, .nav-links, .user-info,
.container, .stat-card, .form-group, .modal-content, .auth-container,
.auth-header, .auth-body, .auth-tabs, .auth-form, .auth-tab,
.section-title, .table-container, .table-container *, .recap-table *,
.custom-notification, .spinner, .dropdown-search-input, .dropdown-options-container,
.password-wrapper, .status-badge, .ref-badge, .summary-card,
.entry-card, .item-card, .item-category, .item-category-compact,
.form-section, .form-section-compact, .person-stats-compact .stat-box,
.rating-badge, .btn, .btn-primary, .btn-success, .btn-danger, .btn-warning,
.btn-sm, .btn-block, .btn-secondary, .action-btn, .close-btn,
.auth-container, .auth-header, .auth-body, .auth-tabs {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ============================================================
   NAVBAR
   ============================================================ */

.navbar {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 50px;
}

.user-badge {
    background: #ffc107;
    color: #1e3c72;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.station-indicator {
    background: #28a745;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.logout-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* ============================================================
   CONTAINER
   ============================================================ */

.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* ============================================================
   DATE RANGE
   ============================================================ */

.date-range {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    display: flex;
    gap: 2rem;
    align-items: flex-end;
    flex-wrap: wrap;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.date-input {
    flex: 1;
    min-width: 150px;
}

.date-input label {
    display: block;
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 0.5rem;
}

.date-input input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
}

/* ============================================================
   DASHBOARD
   ============================================================ */

.total-summary {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    display: flex;
    gap: 2rem;
    justify-content: space-around;
    flex-wrap: wrap;
}

.total-item {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
}

.total-item span {
    font-size: 2rem;
    font-weight: bold;
    display: block;
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    color: #1e3c72;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #2a4f8c;
}

/* ============================================================
   TABS
   ============================================================ */

.tab-content {
    display: none;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

/* ============================================================
   FORMS
   ============================================================ */

.form-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border-left: 4px solid #1e3c72;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 0.5rem;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #1e3c72;
    box-shadow: 0 0 0 3px rgba(30,60,114,0.1);
}

.section-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #1e3c72;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #1e3c72;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #1e3c72;
    color: white;
}

.btn-primary:hover {
    background: #2a4f8c;
    transform: translateY(-2px);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-warning {
    background: #ffc107;
    color: #1e3c72;
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* ============================================================
   TABLES
   ============================================================ */

.table-container {
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    background: white;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    min-width: 1000px;
}

th {
    background: #1e3c72;
    color: white;
    padding: 12px 10px;
    position: sticky;
    top: 0;
    z-index: 10;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

td {
    padding: 10px 8px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

td:first-child {
    font-weight: 500;
    text-align: left;
}

tr:hover {
    background: #f8f9fa;
}

/* ============================================================
   STATUS BADGES
   ============================================================ */

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
}

.status-pending { background: #fff3cd; color: #856404; }
.status-validated { background: #d4edda; color: #155724; }
.status-rejected { background: #f8d7da; color: #721c24; }

/* ============================================================
   ACTION BUTTONS
   ============================================================ */

.action-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin: 0 2px;
    font-size: 0.7rem;
    transition: all 0.3s;
}

.action-btn.validate { background: #28a745; color: white; }
.action-btn.reject { background: #dc3545; color: white; }
.action-btn.view { background: #17a2b8; color: white; }
.action-btn.edit { background: #ffc107; color: #1e3c72; }

.action-btn:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

/* ============================================================
   MODAL
   ============================================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    animation: fadeIn 0.3s;
}

.modal-content {
    background: white;
    margin: 2rem auto;
    padding: 2rem;
    width: 90%;
    max-width: 700px;
    border-radius: 15px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideDown 0.3s;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #1e3c72;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    transition: all 0.3s;
}

.close-btn:hover {
    color: #dc3545;
    transform: rotate(90deg);
}

/* ============================================================
   MULTIPLE ENTRIES
   ============================================================ */

.multiple-entries {
    border: 2px dashed #1e3c72;
    padding: 1rem;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    background: white;
    margin-bottom: 0.5rem;
}

.entry-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    position: relative;
    border-left: 4px solid;
}

.entry-card.arrested { border-left-color: #dc3545; }
.entry-card.surrendered { border-left-color: #28a745; }
.entry-card.atlarge { border-left-color: #ffc107; }
.entry-card.died { border-left-color: #6c757d; }

.item-card {
    background: white;
    border: 1px solid #28a745;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    position: relative;
}

.remove-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.15rem 0.5rem;
    cursor: pointer;
    font-size: 0.75rem;
}

/* ============================================================
   PASSWORD TOGGLE
   ============================================================ */

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-wrapper input {
    width: 100%;
    padding-right: 45px;
    padding-left: 12px;
    height: 44px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 1rem;
    transition: all 0.3s;
    box-sizing: border-box;
}

.password-wrapper input:focus {
    outline: none;
    border-color: #1e3c72;
    box-shadow: 0 0 0 3px rgba(30,60,114,0.1);
}

.password-wrapper input[type="password"]:-ms-reveal,
.password-wrapper input[type="password"]:-webkit-credentials-auto-fill-button {
    display: none !important;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 5px 8px;
    border-radius: 4px;
    color: #666;
    transition: all 0.2s;
    line-height: 1;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-appearance: none;
    user-select: none;
}

.password-toggle:hover {
    background: #f0f0f0;
    color: #1e3c72;
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.9);
}

.password-toggle.visible {
    color: #1e3c72;
}
.password-toggle.hidden {
    color: #999;
}

/* ============================================================
   AUTH
   ============================================================ */

.auth-container {
    max-width: 450px;
    margin: 50px auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow: hidden;
}

.auth-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.auth-body {
    padding: 2rem;
}

.auth-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.auth-tab {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: #f0f2f5;
    cursor: pointer;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s;
}

.auth-tab.active {
    background: #1e3c72;
    color: white;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.error-message {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
    padding: 0.5rem;
    background: #f8d7da;
    border-radius: 8px;
}

.success-message {
    color: #28a745;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
    padding: 0.5rem;
    background: #d4edda;
    border-radius: 8px;
}

/* ============================================================
   PERSON STATS
   ============================================================ */

.person-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-box {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    border-left: 4px solid;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.stat-box.arrested { border-left-color: #dc3545; }
.stat-box.surrendered { border-left-color: #28a745; }
.stat-box.atlarge { border-left-color: #ffc107; }
.stat-box.died { border-left-color: #6c757d; }

.stat-box .number {
    font-size: 2rem;
    font-weight: bold;
    color: #1e3c72;
}

/* ============================================================
   ITEMS GRID
   ============================================================ */

.confiscated-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.item-category {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 10px;
    border-left: 3px solid #1e3c72;
}

.unit-selector {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.unit-selector select, .unit-selector input {
    flex: 1;
    min-width: 80px;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.status-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.status-option {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
}

.status-option input {
    width: auto;
    margin-right: 0.5rem;
}

.filter-section {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-section select, .filter-section input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.info-box {
    background: #e7f3ff;
    padding: 1rem;
    border-left: 4px solid #1e3c72;
    margin-bottom: 1rem;
    border-radius: 8px;
}

.form-row {
    display: flex;
    gap: 1rem;
}

/* ============================================================
   RATING SYSTEM
   ============================================================ */

.rating-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    text-align: center;
}

.rating-badge.excellent, .legend-color.excellent { background: #28a745; color: white; }
.rating-badge.good, .legend-color.good { background: #17a2b8; color: white; }
.rating-badge.average, .legend-color.average { background: #ffc107; color: #1e3c72; }
.rating-badge.fair, .legend-color.fair { background: #fd7e14; color: white; }
.rating-badge.poor, .legend-color.poor { background: #dc3545; color: white; }

.rating-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1.5rem;
}

.legend-items {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.legend-color {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    margin-right: 5px;
    vertical-align: middle;
}

/* ============================================================
   RECAP
   ============================================================ */

.recap-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    text-align: center;
    padding: 1rem;
    border-radius: 12px;
}

.summary-number {
    font-size: 2rem;
    font-weight: bold;
}

.summary-label {
    font-size: 0.85rem;
    opacity: 0.9;
}

.recap-table-container {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.recap-table-container::-webkit-scrollbar {
    display: none;
}

.recap-table-container table {
    font-size: 10px;
}

.recap-table-container th,
.recap-table-container td {
    padding: 3px 4px;
}

.recap-table-container th {
    font-size: 8px;
}

.recap-table-container td {
    font-size: 9px;
}

.ref-badge {
    background: #1e3c72;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
}

/* ============================================================
   RATING TABLE
   ============================================================ */

#ratingTable td {
    vertical-align: middle;
    font-size: 0.8rem;
}
#ratingTable td:first-child {
    font-weight: bold;
    min-width: 45px;
}
#ratingTable td:nth-child(2) {
    font-weight: bold;
    min-width: 120px;
}
#ratingTable .rating-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
    margin-top: 4px;
    display: inline-block;
}

#ratingTable {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

#ratingTable thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 2px -1px rgba(0,0,0,0.4);
    font-weight: 600;
}

#ratingTable thead tr:nth-child(2) th {
    top: 32px;
    background-color: #1e3c72;
    color: white;
    box-shadow: none;
}

#ratingTable tbody tr:hover {
    background-color: #f5f5f5 !important;
}

#ratingTable td {
    font-size: 0.75rem;
    padding: 10px 8px;
    border: 1px solid #ddd;
    text-align: center;
    vertical-align: middle;
}

#ratingTable td:first-child {
    font-weight: bold;
    min-width: 45px;
}

#ratingTable td:nth-child(2) {
    font-weight: bold;
    min-width: 120px;
    text-align: left;
}

#ratingTable .rating-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-top: 4px;
}

#ratingTable .btn-sm {
    font-size: 0.75rem;
    padding: 4px 10px;
}

#ratingTable td[style*="background-color:#fff3cd"] {
    font-weight: 700;
    color: #1e3c72;
}

#ratingTable td[style*="background-color:#d4edda"] {
    font-weight: 700;
    color: #155724;
}

/* ============================================================
   CLICKABLE ROWS
   ============================================================ */

.clickable-row {
    cursor: pointer;
    transition: background 0.2s;
}

.clickable-row:hover {
    background: #f0f0f0 !important;
}

/* ============================================================
   SELECT WITH ADD BUTTON
   ============================================================ */

.select-with-add {
    display: flex;
    gap: 8px;
    align-items: center;
}
.select-with-add select {
    flex: 1;
    max-height: 200px;
    overflow-y: auto;
    min-height: 44px;
    padding-right: 35px;
}

.add-option-btn-sm {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-size: 0.85rem;
}
.add-option-btn-sm:hover {
    background: #218838;
    transform: translateY(-1px);
}

.delete-option-btn-sm {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-size: 0.85rem;
}
.delete-option-btn-sm:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.dynamic-option-tag {
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    display: inline-block;
    margin: 2px;
    cursor: pointer;
}
.dynamic-option-tag:hover {
    background: #dee2e6;
}

/* ============================================================
   ADMIN-ONLY ELEMENTS
   ============================================================ */

.admin-only, .admin-only-btn {
    display: none !important;
}

body.admin-mode .admin-only,
body.admin-mode .admin-only-btn {
    display: inline-block !important;
}

body.admin-mode .nav-link.admin-only {
    display: inline-block !important;
}

#editModal .modal-content {
    max-width: 900px;
}
#editModal .form-section {
    margin-bottom: 1rem;
}
#editModal .multiple-entries {
    max-height: 250px;
}

/* ============================================================
   SEARCHABLE DROPDOWN
   ============================================================ */

.searchable-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.dropdown-search-input:focus {
    outline: none;
    border-color: #1e3c72;
    box-shadow: 0 0 0 2px rgba(30, 60, 114, 0.1);
}

.dropdown-options-container {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.dropdown-options-container div {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.dropdown-options-container div:hover {
    background-color: #f0f0f0;
}
.dropdown-options-container div:last-child {
    border-bottom: none;
}

/* ============================================================
   FORGOT PASSWORD
   ============================================================ */

.forgot-password {
    color: #1e3c72;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: inline-block;
}

.forgot-password:hover {
    color: #dc3545;
}

.password-requirements {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.password-requirements.valid {
    color: #28a745;
}

.password-requirements.invalid {
    color: #dc3545;
}

/* ============================================================
   DATA ENTRY COMPACT
   ============================================================ */

.data-entry-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.data-entry-grid .full-width {
    grid-column: 1 / -1;
}

.form-section-compact {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #1e3c72;
}

.form-section-compact .section-title {
    font-size: 16px;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
}

.form-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.form-group-compact {
    margin-bottom: 0.75rem;
}

.form-group-compact label {
    display: block;
    font-weight: 600;
    color: #1e3c72;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.form-group-compact input,
.form-group-compact select,
.form-group-compact textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    transition: all 0.3s;
}

.form-group-compact input:focus,
.form-group-compact select:focus {
    outline: none;
    border-color: #1e3c72;
    box-shadow: 0 0 0 3px rgba(30,60,114,0.1);
}

.form-group-compact textarea {
    min-height: 70px;
    resize: vertical;
}

.form-group-compact select {
    appearance: auto;
}

.item-category-compact {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    border: 1px solid #e9ecef;
}

.item-category-compact h5 {
    font-size: 0.95rem;
    margin: 0 0 0.5rem 0;
    color: #1e3c72;
}

.item-category-compact .multiple-entries {
    max-height: 120px;
    overflow-y: auto;
    font-size: 0.85rem;
    background: #f8f9fa;
    border-radius: 6px;
    padding: 0.3rem;
    min-height: 30px;
}

.item-category-compact .unit-selector {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 0.5rem;
}

.item-category-compact .unit-selector select,
.item-category-compact .unit-selector input {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    flex: 1;
    min-width: 80px;
    background: white;
}

.item-category-compact .unit-selector select {
    min-width: 100px;
}

.item-category-compact .unit-selector button {
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
}

.person-stats-compact {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.person-stats-compact .stat-box {
    padding: 0.6rem;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid;
    background: white;
}

.person-stats-compact .stat-box .number {
    font-size: 1.4rem;
    font-weight: bold;
    color: #1e3c72;
}

.person-stats-compact .stat-box .label {
    font-size: 0.7rem;
    color: #666;
}

.person-stats-compact .stat-box.arrested { border-left-color: #dc3545; }
.person-stats-compact .stat-box.surrendered { border-left-color: #28a745; }
.person-stats-compact .stat-box.atlarge { border-left-color: #ffc107; }
.person-stats-compact .stat-box.died { border-left-color: #6c757d; }

.btn-sm-compact {
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-sm-compact:hover {
    transform: translateY(-1px);
}

.entry-card-compact {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 0.4rem 0.8rem;
    margin-bottom: 0.3rem;
    font-size: 0.8rem;
    position: relative;
    border-left: 3px solid;
}

.entry-card-compact.arrested { border-left-color: #dc3545; }
.entry-card-compact.surrendered { border-left-color: #28a745; }
.entry-card-compact.atlarge { border-left-color: #ffc107; }
.entry-card-compact.died { border-left-color: #6c757d; }

.entry-card-compact .remove-btn {
    position: absolute;
    top: 0.2rem;
    right: 0.2rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 0.05rem 0.4rem;
    cursor: pointer;
    font-size: 0.65rem;
    line-height: 1.4;
}

.item-card-compact {
    background: white;
    border: 1px solid #28a745;
    border-radius: 4px;
    padding: 0.25rem 0.6rem;
    margin-bottom: 0.2rem;
    font-size: 0.75rem;
    position: relative;
}

.item-card-compact .remove-btn {
    position: absolute;
    top: 0.1rem;
    right: 0.1rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 0.05rem 0.3rem;
    cursor: pointer;
    font-size: 0.6rem;
}

/* ============================================================
   ENTRY SUB-TABS
   ============================================================ */

.entry-sub-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.entry-sub-tab {
    padding: 0.5rem 1.2rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    background: #f8f9fa;
    transition: all 0.2s;
    font-weight: 500;
}

.entry-sub-tab:hover {
    background: #e9ecef;
}

.entry-sub-tab.active {
    background: #1e3c72;
    color: white;
    border-color: #1e3c72;
}

.entry-sub-section {
    display: none;
}

.entry-sub-section.active {
    display: block;
    animation: fadeIn 0.3s;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================================
   NOTIFICATION STYLES
   ============================================================ */

.custom-notification {
    position: fixed !important;
    top: 25px !important;
    right: 25px !important;
    padding: 16px 28px !important;
    border-radius: 10px !important;
    z-index: 99999 !important;
    box-shadow: 0 6px 25px rgba(0,0,0,0.25) !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    max-width: 450px !important;
    min-width: 250px !important;
    pointer-events: auto !important;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    border-left: 5px solid rgba(255,255,255,0.3) !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    animation: slideIn 0.4s ease-out !important;
}

.custom-notification-success {
    background: #28a745 !important;
    color: white !important;
}

.custom-notification-error {
    background: #dc3545 !important;
    color: white !important;
}

.custom-notification-warning {
    background: #ffc107 !important;
    color: #1e3c72 !important;
}

.custom-notification-info {
    background: #17a2b8 !important;
    color: white !important;
}

.custom-notification .close-btn {
    position: absolute !important;
    top: 8px !important;
    right: 12px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    opacity: 0.7 !important;
    pointer-events: auto !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    background: none !important;
    border: none !important;
    color: inherit !important;
    transition: opacity 0.2s !important;
}

.custom-notification .close-btn:hover {
    opacity: 1 !important;
    background: rgba(255,255,255,0.2) !important;
}

.custom-notification .icon {
    font-size: 22px !important;
    flex-shrink: 0 !important;
}

/* ============================================================
   LOADING SPINNER
   ============================================================ */

.spinner-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 99998;
    justify-content: center;
    align-items: center;
}

.spinner-overlay.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255,255,255,0.3);
    border-top: 5px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .nav-links {
        justify-content: center;
    }
    
    .user-info {
        justify-content: center;
    }
    
    .person-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .confiscated-items-grid {
        grid-template-columns: 1fr;
    }
    
    .total-summary {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    th, td {
        padding: 8px 6px;
        font-size: 0.7rem;
    }
    
    .recap-summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    #ratingTable td {
        font-size: 0.7rem;
        padding: 6px 4px;
    }
    
    .confiscated-items-grid {
        grid-template-columns: 1fr;
    }
    
    .data-entry-grid {
        grid-template-columns: 1fr;
    }
    
    .person-stats-compact {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .entry-sub-tabs {
        justify-content: center;
    }
    
    .entry-sub-tab {
        font-size: 0.75rem;
        padding: 0.3rem 0.8rem;
    }
    
    .recap-table-container table {
        font-size: 8px;
    }
    
    .recap-table-container th,
    .recap-table-container td {
        padding: 2px 3px;
    }
    
    .navbar {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        padding: 0.5rem;
    }
    
    .nav-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .nav-links a {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .user-info {
        justify-content: center;
        flex-wrap: wrap;
        font-size: 0.7rem;
    }
    
    .container {
        padding: 0 0.5rem;
    }
    
    .date-range {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .date-input {
        min-width: auto;
    }
    
    .form-grid-compact {
        grid-template-columns: 1fr;
    }

    .custom-notification {
        top: 10px !important;
        right: 10px !important;
        left: 10px !important;
        max-width: none !important;
        min-width: auto !important;
        font-size: 14px !important;
        padding: 12px 20px !important;
    }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */

@media print {
    .navbar, .date-range, .filter-section, .btn, .action-btn, .logout-btn {
        display: none !important;
    }
    
    .tab-content {
        display: block !important;
        box-shadow: none !important;
        padding: 0 !important;
    }
    
    .tab-content:not(#recap-tab) {
        display: none !important;
    }
    
    .modal {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
    
    .table-container {
        max-height: none !important;
        overflow: visible !important;
    }
    
    .custom-notification {
        display: none !important;
    }
}