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

:root {
    --bg-main: #060913;
    --bg-card: rgba(17, 25, 40, 0.75);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glowing: rgba(45, 90, 73, 0.35);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --accent-blue: #2d5a49;
    --accent-blue-hover: #1e3a8a;
    --accent-blue-alpha: rgba(45, 90, 73, 0.15);
    --accent-blue-glow: rgba(45, 90, 73, 0.4);
    --accent-gold: #e05e2b;
    --accent-gold-glow: rgba(224, 94, 43, 0.4);
    --accent-green: #10b981;
    --accent-green-glow: rgba(16, 185, 129, 0.4);
    --accent-red: #ef4444;
    --accent-red-glow: rgba(239, 68, 68, 0.4);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --glass-blur: blur(14px);
}

/* County specific color themes */
body.theme-pcso {
    --bg-main: #050814;
    --accent-blue: #2563eb;
    --accent-blue-hover: #1d4ed8;
    --accent-blue-glow: rgba(37, 99, 235, 0.4);
    --accent-blue-alpha: rgba(37, 99, 235, 0.12);
    --border-glowing: rgba(37, 99, 235, 0.35);
    --accent-gold: #f59e0b;
    --accent-gold-glow: rgba(245, 158, 11, 0.4);
    
    background-image: 
        radial-gradient(at 10% 10%, rgba(37, 99, 235, 0.12) 0px, transparent 50%),
        radial-gradient(at 90% 10%, rgba(245, 158, 11, 0.06) 0px, transparent 50%),
        radial-gradient(at 50% 90%, rgba(16, 185, 129, 0.04) 0px, transparent 50%);
}

body.theme-hcso {
    --bg-main: #0c0407;
    --bg-card: rgba(24, 12, 17, 0.75);
    --accent-blue: #e11d48;
    --accent-blue-hover: #be123c;
    --accent-blue-glow: rgba(225, 29, 72, 0.4);
    --accent-blue-alpha: rgba(225, 29, 72, 0.12);
    --border-glowing: rgba(225, 29, 72, 0.35);
    --accent-gold: #fda4af;
    --accent-gold-glow: rgba(253, 164, 175, 0.4);
    
    background-image: 
        radial-gradient(at 10% 10%, rgba(225, 29, 72, 0.12) 0px, transparent 50%),
        radial-gradient(at 90% 10%, rgba(253, 164, 175, 0.06) 0px, transparent 50%),
        radial-gradient(at 50% 90%, rgba(37, 99, 235, 0.04) 0px, transparent 50%);
}

* {
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 10% 10%, rgba(45, 90, 73, 0.12) 0px, transparent 50%),
        radial-gradient(at 90% 10%, rgba(224, 94, 43, 0.06) 0px, transparent 50%),
        radial-gradient(at 50% 90%, rgba(16, 185, 129, 0.04) 0px, transparent 50%);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}

/* Glassmorphism Containers */
.sentinel-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sentinel-card:hover {
    border-color: var(--border-glowing);
    box-shadow: 0 10px 40px 0 rgba(37, 99, 235, 0.15);
    transform: translateY(-2px);
}

/* Layout headers */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 0;
}

/* Premium Badges */
.badge-sentinel {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
}

.badge-sentinel-blue {
    background: rgba(37, 99, 235, 0.15);
    color: #60a5fa;
    border-color: rgba(37, 99, 235, 0.3);
}

.badge-sentinel-gold {
    background: rgba(251, 191, 36, 0.15);
    color: #fcd34d;
    border-color: rgba(251, 191, 36, 0.3);
}

.badge-sentinel-green {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
}

.badge-sentinel-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

/* Sentinel buttons */
.btn-sentinel {
    font-family: var(--font-heading);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.btn-sentinel[disabled], .btn-sentinel:disabled {
    opacity: 0.35 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.btn-sentinel-primary {
    background: var(--accent-blue);
    color: white;
    box-shadow: 0 4px 12px var(--accent-blue-glow);
}

.btn-sentinel-primary:hover {
    background: var(--accent-blue-hover);
    box-shadow: 0 6px 20px var(--accent-blue-glow);
    transform: translateY(-1px);
}

.btn-sentinel-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-sentinel-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-secondary);
}

