/* ==================== JEEVAN KOSH FORTUNE - STYLES ==================== */
:root {
  --primary: #1E293B;
  --secondary: hsl(221, 91%, 49%);
  --accent: #F59E0B;
  --success: #10B981; 
  --danger: #EF4444;
  --bg: #F1F5F9;
  --card-bg: rgba(255,255,255,0.95); 
  --glass-bg: rgba(255,255,255,0.85); 
  --text-dark: #334155; 
  --sidebar-width-collapsed: 78px;
  --sidebar-width-expanded: 260px;
  --header-height: 70px; 
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark { --bg: #0f172a; --card-bg: rgba(30,41,59,0.95); --glass-bg: rgba(30,41,59,0.85); --text-dark: #f8fafc; }
body.dark .text-dark { color: #f8fafc !important; }
body.dark .text-muted { color: #94a3b8 !important; }
body.dark .bg-light { background-color: #1e293b !important; border-color: #334155 !important; }
body.dark .table-light { background-color: #334155 !important; color: #f8fafc !important; border-color: #475569 !important; }
body.dark .table-hover tbody tr:hover { background-color: rgba(255,255,255,0.05) !important; color: #fff; }
body.dark td, body.dark th { border-color: #334155 !important; color: #f8fafc !important; }
body.dark .modal-content { background-color: #0f172a !important; color: #f8fafc !important; border: 1px solid #334155; }
body.dark .card { border-color: #334155 !important; }
body.dark .bg-white { background-color: #1e293b !important; }
body.dark input, body.dark select, body.dark textarea { background-color: #0f172a !important; color: #fff !important; border-color: #475569 !important; }
body.dark ::placeholder { color: #64748b !important; opacity: 1; }
body.dark .card-header { background-color: #1e293b !important; color: #f8fafc !important; border-color: #334155 !important; }
body.dark .card-footer { background-color: #1e293b !important; color: #f8fafc !important; border-color: #334155 !important; }
body.dark .modal-header, body.dark .modal-footer { border-color: #334155 !important; }
body.dark .accordion-button { background-color: #1e293b !important; color: #f8fafc !important; }
body.dark .accordion-button:not(.collapsed) { color: #f8fafc !important; box-shadow: none !important; }
body.dark .accordion-button::after { filter: invert(1) brightness(2); }
body.dark .accordion-body { background-color: #0f172a !important; color: #f8fafc !important; }
body.dark .dropdown-menu { background-color: #1e293b !important; color: #f8fafc !important; border-color: #334155 !important; }
body.dark .dropdown-item { color: #f8fafc !important; }
body.dark .dropdown-item:hover { background-color: #334155 !important; }
body.dark .btn-outline-secondary { color: #cbd5e1 !important; border-color: #475569 !important; }
body.dark .btn-outline-secondary:hover { background-color: #334155 !important; color: #fff !important; }
body.dark .btn-outline-info, body.dark .btn-outline-primary, body.dark .btn-outline-danger { border-color: currentColor !important; }
body.dark .btn-close { filter: invert(1) brightness(2); }
body.dark .list-group-item { background-color: #1e293b !important; color: #f8fafc !important; border-color: #334155 !important; }
body.dark .alert-light, body.dark .bg-section-1, body.dark .bg-section-2, body.dark .bg-section-3 { background-color: #1e293b !important; color: #f8fafc !important; }
body.dark .badge.bg-light { background-color: #334155 !important; color: #f8fafc !important; }
body.dark .form-section-head { color: var(--secondary) !important; border-color: var(--secondary) !important; }
body.dark .glass { border-color: rgba(255,255,255,0.08); }
body.dark .compact-form label { color: #94a3b8 !important; }
body.dark ::-webkit-scrollbar-thumb { background: #334155; }
body.dark ::-webkit-scrollbar-thumb:hover { background: #475569; }
body.dark .badge.bg-white { background-color: #1e293b !important; color: #f8fafc !important; }
body.dark .login-card { background: rgba(15,23,42,0.9) !important; }
body.dark .table > :not(caption) > * > * { background-color: transparent; }
body.dark #notificationDropdown { background-color: #1e293b !important; color: #f8fafc !important; }
body.dark #notificationDropdown .border-bottom { border-color: #334155 !important; }

/* ==================== MODERNIZED OKLCH THEME PRESETS ====================
   Updated to perceptually balanced OKLCH color space. Supports both class & data attributes. */
body.theme-indigo, [data-theme="indigo"]   { --primary: oklch(0.32 0.08 280); --secondary: oklch(0.48 0.12 280); --accent: oklch(0.76 0.13 70); }
body.theme-emerald, [data-theme="emerald"]  { --primary: oklch(0.33 0.07 155); --secondary: oklch(0.58 0.11 155); --accent: oklch(0.76 0.13 70); }
body.theme-sapphire, [data-theme="sapphire"] { --primary: oklch(0.33 0.06 240); --secondary: oklch(0.55 0.07 235); --accent: oklch(0.73 0.14 65); }
body.theme-amber, [data-theme="amber"]    { --primary: oklch(0.40 0.08 55);  --secondary: oklch(0.62 0.11 55);  --accent: oklch(0.48 0.09 230); }
body.theme-rose, [data-theme="rose"]     { --primary: oklch(0.34 0.09 15);  --secondary: oklch(0.56 0.09 15);  --accent: oklch(0.66 0.08 230); }
body.theme-graphite, [data-theme="graphite"] { --primary: oklch(0.30 0.03 260); --secondary: oklch(0.52 0.03 240); --accent: oklch(0.78 0.11 180); }
body.theme-plum, [data-theme="plum"]     { --primary: oklch(0.28 0.09 320); --secondary: oklch(0.48 0.12 315); --accent: oklch(0.76 0.13 70); }
body.theme-olive, [data-theme="olive"]    { --primary: oklch(0.38 0.04 130); --secondary: oklch(0.52 0.04 125); --accent: oklch(0.62 0.11 55); }

.theme-swatch { width: 34px; height: 34px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: all 0.15s; display: inline-block; box-shadow: 0 1px 4px rgba(0,0,0,0.15); }
.theme-swatch:hover { transform: scale(1.12); }
.theme-swatch.active { border-color: #fff; box-shadow: 0 0 0 2px var(--secondary); }
#themeDropdown { width: 220px; }

* { box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: var(--bg); margin: 0; color: var(--text-dark); transition: background 0.3s, color 0.3s; overflow-x: hidden; }

.glass { background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,0.4); border-radius: 20px; }
.card-lift { transition: transform 0.2s, box-shadow 0.2s; border-radius: 18px; background: var(--card-bg); border: none; box-shadow: 0 10px 25px -8px rgba(0,0,0,0.06); padding: 1.25rem; }
.card-lift:hover { transform: translateY(-5px); box-shadow: 0 20px 30px -12px rgba(0,0,0,0.15); }

.sidebar { 
  width: var(--sidebar-width-collapsed); 
  background: var(--primary); color: white; 
  position: fixed; top: 0; left: 0; height: 100vh; 
  overflow-x: hidden; z-index: 1050; 
  transition: var(--transition); 
  white-space: nowrap; 
  box-shadow: 2px 0 10px rgba(0,0,0,0.1); 
}
.sidebar:hover { 
  width: var(--sidebar-width-expanded); 
  box-shadow: 5px 0 25px rgba(0,0,0,0.25); 
}
.sidebar .nav-text, .sidebar .brand-text { 
  opacity: 0; transition: opacity 0.2s; display: inline-block; vertical-align: middle; 
}
.sidebar:hover .nav-text, .sidebar:hover .brand-text { 
  opacity: 1; transition-delay: 0.1s; 
}

.sidebar .nav-link { 
  color: rgba(255,255,255,0.75); border-radius: 12px; margin: 6px 12px; padding: 12px 14px; 
  transition: 0.2s; font-weight: 500; display: flex; align-items: center; cursor: pointer; 
  position: relative; overflow: hidden;
}
.sidebar .nav-link::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 3px; 
  background: var(--accent); transition: width 0.3s ease;
}
.sidebar .nav-link:hover::after, .sidebar .nav-link.active::after { width: 100%; }
.sidebar .nav-link i { font-size: 1.25rem; min-width: 30px; text-align: center; margin-right: 12px; z-index: 1; }
.sidebar .nav-link:hover, .sidebar .nav-link.active { background: var(--secondary); color: white; transform: translateX(4px); }

.brand-logo { max-height: 38px; max-width: 40px; margin-right: 12px; object-fit: contain; flex-shrink: 0; }

.main-content { margin-left: var(--sidebar-width-collapsed); padding: 24px; min-height: 100vh; transition: margin-left 0.3s; }
.top-header { background: var(--glass-bg); backdrop-filter: blur(12px); height: var(--header-height); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-radius: 24px; margin-bottom: 24px; position: sticky; top: 16px; z-index: 100; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }

@media (max-width: 992px) { 
  .sidebar { width: var(--sidebar-width-expanded); transform: translateX(-100%); } 
  .sidebar.mobile-open { transform: translateX(0); } 
  .sidebar .nav-text, .sidebar .brand-text { opacity: 1; }
  .main-content { margin-left: 0; } 
}

.floating-btn { position: fixed; bottom: 24px; right: 24px; z-index: 999; background: var(--secondary); color: white; border-radius: 50px; padding: 12px 24px; box-shadow: 0 10px 20px rgba(13, 148, 136, 0.4); border: none; font-weight: 600; }
.toast-container { z-index: 9999; }
.chart-container { position: relative; height: 280px; width: 100%; }

.fade-in { animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modalPop { 0% { opacity: 0; transform: scale(0.95) translateY(-10px); } 100% { opacity: 1; transform: scale(1) translateY(0); } }
.modal-content { border-radius: 20px; overflow: hidden; animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes rowFadeInUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.table-animated tbody tr { animation: rowFadeInUp 0.35s ease-out forwards; opacity: 0; }
.table-animated tbody tr:nth-child(1) { animation-delay: 0.05s; }
.table-animated tbody tr:nth-child(2) { animation-delay: 0.08s; }
.table-animated tbody tr:nth-child(3) { animation-delay: 0.11s; }
.table-animated tbody tr:nth-child(4) { animation-delay: 0.14s; }
.table-animated tbody tr:nth-child(5) { animation-delay: 0.17s; }
.table-animated tbody tr:nth-child(n+6) { animation-delay: 0.20s; }

@keyframes floatLogo {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); filter: drop-shadow(0 10px 15px rgba(0,0,0,0.2)); }
    100% { transform: translateY(0px); }
}
.animated-logo { animation: floatLogo 3.5s ease-in-out infinite; }

/* ==================== LOGIN CONTAINER ==================== */
.login-container { 
    min-height: 100vh; 
    width: 100%;
    position: relative;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin: 0 auto;
    padding: 0 auto;
}

.login-card { 
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px); 
    border: 1px solid rgba(255,255,255,0.2); 
    position: relative;
    z-index: 10;
}

/* ==================== ANIMATED BACKGROUND CIRCLES ==================== */
#container {
    background: #00adef;
    background: -moz-linear-gradient(-45deg, #00adef 0%, #0076e5 100%);
    background: -webkit-linear-gradient(-45deg, #00adef 0%, #0076e5 100%);
    background: linear-gradient(135deg, #00adef 0%, #0076e5 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00adef', endColorstr='#0076e5',GradientType=1 );
    position: fixed; /* Fixes background to window */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    z-index: -1; /* Puts background firmly behind all content */
    overflow: hidden;
}

#container-inside {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 0;
}

/* Pulsing Circle Animations */
#circle-small, 
#circle-medium, 
#circle-large, 
#circle-xlarge, 
#circle-xxlarge {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    pointer-events: none; /* Prevents circles from blocking mouse clicks on portal */
    -webkit-animation: circle-small-scale 3s ease-in-out infinite alternate;
    animation: circle-small-scale 3s ease-in-out infinite alternate;
    animation-timing-function: cubic-bezier(0.6, 0, 0.4, 1);
}

#circle-small {
    animation-delay: 0s;
    top: 200px;
    left: -150px;
    width: 300px;
    height: 300px;
    opacity: 0.4;
}

#circle-medium {
    animation-delay: 0.3s;
    top: 50px;
    left: -300px;
    width: 600px;
    height: 600px;
    opacity: 0.3;
}

#circle-large {
    animation-delay: 0.6s;
    top: -100px;
    left: -450px;
    width: 900px;
    height: 900px;
    opacity: 0.2;
}

#circle-xlarge {
    animation-delay: 0.9s;
    top: -250px;
    left: -600px;
    width: 1200px;
    height: 1200px;
    opacity: 0.1;
}

#circle-xxlarge {
    animation-delay: 1.2s;
    top: -400px;
    left: -750px;
    width: 1500px;
    height: 1500px;
    opacity: 0.05;
}

@-webkit-keyframes circle-small-scale {
    0% {
        -webkit-transform: scale(1);
    }
    100% {
        -webkit-transform: scale(1.1);
    }
}

@keyframes circle-small-scale {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

/* ==================== GENERAL UI UTILITIES ==================== */
.hidden { display: none !important; }
.badge-editable { cursor: pointer; transition: all 0.2s; }
.badge-editable:hover { transform: scale(1.05); box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.filter-active { background: var(--secondary) !important; color: white !important; border-color: var(--secondary) !important; }

th.sortable { cursor: pointer; user-select: none; position: relative; padding-right: 20px !important; }
th.sortable i { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); font-size: 0.7rem; color: #94a3b8; }
th.sortable.asc i.fa-sort-up { color: var(--secondary); }
th.sortable.desc i.fa-sort-down { color: var(--secondary); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.compact-form label { font-size: 0.7rem; margin-bottom: 2px; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.compact-form .form-control, .compact-form .form-select { font-size: 0.8rem; padding: 3px 8px; border-radius: 6px; }
.compact-form .form-control-sm { font-size: 0.75rem; padding: 2px 6px; }
.form-section-head { font-size: 0.75rem; font-weight: 700; color: var(--secondary); border-bottom: 1px solid var(--secondary); padding-bottom: 3px; margin-bottom: 8px; margin-top: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.bg-section-1 { background-color: #f8fafc; border-radius: 8px; padding: 10px; }
.bg-section-2 { background-color: #f0fdfa; border-radius: 8px; padding: 10px; }
.bg-section-3 { background-color: #fffbeb; border-radius: 8px; padding: 10px; }

.cal-cell { height: 110px; vertical-align: top; padding: 6px; position: relative; }
.cal-day-num { position: absolute; top: 4px; right: 6px; font-weight: 700; font-size: 0.8rem; color: #94a3b8; }
.cal-entry { background-color: #F59E0B; color: #fff; padding: 3px 6px; border-radius: 4px; font-size: 0.7rem; margin-bottom: 4px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.cal-entry:hover { transform: scale(1.02); filter: brightness(1.1); }
body.dark .cal-day-num { color: #cbd5e1; }

.status-received { background-color: #d1fae5; color: #065f46; }
.status-pending { background-color: #fef3c7; color: #92400e; }
.status-paid { background-color: #d1fae5; color: #065f46; }
.status-unpaid { background-color: #fee2e2; color: #991b1b; }

.report-card {
  transition: transform 0.2s, box-shadow 0.2s;
  border-radius: 16px;
  background: var(--card-bg);
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  padding: 1.5rem 1.25rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.report-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}
.report-card .report-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 1.5rem;
  color: var(--secondary);
  flex-shrink: 0;
}
.report-card h6 {
  font-weight: 700;
  margin-bottom: 14px;
  font-size: 0.95rem;
  color: var(--text-dark);
}
.report-card .btn-group {
  width: 100%;
}
.report-card .btn-group .btn {
  flex: 1;
  font-size: 0.75rem;
  padding: 6px 4px;
}
body.dark .report-card .report-icon {
  background: #1e293b;
}

.claim-intimated { background-color: #fef3c7; color: #92400e; }
.claim-surveyor { background-color: #bfdbfe; color: #1e40af; }
.claim-repair { background-color: #e9d5ff; color: #6b21a8; }
.claim-documents { background-color: #dbeafe; color: #1e40af; }
.claim-settlement { background-color: #d1fae5; color: #065f46; }
.claim-payment { background-color: #a7f3d0; color: #065f46; }
.claim-settled { background-color: #d1fae5; color: #065f46; }
.claim-rejected { background-color: #fee2e2; color: #991b1b; }
.claim-withdrawn { background-color: #f3f4f6; color: #4b5563; }

.claim-step-item {
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 3px solid #e5e7eb;
  font-size: 0.75rem;
}
.claim-step-item:hover { background: var(--bg); }
.claim-step-item.active { border-left-color: var(--secondary); background: #f0fdfa; }
.claim-step-item.completed { border-left-color: var(--success); background: #d1fae5; }
.claim-step-item .step-num { 
  width: 18px; height: 18px; border-radius: 50%; 
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.55rem;
  background: #e5e7eb; color: #6b7280;
  margin-right: 6px;
}
.claim-step-item.active .step-num { background: var(--secondary); color: white; }
.claim-step-item.completed .step-num { background: var(--success); color: white; }

.claim-stage-collapse .card-header {
  padding: 6px 12px;
  cursor: pointer;
  background: #f8fafc;
}
.claim-stage-collapse .card-header:hover { background: #f1f5f9; }
.claim-stage-collapse .card-body { padding: 8px 12px; }

.field-required { color: var(--danger); font-weight: 700; margin-left: 2px; }
.field-error { border-color: var(--danger) !important; background-color: #fef2f2 !important; }
.field-error:focus { border-color: var(--danger) !important; box-shadow: 0 0 0 0.2rem rgba(239, 68, 68, 0.25) !important; }

.claim-indicator {
  display: inline-block;
  background: #EF4444;
  color: white;
  font-size: 0.5rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  line-height: 1.4;
  margin-left: 4px;
  cursor: pointer;
  vertical-align: top;
  min-width: 16px;
  text-align: center;
  transition: all 0.2s;
}
.claim-indicator:hover {
  transform: scale(1.15);
  background: #dc2626;
}
body.dark .claim-indicator {
  background: #EF4444;
}

/* User management modal styles */
.user-modal .form-label {
  font-weight: 600;
  color: #475569;
}
.user-modal .form-control, .user-modal .form-select {
  border-radius: 8px;
  padding: 8px 12px;
}
.user-modal .modal-header {
  border-bottom: 2px solid var(--secondary);
}
.user-role-badge {
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 12px;
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.loading-overlay .spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #fff;
  border-top-color: var(--secondary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}