/* Servagya-Payroll "Modern" look.  The geometry of every screen stays exactly as in FoxPro; this sheet
 * only changes colours, depth and motion.  Switch back with the "Classic" button in the status bar
 * (body without .theme-modern = the Windows-classic FoxPro look of vfp.css). */

body.theme-modern {
  --face: #e9edf3;
  --hi: #ffffff;
  --light: #dfe5ee;
  --shadow: #9aa6b8;
  --dark: #5b6779;
  --title1: #0f3d7a;
  --title2: #1f7a8c;
  --menu-sel: #1f5fa8;
  --accent: #1f7a8c;
  --accent-2: #f0a020;
  --screen: #eef2f7;
}

/* ---------- screen, title, menu */
body.theme-modern .vfp-screen-title {
  height: 30px; line-height: 30px; padding: 0 12px; font: 600 10pt "Segoe UI", Tahoma, Arial, sans-serif; letter-spacing: .2px;
  background: linear-gradient(100deg, var(--title1) 0%, #164f8f 45%, var(--title2) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .15) inset, 0 2px 6px rgba(15, 61, 122, .35);
}
body.theme-modern .vfp-screen-title img { width: 18px; height: 18px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
body.theme-modern .vfp-menubar { height: 26px; background: linear-gradient(#ffffff, #e8edf4); border-bottom: 1px solid #c5cfdd; font: 9pt "Segoe UI", Tahoma, Arial, sans-serif; padding-left: 4px; }
body.theme-modern .vfp-pad { padding: 4px 11px; margin: 1px 1px; border-radius: 4px; transition: background-color .12s, color .12s; }
body.theme-modern .vfp-pad:hover { background: #dbe6f4; }
body.theme-modern .vfp-pad.open { background: var(--menu-sel); color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
body.theme-modern .vfp-popup {
  background: #fff; border: 1px solid #c3cddb; border-radius: 6px; padding: 4px; font: 9pt "Segoe UI", Tahoma, Arial, sans-serif;
  box-shadow: 0 10px 28px rgba(20, 40, 80, .22), 0 2px 6px rgba(20, 40, 80, .12);
  animation: vfp-pop .14s ease-out; transform-origin: top left;
}
body.theme-modern .vfp-bar { padding: 5px 26px 5px 22px; border-radius: 4px; transition: background-color .1s; }
body.theme-modern .vfp-bar.sel { background: linear-gradient(90deg, var(--menu-sel), #2b73c2); color: #fff; }
body.theme-modern .vfp-bar.sub::after { top: 6px; }

/* ---------- desktop */
body.theme-modern .vfp-desktop {
  background:
    radial-gradient(1200px 600px at 85% 110%, rgba(31, 122, 140, .12), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(15, 61, 122, .10), transparent 55%),
    var(--screen);
}

/* ---------- windows */
body.theme-modern .vfp-window {
  border: 1px solid #8fa0b8; border-radius: 8px 8px 4px 4px; padding: 0; overflow: hidden;
  box-shadow: 0 18px 45px rgba(15, 35, 70, .28), 0 3px 10px rgba(15, 35, 70, .18);
}
body.theme-modern .vfp-window.inactive { box-shadow: 0 6px 18px rgba(15, 35, 70, .18); filter: saturate(.85); }
body.theme-modern .vfp-titlebar {
  height: 26px; padding: 0 6px 0 8px; gap: 6px; font: 600 9pt "Segoe UI", Tahoma, Arial, sans-serif;
  background: linear-gradient(100deg, var(--title1), var(--title2));
}
body.theme-modern .vfp-window.inactive .vfp-titlebar { background: linear-gradient(100deg, #7d8ba0, #9fb0c4); color: #eef2f7; }
body.theme-modern .vfp-tb { width: 20px; height: 18px; border: none; border-radius: 4px; background: rgba(255,255,255,.18); transition: background-color .12s; }
body.theme-modern .vfp-tb:hover { background: rgba(255,255,255,.35); }
body.theme-modern .vfp-tb-close:hover:not(:disabled) { background: #e04848; }
body.theme-modern .vfp-tb-close::before { color: #fff; top: -1px; }
body.theme-modern .vfp-tb-min::before, body.theme-modern .vfp-tb-max::before { border-color: #fff; background-color: transparent; }
body.theme-modern .vfp-tb-min::before { background: #fff; }

/* opening / closing a screen */
@keyframes vfp-in { from { opacity: 0; transform: translateY(10px) scale(.975); } to { opacity: 1; transform: none; } }
@keyframes vfp-out { to { opacity: 0; transform: translateY(6px) scale(.985); } }
@keyframes vfp-pop { from { opacity: 0; transform: scale(.96) translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes vfp-fade { from { opacity: 0; } to { opacity: 1; } }
body.theme-modern .vfp-window.vfp-anim-in { animation: vfp-in .2s cubic-bezier(.2, .8, .2, 1); }
body.theme-modern .vfp-window.vfp-anim-out { animation: vfp-out .12s ease-in forwards; }
body.theme-modern .vfp-modal-mask { background: rgba(20, 35, 60, .12); animation: vfp-fade .18s ease-out; }

/* ---------- controls */
body.theme-modern .vfp-button {
  border: 1px solid #a9b6c8; border-radius: 4px; box-shadow: 0 1px 0 #fff inset, 0 1px 2px rgba(20, 40, 80, .12);
  background: linear-gradient(#ffffff, #e6ebf2); transition: background .12s, box-shadow .12s, transform .06s;
}
body.theme-modern .vfp-button:hover:not(:disabled) { background: linear-gradient(#ffffff, #dbe7f5); border-color: #7f9cc2; box-shadow: 0 1px 0 #fff inset, 0 2px 6px rgba(31, 95, 168, .18); }
body.theme-modern .vfp-button:active:not(:disabled) { transform: translateY(1px); background: linear-gradient(#dfe7f2, #eef2f7); box-shadow: 0 1px 2px rgba(0,0,0,.15) inset; padding: 0 2px; }
body.theme-modern .vfp-button:focus-visible { outline: 2px solid rgba(31, 122, 140, .55); outline-offset: 1px; }
body.theme-modern .vfp-button.vfp-invisible { background: transparent; border: none; box-shadow: none; }
body.theme-modern .vfp-commandgroup, body.theme-modern .vfp-optiongroup { border: 1px solid #c3cddb; border-radius: 6px; }
body.theme-modern .vfp-textbox, body.theme-modern .vfp-spinner, body.theme-modern .vfp-combobox, body.theme-modern .vfp-editbox {
  border: 1px solid #a9b6c8; border-radius: 3px; box-shadow: 0 1px 2px rgba(20, 40, 80, .08) inset; transition: border-color .12s, box-shadow .12s, background-color .12s;
}
body.theme-modern .vfp-textbox:focus, body.theme-modern .vfp-combobox:focus, body.theme-modern .vfp-editbox:focus, body.theme-modern .vfp-spinner:focus {
  background-color: #fffdf0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31, 122, 140, .18);
}
body.theme-modern .vfp-listbox, body.theme-modern .vfp-grid { border: 1px solid #a9b6c8; border-radius: 4px; }
body.theme-modern .vfp-list-row:hover:not(.sel) { background: #eef4fb; }
body.theme-modern .vfp-list-row.sel, body.theme-modern .vfp-grid tr.cur td { background: linear-gradient(90deg, #1f5fa8, #2b73c2); }
body.theme-modern .vfp-grid th { background: linear-gradient(#f7f9fc, #e3e9f1); border-color: #c8d1de; font-weight: 600; }
body.theme-modern .vfp-grid tbody tr:hover:not(.cur) td { background: #f2f7fc; }
body.theme-modern .vfp-tab { border-radius: 6px 6px 0 0; transition: background-color .12s; }
body.theme-modern .vfp-tab:not(.active):hover { background: #dfe8f3; }
body.theme-modern .vfp-tab.active { box-shadow: 0 -2px 0 var(--accent) inset; }

/* ---------- message box */
body.theme-modern .vfp-msg { animation: vfp-pop .16s ease-out; }
body.theme-modern .vfp-msg .vfp-client { background: #fff; padding: 18px 18px 12px; }
body.theme-modern .vfp-msg-body { font: 9.5pt "Segoe UI", Tahoma, Arial, sans-serif; }
body.theme-modern .vfp-msg-icon { box-shadow: 0 2px 6px rgba(0,0,0,.2); }

/* ---------- "Please Wait" with a spinner and progress */
body.theme-modern .vfp-pwait { border-radius: 10px; animation: vfp-pop .16s ease-out; }
body.theme-modern .vfp-pwait .vfp-titlebar { display: none; }
body.theme-modern .vfp-pwait .vfp-client {
  background: linear-gradient(135deg, #0f3d7a, #1f7a8c) !important; color: #fff !important; border-radius: 10px;
  font: 600 10.5pt "Segoe UI", Tahoma, Arial, sans-serif !important; font-style: normal !important;
  display: flex !important; flex-direction: column; gap: 10px; padding: 16px 18px !important; height: auto !important; min-height: 96px;
}
.vfp-spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; animation: vfp-rot .8s linear infinite; }
@keyframes vfp-rot { to { transform: rotate(360deg); } }
.vfp-prog { width: 100%; height: 6px; border-radius: 3px; background: rgba(255,255,255,.2); overflow: hidden; }
.vfp-prog > i { display: block; height: 100%; background: var(--accent-2, #f0a020); border-radius: 3px; transition: width .2s; }

/* ---------- status bar */
.vfp-status { display: none; }
body.theme-modern .vfp-status, body .vfp-status.show {
  display: flex; align-items: center; gap: 14px; height: 24px; padding: 0 10px; font: 8.5pt "Segoe UI", Tahoma, Arial, sans-serif;
  background: linear-gradient(#f7f9fc, #e6ebf2); border-top: 1px solid #c5cfdd; color: #33415a;
}
.vfp-status .dot { width: 8px; height: 8px; border-radius: 50%; background: #2fa36b; box-shadow: 0 0 0 3px rgba(47,163,107,.18); }
.vfp-status .sp { flex: 1; }
.vfp-status button { font: 8.5pt "Segoe UI", Tahoma, Arial, sans-serif; border: 1px solid #b7c3d3; background: #fff; border-radius: 10px; padding: 1px 10px; cursor: pointer; }
.vfp-status button:hover { border-color: var(--accent, #1f7a8c); color: var(--accent, #1f7a8c); }

/* ---------- dashboard on the desktop (only when no screen is open over it) */
.vfp-dash { position: absolute; inset: 0; padding: 26px 30px; overflow: auto; font-family: "Segoe UI", Tahoma, Arial, sans-serif; color: #1d2a3f; animation: vfp-fade .3s ease-out; }
body:not(.theme-modern) .vfp-dash { display: none; }
.vfp-dash h1 { font-size: 19px; margin: 0 0 2px; font-weight: 650; color: #0f3d7a; }
.vfp-dash .sub { color: #5b6779; font-size: 12.5px; margin-bottom: 18px; }
.vfp-dash .cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.vfp-dash .card { background: #fff; border: 1px solid #d6dde8; border-radius: 10px; padding: 14px 16px; box-shadow: 0 2px 8px rgba(15, 35, 70, .06); animation: vfp-in .35s cubic-bezier(.2,.8,.2,1) both; }
.vfp-dash .card:nth-child(2) { animation-delay: .04s; } .vfp-dash .card:nth-child(3) { animation-delay: .08s; } .vfp-dash .card:nth-child(4) { animation-delay: .12s; } .vfp-dash .card:nth-child(5) { animation-delay: .16s; } .vfp-dash .card:nth-child(6) { animation-delay: .2s; }
.vfp-dash .card .k { font-size: 11.5px; color: #5b6779; text-transform: uppercase; letter-spacing: .4px; }
.vfp-dash .card .v { font-size: 22px; font-weight: 650; margin-top: 4px; font-variant-numeric: tabular-nums; }
.vfp-dash .card .v small { font-size: 12px; color: #5b6779; font-weight: 500; }
.vfp-dash .card.accent { border-top: 3px solid var(--accent, #1f7a8c); }
.vfp-dash .row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.vfp-dash .panel { background: #fff; border: 1px solid #d6dde8; border-radius: 10px; padding: 14px 16px; box-shadow: 0 2px 8px rgba(15, 35, 70, .06); }
.vfp-dash .panel h2 { font-size: 13px; margin: 0 0 12px; color: #33415a; font-weight: 650; }
.vfp-dash .bars { display: flex; align-items: flex-end; gap: 12px; height: 150px; }
.vfp-dash .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; color: #5b6779; }
.vfp-dash .bar i { display: block; width: 100%; max-width: 46px; border-radius: 6px 6px 2px 2px; background: linear-gradient(#2b73c2, #1f7a8c); transform-origin: bottom; animation: vfp-grow .6s cubic-bezier(.2,.8,.2,1) both; }
@keyframes vfp-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.vfp-dash .dept { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid #edf1f6; font-size: 12.5px; }
.vfp-dash .dept:last-child { border-bottom: none; }
.vfp-dash .dept b { font-variant-numeric: tabular-nums; }
.vfp-dash .hint { margin-top: 16px; font-size: 12px; color: #6b778a; }

/* ---------- small screens: the FoxPro screens keep their size and are scaled to fit */
@media (max-width: 900px) {
  .vfp-dash .row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-modern *, .vfp-dash * { animation: none !important; transition: none !important; }
}

/* ---------- company switcher */
.vfp-status #st-company { cursor: pointer; padding: 1px 8px; border-radius: 10px; border: 1px solid transparent; }
.vfp-status #st-company:hover { border-color: #b7c3d3; background: #fff; }
.vfp-status #st-company::after { content: " \25BE"; color: #7a879a; }
.vfp-switch-mask { position: fixed; inset: 0; z-index: 9800; background: rgba(15, 30, 55, .28); animation: vfp-fade .15s ease-out; display: flex; align-items: flex-start; justify-content: center; padding-top: 9vh; }
.vfp-switch { width: min(560px, 94vw); background: #fff; border-radius: 12px; box-shadow: 0 24px 60px rgba(10, 25, 50, .35); overflow: hidden; animation: vfp-pop .16s ease-out; font-family: "Segoe UI", Tahoma, Arial, sans-serif; }
.vfp-switch .hd { padding: 14px 16px 10px; background: linear-gradient(100deg, #0f3d7a, #1f7a8c); color: #fff; }
.vfp-switch .hd b { font-size: 14px; } .vfp-switch .hd small { display: block; opacity: .8; font-size: 11.5px; margin-top: 2px; }
.vfp-switch input { width: 100%; box-sizing: border-box; margin-top: 10px; padding: 9px 12px; border: none; border-radius: 8px; font: 10.5pt "Segoe UI", Tahoma, Arial, sans-serif; outline: none; }
.vfp-switch ul { list-style: none; margin: 0; padding: 6px; max-height: 52vh; overflow: auto; }
.vfp-switch li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 12.5px; color: #1d2a3f; }
.vfp-switch li .c { font: 600 11px Consolas, monospace; color: #5b6779; min-width: 70px; }
.vfp-switch li .n { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.vfp-switch li .t { font-size: 10.5px; padding: 1px 8px; border-radius: 10px; background: #eef2f7; color: #5b6779; }
.vfp-switch li .t.cur { background: #1f7a8c; color: #fff; } .vfp-switch li .t.rec { background: #fdf0d6; color: #8a5a00; }
.vfp-switch li.sel, .vfp-switch li:hover { background: #e8f0fa; }
.vfp-switch li.nodata { opacity: .55; }
.vfp-switch .ft { padding: 8px 14px; font-size: 11px; color: #6b778a; border-top: 1px solid #edf1f6; display: flex; justify-content: space-between; }

.vfp-status button.sw { background: linear-gradient(100deg, #0f3d7a, #1f7a8c); color: #fff; border: none; font-weight: 600; padding: 2px 12px; box-shadow: 0 1px 3px rgba(15, 61, 122, .3); }
.vfp-status button.sw:hover { filter: brightness(1.12); color: #fff; }
.vfp-status .save { font-size: 8pt; color: #2f7d55; }
.vfp-status .save.busy { color: #b07200; }
.vfp-dash .switch { float: right; margin-top: 2px; font: 600 12px "Segoe UI", Tahoma, Arial, sans-serif; border: none; border-radius: 8px; padding: 8px 14px; color: #fff; cursor: pointer;
  background: linear-gradient(100deg, #0f3d7a, #1f7a8c); box-shadow: 0 3px 10px rgba(15, 61, 122, .3); }
.vfp-dash .switch:hover { filter: brightness(1.1); }

.vfp-status .brand { color: #5b6779; font-size: 8pt; }
@media (max-width: 900px) { .vfp-status .brand { display: none; } }

/* ---------- brand watermark on the desktop (behind the dashboard and every screen) */
.vfp-desktop::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: url("img/brand_logo.png") no-repeat center 46% / min(46vmin, 460px) auto;
  opacity: .07;
}
.vfp-desktop::after {
  content: "WEB LOXIC TECHNOLOGY PRIVATE LIMITED"; position: absolute; left: 0; right: 0; top: calc(46% + min(23vmin, 230px) + 18px);
  text-align: center; pointer-events: none; z-index: 0; opacity: .08;
  font: 700 clamp(14px, 2.2vw, 26px) "Segoe UI", Tahoma, Arial, sans-serif; letter-spacing: 3px; color: #0f3d7a;
}
.vfp-dash, .vfp-layer { z-index: 1; }
body:not(.theme-modern) .vfp-desktop::before { opacity: .05; }
body:not(.theme-modern) .vfp-desktop::after { opacity: .06; color: #000; }
