/*
 * Prishiv "soft light" theme: cool grey canvas, floating rounded panels, airy cards with
 * soft shadows, pill navigation and a bright blue gradient accent. Every page loads this file,
 * so the whole look of the dashboard and the customer portal is adjusted here.
 */
:root {
  --canvas: #E9ECF1;
  --panel: #F6F7F9;
  --card-top: #FFFFFF;
  --card-bottom: #FAFBFC;
  --line: #E7EAEF;
  --ink: #1B1F27;
  --muted: #6B7385;
  --blue-1: #5B9BFF;
  --blue-2: #2F6FEB;
  --shadow-soft: 0 1px 0 rgba(255,255,255,.95) inset, 0 12px 32px -14px rgba(20,32,60,.16), 0 1px 3px rgba(20,32,60,.05);
  --shadow-raised: 0 1px 0 rgba(255,255,255,1) inset, 0 6px 16px -6px rgba(20,32,60,.18), 0 1px 2px rgba(20,32,60,.06);
}

body { font-family: 'Inter', sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3, .font-display { font-family: 'Plus Jakarta Sans', 'Inter', sans-serif; letter-spacing: -.01em; }
.font-display.font-bold, h1.font-bold, h2.font-bold { font-weight: 650; }

/* ---- Panels and cards ---- */
.soft-panel { background: color-mix(in srgb, var(--panel) 92%, transparent); border: 1px solid rgba(255,255,255,.85); box-shadow: var(--shadow-soft); backdrop-filter: blur(14px); }
.adm-main .bg-white, .soft-main .bg-white {
  background: linear-gradient(180deg, var(--card-top), var(--card-bottom));
  border-color: rgba(255,255,255,.9) !important;
  box-shadow: var(--shadow-soft);
}
.adm-main .rounded-2xl, .soft-main .rounded-2xl { border-radius: 1.5rem; }
.adm-main .rounded-xl, .soft-main .rounded-xl { border-radius: 1rem; }
/* inner tiles (bg-paper) read as light wells inside a card */
.adm-main .bg-paper, .soft-main .bg-paper { background: #F3F5F8; }
.adm-main .border-concrete, .soft-main .border-concrete, .adm-main .divide-concrete > * + *, .soft-main .divide-concrete > * + * { border-color: #EEF0F4 !important; }

/* tables: quiet headers, airy rows */
.adm-main table thead, .soft-main table thead { color: #8A92A3; }
.adm-main tbody tr:hover, .soft-main tbody tr:hover { background: #F5F8FF !important; }

/* ---- Buttons ---- */
.bg-cobalt { background-image: linear-gradient(180deg, var(--blue-1), var(--blue-2)); box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 8px 18px -8px rgba(47,111,235,.65); }
.bg-cobalt:hover, .hover\:bg-cobaltdark:hover { background-image: linear-gradient(180deg, #4C8DFB, #2463E0); }
.bg-emerald-700 { background-image: linear-gradient(180deg, #34D07B, #16A35A); box-shadow: 0 8px 18px -8px rgba(22,163,90,.6); }
/* white pill buttons get the raised look */
.adm-main a.bg-white.rounded-full, .adm-main button.bg-white, .soft-main a.bg-white.rounded-full, .soft-main button.bg-white,
.adm-main a.bg-white.rounded-lg, .soft-raise { background: #fff; border-color: rgba(255,255,255,.9) !important; box-shadow: var(--shadow-raised); }

/* ---- Form fields ---- */
.field { background: #F7F8FA !important; border: 1px solid #E6E9EE !important; border-radius: .9rem !important; transition: background .15s, box-shadow .15s; }
.field:focus { background: #fff !important; border-color: var(--blue-2) !important; box-shadow: 0 0 0 4px rgba(47,111,235,.14) !important; }
.field:disabled { color: #8A92A3; }
/* Select boxes: one look everywhere — our own chevron with room to breathe (the browser's arrow differs on every device) */
select, select.field, select.field:focus, select.field:hover {
  -webkit-appearance: none; -moz-appearance: none; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%236B7385' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: right .85rem center !important; background-size: 1.05rem !important;
  padding-right: 2.5rem !important; font-weight: 500; color: #1B1F27; text-overflow: ellipsis;
}
select.field:hover:not(:focus) { border-color: #CDD5E3 !important; }
select.field:focus { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%232F6FEB' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E") !important; }
select[multiple], select[size] { background-image: none !important; padding-right: .95rem !important; }
select::-ms-expand { display: none; }
/* pill-shaped filters keep their pill shape */
.field.rounded-full, .field.\!rounded-full { border-radius: 999px !important; padding-left: 1.1rem !important; }

/* ---- Sidebar ---- */
.side-link { position: relative; }
.side-link.is-active { background: #fff; color: var(--ink); box-shadow: var(--shadow-raised); }
.side-link .side-ic { width: 2.25rem; height: 2.25rem; border-radius: 999px; display: grid; place-items: center; transition: background .15s, color .15s; }
.side-link.is-active .side-ic { background: linear-gradient(180deg, var(--blue-1), var(--blue-2)); color: #fff; box-shadow: 0 6px 14px -6px rgba(47,111,235,.7); }
.side-link:not(.is-active):hover { background: rgba(255,255,255,.65); }

/* round icon buttons (globe, bell...) */
.icon-btn { width: 2.75rem; height: 2.75rem; border-radius: 999px; display: grid; place-items: center; background: #fff; box-shadow: var(--shadow-raised); color: var(--muted); }
.icon-btn:hover { color: var(--blue-2); }

/* hero tile (outstanding / amount due) */
.hero-tile { background: linear-gradient(140deg, #6BA6FF 0%, #3B7BF2 55%, #2A63DA 100%); box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 18px 40px -18px rgba(47,111,235,.75); }

@media print { .soft-panel { box-shadow: none !important; backdrop-filter: none; } }

/* inactive sidebar icons sit in soft white circles, as in the reference design */
.side-link:not(.is-active) .side-ic { background: rgba(255,255,255,.75); box-shadow: 0 1px 0 #fff inset, 0 3px 8px -4px rgba(20,32,60,.18); }
.soft-main { padding-top: 1.75rem; }

/* ===================================================================================
 * Liquid glass (iOS-style): a soft colour wash behind everything, frosted translucent
 * panels with a bright top edge, and glass pills. Falls back to solid surfaces when the
 * device asks for reduced transparency or cannot blur.
 * =================================================================================== */
html body {
  background:
    radial-gradient(900px 600px at 8% -10%, rgba(91,155,255,.30), transparent 60%),
    radial-gradient(800px 600px at 105% 10%, rgba(254,175,1,.16), transparent 60%),
    radial-gradient(900px 700px at 70% 110%, rgba(167,139,250,.20), transparent 60%),
    radial-gradient(700px 500px at -10% 90%, rgba(45,212,191,.14), transparent 60%),
    #E9EDF4;
  background-attachment: fixed;
}
:root { --glass: rgba(255,255,255,.52); --glass-strong: rgba(255,255,255,.70); --glass-edge: rgba(255,255,255,.75);
  --glass-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 -1px 0 rgba(255,255,255,.25) inset, 0 18px 40px -20px rgba(30,45,90,.28), 0 2px 6px -2px rgba(30,45,90,.08); }

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .soft-panel, .adm-main .bg-white, .soft-main .bg-white, .icon-btn, .soft-raise,
  .adm-main a.bg-white.rounded-full, .adm-main button.bg-white, .soft-main a.bg-white.rounded-full, .soft-main button.bg-white {
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
  }
  .soft-panel { background: var(--glass) !important; border: 1px solid var(--glass-edge) !important; box-shadow: var(--glass-shadow) !important; }
  .adm-main .bg-white, .soft-main .bg-white {
    background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.56)) !important;
    border: 1px solid var(--glass-edge) !important; box-shadow: var(--glass-shadow) !important;
  }
  /* glossy top edge, like light catching the glass */
  .soft-panel, .adm-main .bg-white.rounded-2xl, .soft-main .bg-white.rounded-2xl { position: relative; }
  .soft-panel::before, .adm-main .bg-white.rounded-2xl::before, .soft-main .bg-white.rounded-2xl::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0) 38%);
    mix-blend-mode: soft-light;
  }
  .icon-btn, .soft-raise, .adm-main a.bg-white.rounded-full, .adm-main button.bg-white, .soft-main a.bg-white.rounded-full, .soft-main button.bg-white {
    background: rgba(255,255,255,.66) !important; border: 1px solid rgba(255,255,255,.85) !important;
  }
  .side-link.is-active { background: rgba(255,255,255,.82); }
  .side-link:not(.is-active):hover { background: rgba(255,255,255,.45); }
  .field { background: rgba(243,246,251,.78) !important; border-color: rgba(30,50,100,.12) !important; box-shadow: inset 0 1px 2px rgba(30,45,90,.06); }
  .field:focus { background: rgba(255,255,255,.92) !important; }
  .adm-main .bg-paper, .soft-main .bg-paper { background: rgba(243,245,250,.65); }
  /* the blue hero tile becomes tinted glass with a specular sheen */
  .hero-tile { background: linear-gradient(140deg, rgba(107,166,255,.95) 0%, rgba(59,123,242,.92) 55%, rgba(42,99,218,.95) 100%); position: relative; overflow: hidden; }
  .hero-tile::after { content: ""; position: absolute; inset: -40% -10% auto; height: 80%; background: radial-gradient(60% 60% at 30% 40%, rgba(255,255,255,.35), transparent 70%); pointer-events: none; }
  table thead tr { background: transparent; }
}

@media (prefers-reduced-transparency: reduce) {
  html body { background: #E9ECF1; }
  .soft-panel, .adm-main .bg-white, .soft-main .bg-white, .field, .icon-btn, .soft-raise { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  .soft-panel { background: #F6F7F9 !important; }
  .adm-main .bg-white, .soft-main .bg-white { background: #fff !important; }
}
@media print {
  html body { background: #fff !important; }
  .soft-panel::before, .adm-main .bg-white::before, .soft-main .bg-white::before, .hero-tile::after { display: none !important; }
  .adm-main .bg-white, .soft-main .bg-white { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: #fff !important; box-shadow: none !important; }
}
