/* Personal interface themes. The light theme intentionally inherits the current project UI. */
body.app-theme-light{
  color-scheme:light;
}

body.app-theme-dark{
  --bg:#081119;
  --surface:#111c25;
  --line:#2b3c49;
  --text:#e9f0f4;
  --muted:#91a1ad;
  --shadow:0 16px 38px rgba(0,0,0,.28);
  --primary:#56b6a5;
  color-scheme:dark;
  color:var(--text);
  background-color:#081119;
  background-image:
    repeating-linear-gradient(90deg,rgba(94,187,169,.045) 0 1px,transparent 1px 54px),
    repeating-linear-gradient(0deg,rgba(226,170,76,.035) 0 1px,transparent 1px 54px),
    linear-gradient(180deg,#071018 0%,#0d171f 46%,#081119 100%);
  background-attachment:fixed;
}
body.app-theme-dark.blueprint-background{
  background-color:#081119;
  background-image:
    linear-gradient(rgba(5,14,21,.86),rgba(8,17,25,.94)),
    url("technical-background.png");
  background-blend-mode:normal,luminosity;
  background-position:center;
  background-size:cover;
}
body.app-theme-dark .shell{background:rgba(4,10,15,.1)}
body.app-theme-dark .topbar{
  border-bottom:1px solid rgba(91,187,170,.26);
  background:linear-gradient(90deg,#081620,#102733 58%,#153b42);
  box-shadow:0 12px 34px rgba(0,0,0,.34);
}
body.app-theme-dark .brand{color:#f2f8f7}
body.app-theme-dark .user-badge{
  border:1px solid rgba(117,211,192,.16);
  background:rgba(111,205,186,.1);
  color:#d9f2ed;
}
body.app-theme-dark .top-search{
  border-color:rgba(135,210,196,.22);
  background:rgba(4,16,22,.44);
}
body.app-theme-dark .top-search input{
  border-color:transparent;
  background:rgba(7,20,27,.78)!important;
  color:#edf5f4!important;
  box-shadow:none;
}
body.app-theme-dark .top-search input::placeholder{color:#728894}
body.app-theme-dark .top-search button{background:rgba(100,201,181,.12)}
body.app-theme-dark .nav a{background:rgba(255,255,255,.045);color:#edf5f4}
body.app-theme-dark .nav a:hover{background:rgba(91,190,170,.17)}
body.app-theme-dark .page{color:var(--text)}
body.app-theme-dark .app-footer,
body.app-theme-dark .footer-author,
body.app-theme-dark .footer-version{color:#82939e}

body.app-theme-dark :is(
  .card,
  .menu-card,
  .hero,
  .admin-monitor,
  .stat-card,
  .system-metric,
  .table-card,
  .filter-card,
  .search-result-card,
  .network-search-card,
  .search-background-status,
  .profile-hero,
  .owner-access-panel
){
  border-color:rgba(105,139,154,.22);
  background:#111c25;
  color:var(--text);
  box-shadow:var(--shadow);
}
body.app-theme-dark :is(.hero,.admin-monitor,.network-search-card){
  background:
    linear-gradient(135deg,rgba(79,181,161,.075),transparent 38%),
    #111c25;
}
body.app-theme-dark .hero.card.menu-hero{
  border-color:rgba(88,189,169,.2);
  background:
    linear-gradient(128deg,rgba(75,179,159,.1),transparent 42%),
    linear-gradient(180deg,#12222b,#101b24);
  box-shadow:0 22px 62px rgba(0,0,0,.3);
}
body.app-theme-dark .menu-hero::after{
  background:linear-gradient(135deg,rgba(81,183,161,.12),rgba(225,173,85,.07),transparent 72%);
}
body.app-theme-dark :is(
  h1,h2,h3,h4,
  .section-head h1,
  .section-head h2,
  .card h1,
  .card h2,
  .card h3,
  .menu-card h2,
  .profile-hero h2,
  .admin-monitor-head h2
){color:#edf4f6;text-shadow:none}
body.app-theme-dark :is(
  .muted-text,
  .hero p,
  .menu-card p,
  .card p,
  .section-head p,
  .app-footer,
  .system-metric small
){color:#91a1ad}
body.app-theme-dark :is(.hero-kicker,.eyebrow,.search-result-type){
  border:1px solid rgba(88,189,169,.18);
  background:#142b31;
  color:#7bd1c0;
}
body.app-theme-dark .menu-icon{
  border:1px solid rgba(95,186,169,.2);
  background:#142931;
  color:#71cbb9;
}
body.app-theme-dark :is(.menu-stat,.system-metric){
  border-color:#293b48;
  background:#0e1922;
}
body.app-theme-dark :is(.menu-stat strong,.system-metric strong,.stat-card strong){color:#eaf3f4}
body.app-theme-dark .metric-bar{background:#233541}
body.app-theme-dark .metric-bar i{background:linear-gradient(90deg,#4da3b8,#5ac69f,#e0aa4b)}

body.app-theme-dark .page :is(input,select,textarea),
body.app-theme-dark :is(.modal-dialog,.workspace-modal-dialog,.screensaver-settings-dialog) :is(input,select,textarea){
  border-color:#304551;
  background:#0c1720!important;
  color:#e9f0f4!important;
  caret-color:#76d2bf;
}

body.app-theme-dark .workload-calendar-card,
body.app-theme-dark .workload-calendar-details{
  border-color:#2b3c49;
  background:#2b3c49;
  box-shadow:none;
}
body.app-theme-dark .workload-calendar-card,
body.app-theme-dark .workload-calendar-details section{
  background:#111c25;
  color:#dfe9ed;
}
body.app-theme-dark .workload-calendar-card.source{
  border-color:#315148;
  background:#10221f;
}
body.app-theme-dark .workload-calendar-card strong,
body.app-theme-dark .workload-calendar-details h2,
body.app-theme-dark .workload-calendar-details li strong,
body.app-theme-dark .workload-calendar-details p strong{
  color:#edf4f6;
}
body.app-theme-dark .workload-calendar-card :is(span,small),
body.app-theme-dark .workload-calendar-details :is(li,p){color:#91a1ad}
body.app-theme-dark .workload-calendar-day-list{color:#cbd9df!important}
body.app-theme-dark .workload-calendar-transfer,
body.app-theme-dark .workload-calendar-working{border-top-color:#293b48}
body.app-theme-dark .workload-calendar-status{
  background:#10221f;
  color:#a7cabc;
}
body.app-theme-dark .workload-calendar-status.is-preliminary{
  background:#292311;
  color:#d3c28c;
}
body.app-theme-dark .workload-calendar-legend{color:#a5b3bc}
body.app-theme-dark .workload-calendar-legend i{border-color:#40515d}
body.app-theme-dark .schedule-table .schedule-holiday{background:#342023!important;color:#efb4b4}
body.app-theme-dark .schedule-table .schedule-day-off{background:#18242d!important;color:#9cabb5}
body.app-theme-dark .schedule-table .schedule-short-day{background:#332d18!important;color:#e2cc84}
body.app-theme-dark .schedule-table .schedule-working-weekend{background:#172b3a!important;color:#9bc7e8}
body.app-theme-dark .page :is(input,textarea)::placeholder{color:#6f808c}
body.app-theme-dark .page :is(input,select,textarea):focus{
  border-color:#55b8a4;
  box-shadow:0 0 0 4px rgba(85,184,164,.13);
}
body.app-theme-dark .page input[type="checkbox"],
body.app-theme-dark .page input[type="radio"]{accent-color:#5dc6b0}
body.app-theme-dark .global-search-form .search-source-toggle,
body.app-theme-dark .global-search-form .search-source-toggle.is-secondary{
  border-color:rgba(105,139,154,.34);
  background:linear-gradient(180deg,#14232d,#101c25);
  color:#dce8ec;
  box-shadow:0 12px 30px rgba(0,0,0,.18);
}
body.app-theme-dark .global-search-form .search-source-toggle:hover{
  border-color:rgba(93,198,176,.5);
  box-shadow:0 16px 34px rgba(0,0,0,.24);
}
body.app-theme-dark .search-source-toggle strong{color:#e7f0f3}
body.app-theme-dark .search-source-toggle small{color:#91a1ad}
body.app-theme-dark .search-source-switch{
  background:#31444f;
  box-shadow:inset 0 0 0 1px rgba(151,177,189,.26);
}
body.app-theme-dark .search-source-switch::after{background:#eaf2f4}
body.app-theme-dark .form-grid label,
body.app-theme-dark .detail-grid span,
body.app-theme-dark .inline-filter-form label{color:#a8b7c0}

body.app-theme-dark .btn:not(.primary):not(.danger){
  border:1px solid #304653;
  background:#172630;
  color:#d8e5e9;
}
body.app-theme-dark .btn:not(.primary):not(.danger):hover{
  border-color:#4f8d87;
  background:#1c3138;
}
body.app-theme-dark .btn.primary{
  background:linear-gradient(180deg,#338f7d,#24705f);
  color:#fff;
  box-shadow:0 8px 20px rgba(29,111,92,.25);
}
body.app-theme-dark .btn.ghost{background:#14222c;color:#c9d7dd}

body.app-theme-dark :is(.table-wrap,.objects-table-wrap){
  border-color:#293b47;
  background:#0e1821;
}
body.app-theme-dark .data-table{
  border-color:#2b3d49;
  background:#101b24;
  color:#dce6ea;
}
body.app-theme-dark .data-table :is(th,td){border-color:#293b47;color:#dce6ea}
body.app-theme-dark .data-table thead th{
  background:#152731;
  color:#bcd0d7;
}
body.app-theme-dark .data-table tbody tr:nth-child(even) td{background:#0d1821}
body.app-theme-dark .data-table tbody tr:hover td{background:#172832}
body.app-theme-dark .data-table a{color:#78c9d4}
body.app-theme-dark :is(.empty-cell,.muted-cell){color:#788995}

body.app-theme-dark :is(
  .access-tile,
  .stats-access-tile,
  .settings-tab,
  .settings-section,
  .settings-card,
  .settings-table-head,
  .detail-panel,
  .profile-meta-row span,
  .owner-access-address
){
  border-color:#2c404c;
  background:#101c25;
  color:#cdd9de;
}
body.app-theme-dark .access-tile:has(input:checked),
body.app-theme-dark .settings-tab.is-active{
  border-color:#4e9b8e;
  background:#17302f;
  color:#d8f1eb;
}
body.app-theme-dark .settings-tabs{
  border-color:#2c404c;
  background:#101c25;
}
body.app-theme-dark .settings-meta > div{
  border:1px solid #2b3e49;
  background:#14212a;
  color:#aebdc6;
}
body.app-theme-dark .secret-field-toggle{
  border-color:#36505c;
  background:#172b35;
  color:#a9dcd2;
}
body.app-theme-dark .secret-field-toggle:hover{
  border-color:#4b897f;
  background:#1b343b;
}
body.app-theme-dark .ai-assistant-status.is-paused{
  border-color:#66542d;
  background:#2e2819;
  color:#e7cd83;
}
body.app-theme-dark :is(.background-picker-panel,.screensaver-settings-dialog,.workspace-modal-dialog,.modal-dialog){
  border-color:#30434f;
  background:#101b24;
  color:#e7eff2;
  box-shadow:0 30px 90px rgba(0,0,0,.52);
}
body.app-theme-dark :is(
  .background-picker-head strong,
  .background-option strong,
  .screensaver-settings-head h2,
  .settings-card-head h2
){color:#e9f1f3}
body.app-theme-dark :is(
  .background-option,
  .screensaver-settings-head,
  .screensaver-settings-foot,
  .screensaver-settings-section,
  .screensaver-section-option,
  .screensaver-object-list,
  .screensaver-object-row
){
  border-color:#2b3e49;
  background:#101c25;
  color:#d9e4e8;
}
body.app-theme-dark .screensaver-settings-scroll{background:#0c161e}
body.app-theme-dark .screensaver-section-option:has(input:checked){background:#17302f}
body.app-theme-dark .flash.success{border-color:#285f50;background:#132d27;color:#9bddc9}
body.app-theme-dark .flash.danger{border-color:#734147;background:#321c21;color:#f2aeb5}
body.app-theme-dark .flash.warning{border-color:#685528;background:#2e2818;color:#e8cf8c}
body.app-theme-dark .flash.info{border-color:#315d71;background:#142834;color:#abd9e7}
body.app-theme-dark .preview-banner{
  border-color:#6c5a2a;
  background:#2b271a;
  color:#ead9a4;
}
body.app-theme-dark .preview-banner strong{color:#f2d680}
body.app-theme-dark ::selection{background:#2c7d6d;color:#fff}
body.app-theme-dark *{scrollbar-color:#405967 #101a22}

/* Theme controls in employee profiles. */
.profile-theme-options{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
  min-width:0;
  margin:0;
  padding:10px;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(246,249,252,.72);
}
.profile-theme-options legend{
  padding:0 6px;
  color:var(--muted);
  font-size:10px;
  font-weight:850;
  text-transform:uppercase;
}
.profile-theme-option{
  position:relative;
  display:grid!important;
  grid-template-columns:62px minmax(0,1fr);
  align-items:center;
  gap:10px;
  min-width:0;
  min-height:76px;
  padding:9px;
  border:1px solid #d8e3ec;
  border-radius:9px;
  background:#fff;
  cursor:pointer;
  transition:border-color .18s ease,background-color .18s ease,box-shadow .18s ease;
}
.profile-theme-option:hover{border-color:#a5bfd2}
.profile-theme-option:has(input:checked){
  border-color:#4b9f8f;
  background:#f2faf7;
  box-shadow:0 0 0 3px rgba(75,159,143,.1);
}
.profile-theme-option input{
  position:absolute;
  width:1px!important;
  height:1px;
  opacity:0;
  pointer-events:none;
}
.profile-theme-option input:focus-visible+.profile-theme-preview{
  outline:3px solid rgba(47,110,165,.22);
  outline-offset:2px;
}
.profile-theme-preview{
  position:relative;
  display:grid;
  grid-template-columns:17px 1fr;
  grid-template-rows:12px 1fr;
  gap:3px;
  width:62px;
  height:48px;
  overflow:hidden;
  padding:5px;
  border:1px solid rgba(31,78,120,.16);
  border-radius:7px;
  background:#edf4f8;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.35);
}
.profile-theme-preview i{display:block;border-radius:3px;background:#fff}
.profile-theme-preview i:first-child{grid-column:1/-1;background:#2c638f}
.profile-theme-preview i:nth-child(2){background:#dbe7f0}
.profile-theme-interface-dark .profile-theme-preview,
.profile-theme-messenger-midnight .profile-theme-preview{border-color:#38505d;background:#09141c}
.profile-theme-interface-dark .profile-theme-preview i:first-child,
.profile-theme-messenger-midnight .profile-theme-preview i:first-child{background:#245c62}
.profile-theme-interface-dark .profile-theme-preview i:nth-child(2),
.profile-theme-messenger-midnight .profile-theme-preview i:nth-child(2){background:#142b35}
.profile-theme-interface-dark .profile-theme-preview i:nth-child(3),
.profile-theme-messenger-midnight .profile-theme-preview i:nth-child(3){background:#1d333d}
.profile-theme-messenger-classic .messenger-preview i:nth-child(2){background:#edf4fa}
.profile-theme-messenger-classic .messenger-preview i:nth-child(3){background:#dcebf6}
.profile-theme-copy{display:grid;gap:3px;min-width:0}
.profile-theme-copy strong{color:#283e52;font-size:12px}
.profile-theme-copy small{color:#738394;font-size:10px;line-height:1.35}
body.app-theme-dark .profile-theme-options{border-color:#30434f;background:#0d1820}
body.app-theme-dark .profile-theme-option{border-color:#30434f;background:#111e27}
body.app-theme-dark .profile-theme-option:has(input:checked){border-color:#51a492;background:#17302f}
body.app-theme-dark .profile-theme-copy strong{color:#e5edef}
body.app-theme-dark .profile-theme-copy small{color:#899aa5}

@media(max-width:760px){
  .profile-theme-options{grid-template-columns:1fr}
}