.btn-sentinel-danger {
    background: var(--accent-red);
    color: white;
    box-shadow: 0 4px 12px var(--accent-red-glow);
}

.btn-sentinel-danger:hover {
    background: #dc2626;
    box-shadow: 0 6px 20px var(--accent-red-glow);
}

/* Form Styles */
.sentinel-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.sentinel-form-group label {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sentinel-form-group input, .sentinel-form-group select {
    width: 100%;
    padding: 12px;
    background: rgba(8, 12, 24, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    font-size: 0.95rem;
    font-family: var(--font-body);
}

.sentinel-form-group input:focus, .sentinel-form-group select:focus {
    outline: none;
    border-color: var(--accent-blue);
}

/* Styled Category Dropdown Badge */
.category-badge-select {
    padding: 4px 24px 4px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 12px;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='1.5'><path d='M1 1l4 4 4-4'/></svg>") no-repeat right 8px center;
    background-size: 8px 6px;
    color: var(--text-secondary);
    white-space: nowrap;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    outline: none;
    font-family: inherit;
}

.category-badge-select:hover {
    border-color: var(--accent-gold); /* Tabloid orange */
    background-color: rgba(224, 94, 43, 0.05); /* subtle orange glow */
    color: #fff;
    box-shadow: 0 0 8px rgba(224, 94, 43, 0.25);
}

.category-badge-select:focus {
    border-color: var(--accent-blue); /* Forest green */
    background-color: rgba(45, 90, 73, 0.08); /* subtle green glow */
    color: #fff;
    box-shadow: 0 0 8px rgba(45, 90, 73, 0.35);
}

.category-badge-select option {
    background-color: #060913; /* matches var(--bg-main) */
    color: var(--text-primary);
    text-transform: uppercase;
    font-weight: normal;
    font-size: 0.75rem;
}

/* Glassmorphic Edit Report Modal Overlay */
.edit-report-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 6, 12, 0.7);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.edit-report-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.edit-report-modal-container {
    width: 90%;
    max-width: 650px;
    background: rgba(10, 15, 30, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 24px;
}

.edit-report-modal-overlay.active .edit-report-modal-container {
    transform: scale(1) translateY(0);
}

/* Premium Search Field Clear Button */
.clear-search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    z-index: 10;
    outline: none;
    padding: 0;
}

.clear-search-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fca5a5;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
    transform: translateY(-50%) scale(1.1);
}

/* Dynamic Batch Color-Coding Classes (Blue, Green, Red, Yellow) */
.profile-card.batch-color-1 {
    border-color: rgba(59, 130, 246, 0.45) !important;
}
.profile-card.batch-color-1:hover {
    border-color: #3b82f6 !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), 0 0 20px rgba(59, 130, 246, 0.25) !important;
}

.profile-card.batch-color-2 {
    border-color: rgba(16, 185, 129, 0.45) !important;
}
.profile-card.batch-color-2:hover {
    border-color: #10b981 !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), 0 0 20px rgba(16, 185, 129, 0.25) !important;
}

.profile-card.batch-color-3 {
    border-color: rgba(239, 68, 68, 0.45) !important;
}
.profile-card.batch-color-3:hover {
    border-color: #ef4444 !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), 0 0 20px rgba(239, 68, 68, 0.25) !important;
}

.profile-card.batch-color-0 {
    border-color: rgba(234, 179, 8, 0.45) !important;
}
.profile-card.batch-color-0:hover {
    border-color: #eab308 !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), 0 0 20px rgba(234, 179, 8, 0.25) !important;
}

.profile-card.batch-color-default {
    border-color: var(--border-color);
}

/* Badge Batch Color-Coding Classes */
.badge-batch-color-1 {
    background: rgba(59, 130, 246, 0.12) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
}
.badge-batch-color-2 {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
}
.badge-batch-color-3 {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
}
.badge-batch-color-0 {
    background: rgba(234, 179, 8, 0.12) !important;
    color: #facc15 !important;
    border: 1px solid rgba(234, 179, 8, 0.3) !important;
}
.badge-batch-color-default {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-secondary) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* Highlight for the most recent completed batch */
.profile-card.most-recent-batch {
    border-width: 8px !important;
}
