:root{
  --bg: transparent;
  --card: #eaecee;
  --card-strong: #eaecee;
  --text: #111827;
  --muted: #6b7280;
  --border: rgba(15, 23, 42, 0.12);
  --shadow: 0 10px 40px rgba(2,6,23,0.08);
  --primary: #1a73e8;
  --primary-2: #0b57d0;
  --radius: 18px;
  --row: 92px;
  --grid-rows: 8;
  --header-offset: 320px;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial;
  color: var(--text);
  background: transparent;
  overflow: hidden;
}

.page-layout{
  display: grid;
  grid-template-columns: auto 1fr;
  height: 100vh;
  width: 100%;
}

.menu-column{
  display: grid;
  align-items: start;
  padding-top: calc(var(--header-offset) - 220px);
  height: 100%;
}

.menu-image{
  height: calc((100vh - var(--header-offset)) * 1.3);
  width: auto;
  object-fit: contain;
  object-position: left top;
  pointer-events: none;
  z-index: 1;
}

.dashboard{
  min-height: 100vh;
  height: 100vh;
  padding: 24px 28px 24px;
  background: transparent;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 12px;
}

.header-widget{
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  min-height: 180px;
}

.page-title{
  width: 100%;
  position: relative;
  display: grid;
  place-items: center;
}
.page-title img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  object-fit: cover;
}
.dash-tabs--header{
  padding: 0;
  border-bottom: none;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}
.dash-header__controls #editToggle{
  position: static;
}

.dash-header{
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 18px;
  margin-bottom: 0;
}
.dash-header__left{
  display: grid;
  align-items: center;
  justify-items: start;
}
.dash-header__center{
  display: grid;
  align-items: stretch;
  align-self: stretch;
  width: 100%;
  gap: 10px;
}
.dash-header__controls{
  display: grid;
  gap: 10px;
  justify-items: end;
  align-content: start;
}
.dash-header__tabs.dash-tabs{
  display: none;
}
.edit-mode .dash-header__tabs.dash-tabs{
  display: flex;
}
.dash-header__default-tpl{
  display: none;
  align-items: center;
  gap: 8px;
}
.edit-mode .dash-header__default-tpl{
  display: flex;
}
.dash-header__default-tpl label{
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.dash-header__default-tpl .widget__select{
  min-width: 120px;
  font-size: 12px;
}
.header-message-stack{
  width: 100%;
  display: grid;
  gap: 10px;
}
.header-message__fields{
  display: grid;
  gap: 8px;
}
.header-message__row{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto auto auto;
  align-items: center;
  gap: 8px;
}
.header-message__field{
  width: 100%;
  min-height: 24px;
  padding: 5px 9px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  resize: none;
}
.header-message__font,
.header-message__color{
  height: 24px;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,0.14);
  background: rgba(255,255,255,0.92);
  padding: 0 7px;
}
.header-message__color{
  padding: 0 2px;
  width: 32px;
}
.header-message__btn{
  height: 24px;
  min-width: 24px;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,0.14);
  background: rgba(255,255,255,0.92);
  font-weight: 700;
  cursor: pointer;
}
.header-message__btn.is-active{
  background: rgba(26,115,232,0.18);
  border-color: rgba(26,115,232,0.45);
  color: #0b57d0;
}
.edit-mode .header-message__field{
  border-color: rgba(15,23,42,0.14);
  background: rgba(255,255,255,0.9);
}
.header-message__row--disabled{
  opacity: 0.6;
  pointer-events: none;
}
.header-message__row--disabled .header-message__font,
.header-message__row--disabled .header-message__color,
.header-message__row--disabled .header-message__btn{
  display: none;
}
.dash-quick{
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 12px;
}
.quick-card{
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.70);
  padding: 10px 12px;
  display: grid;
  gap: 6px;
}
.quick-card__label{
  font-size: 11px;
  color: var(--muted);
}
.quick-card__value{
  font-size: 16px;
  font-weight: 800;
}

.dash-header__right{
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 16px;
  width: 100%;
}
.dash-qr{
  display: grid;
  gap: 8px;
  justify-items: end;
  text-align: right;
}
.dash-qr__title{
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.dash-qr__image{
  width: auto;
  height: 140px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.12);
  background: #ffffff;
  padding: 6px;
  object-fit: contain;
}

.header-logo{
  height: 140px;
  width: auto;
  max-height: 100%;
  border-radius: 12px;
  object-fit: contain;
  border: 1px solid rgba(15,23,42,0.12);
  background: #ffffff;
  display: block;
}

.btn{
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255,255,255,0.8);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 80ms ease, background 120ms ease, border-color 120ms ease;
}
.btn:hover{ background: rgba(255,255,255,1); border-color: rgba(15, 23, 42, 0.18); }
.btn:active{ transform: translateY(1px); }
.btn--sm{ padding: 8px 10px; font-size: 12px; }
.btn--ghost{ background: transparent; border-color: transparent; }
.btn--primary{
  background: linear-gradient(180deg, rgba(26,115,232,1), rgba(11,87,208,1));
  border-color: rgba(11,87,208,0.45);
  color: white;
}
.btn--icon{
  width: 40px;
  height: 40px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 16px;
}

.dash-tabs{
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 16px 0;
  border-bottom: 1px solid rgba(15,23,42,0.08);
  background: rgba(255,255,255,0.78);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 20px 60px rgba(2,6,23,0.08);
}
.dash-tabs--header{
  padding: 0;
  border-bottom: none;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  align-self: flex-end;
}
.tab{
  border: 1px solid rgba(11,87,208,0.45);
  background: linear-gradient(180deg, rgba(26,115,232,1), rgba(11,87,208,1));
  color: #ffffff;
  border-radius: 999px;
  padding: 0 14px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  min-width: 86px;
  height: 40px;
  text-align: center;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(15,23,42,0.08);
}
.tab__label{ white-space: nowrap; }
.tab__delete{
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 12px;
  border: 1px solid rgba(15,23,42,0.12);
  background: rgba(255,255,255,0.9);
}
.tab__delete:hover{
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.35);
  color: #ef4444;
}
.tab--active{
  box-shadow: 0 8px 20px rgba(11,87,208,0.35);
}
.tab--home{
  font-weight: 900;
}
.tab--add{
  background: rgba(26,115,232,0.18);
  color: #0b57d0;
  border-style: dashed;
  font-weight: 700;
}

.widgets-grid{
  display: grid;
  /* 4 medium columns = 8 half-columns for button sizing */
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-auto-rows: minmax(72px, calc((100vh - var(--header-offset)) / var(--grid-rows)));
  gap: 14px;
  height: calc(100vh - var(--header-offset));
  align-content: stretch;
}

.home-layout{
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.home-row{
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: var(--row);
  gap: 12px;
  grid-column: 1 / span 5;
}
.home-profile{
  display: grid;
  gap: 14px;
  grid-column: 6 / span 1;
  grid-row: 1 / span 4;
}

.widget-tile{
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  position: relative;
}
.widget-tile--hidden{
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.widget-tile--hidden::after{
  display: none;
}
.widget-tile::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.35));
  pointer-events: none;
}

.widget-tile__header{
  display: none;
}
.widget-tile__body{
  padding: 14px;
  font-size: 13px;
  color: var(--text);
  position: relative;
  z-index: 1;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
/* Ensure widget bodies are completely cleared when content changes */
.widget-tile__body > * {
  position: relative;
  z-index: 1;
}
.widget-tile__actions{
  display: none;
  gap: 8px;
}
.edit-mode .widget-tile__actions{
  display: inline-flex;
}

.banner{
  height: 100%;
  border-radius: 14px;
  border: 1px dashed rgba(15,23,42,0.18);
  background: rgba(255,255,255,0.6);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
}

.centered{
  flex: 1;
  display: grid;
  place-items: center;
  height: 100%;
}

.add-widget{
  border-radius: 16px;
  border: 1px dashed rgba(15,23,42,0.2);
  background: rgba(255,255,255,0.65);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 14px;
  color: var(--muted);
  font-size: 12px;
}

.widget{
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  position: relative;
}
.widget--hidden{
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.widget--hidden::after{
  display: none;
}
.widget::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.35));
  pointer-events: none;
}
.widget__header{
  display: none;
}
.widget__body{
  padding: 14px;
  font-size: 13px;
  color: var(--text);
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
/* Ensure widget bodies are completely cleared when content changes */
.widget__body > * {
  position: relative;
  z-index: 1;
}
.widget--banner .widget__body{
  overflow: visible;
}
.widget--news .widget__body,
.widget-tile--news .widget-tile__body{
  padding: 0;
  gap: 0;
  align-items: stretch;
  min-height: 0;
  flex: 1 1 auto;
}
.widget__actions{
  display: none;
  gap: 8px;
}
.edit-mode .widget__actions{
  display: inline-flex;
}
.widget__overlay{
  position: absolute;
  top: 10px;
  right: 10px;
  display: none;
  z-index: 2;
}
.edit-mode .widget__overlay{
  display: block;
}
.widget__overlay-btn{
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.12);
  background: rgba(255,255,255,0.9);
  cursor: pointer;
}
.widget__select{
  border: 1px solid rgba(15,23,42,0.12);
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  padding: 4px 10px;
  font-size: 12px;
}
.widget__header > div{ position: relative; z-index: 1; }
.tag{
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.12);
  background: rgba(255,255,255,0.65);
  font-size: 11px;
  color: var(--muted);
}

.stat-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  height: 100%;
}
.stat-card{
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.7);
  padding: 10px 12px;
  display: grid;
  gap: 6px;
}
.stat-card__label{ font-size: 11px; color: var(--muted); }
.stat-card__value{ font-size: 18px; font-weight: 900; }
.stat-card__delta{ font-size: 11px; color: #16a34a; }

.chart{
  height: 100%;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.12);
  background: radial-gradient(circle at 20% 20%, rgba(26,115,232,0.25), transparent 45%),
    linear-gradient(180deg, rgba(26,115,232,0.15), rgba(26,115,232,0.03));
  display: grid;
  place-items: center;
  color: rgba(26,115,232,0.75);
  font-weight: 700;
}

.list{
  display: grid;
  gap: 8px;
  height: 100%;
}
.widget--pdf{
  height: 100%;
  display: grid;
  grid-template-rows: 1fr;
}
.widget--pdf .widget__body,
.widget-tile--pdf .widget-tile__body{
  padding: 0;
  gap: 0;
  align-items: stretch;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
  position: relative;
  height: 100%;
  width: 100%;
}
.pdf-viewer{
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}
.pdf-viewer__iframe{
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.pdf-viewer--placeholder{
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15,23,42,0.04);
  border: 1px dashed rgba(15,23,42,0.15);
  border-radius: var(--radius);
}
.pdf-viewer__placeholder{
  font-size: 13px;
  color: var(--muted);
  padding: 16px;
}
.pdf-upload__hint{
  font-size: 12px;
  color: var(--muted);
  margin-left: 8px;
}
.news{
  width: 100%;
  height: 100%;
  min-height: 0;
  flex: 1 1 auto;
  display: block;
  overflow: auto;
}
.news__viewer{
  width: 100%;
  height: 300%;
  border: none;
  display: block;
}
.events{
  display: grid;
  gap: 8px;
}
.events__title{
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.events__list{
  display: grid;
  gap: 8px;
}
.events__item{
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,0.1);
  background: rgba(255,255,255,0.75);
  font-size: 12px;
}
.events__date{
  font-weight: 800;
  color: #0b57d0;
}
.events__name{
  font-weight: 700;
}
.events__meta{
  color: var(--muted);
  font-size: 11px;
}
.message{
  display: grid;
  gap: 10px;
  height: 100%;
}
.message__header{
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}
.message__content{
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  flex: 1 1 auto;
  min-height: 0;
}
.message__image{
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,0.12);
}
.message__text{
  font-size: 12px;
  line-height: 1.5;
  color: var(--text);
}
.poll{
  display: grid;
  gap: 10px;
  height: 100%;
}
.poll__question{
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}
.poll__options{
  display: grid;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.poll__option{
  display: grid;
  gap: 6px;
}
.poll__vote-btn{
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,0.14);
  background: rgba(255,255,255,0.92);
  padding: 8px 12px;
  text-align: left;
  font-size: 12px;
  cursor: pointer;
  transition: background 120ms ease;
}
.poll__vote-btn:hover{
  background: rgba(26,115,232,0.08);
  border-color: rgba(26,115,232,0.25);
}
.poll__results{
  display: flex;
  align-items: center;
  gap: 8px;
}
.poll__bar{
  flex: 1 1 auto;
  height: 6px;
  border-radius: 999px;
  background: rgba(15,23,42,0.08);
  overflow: hidden;
}
.poll__bar-fill{
  height: 100%;
  background: linear-gradient(90deg, rgba(26,115,232,0.6), rgba(26,115,232,0.8));
  transition: width 200ms ease;
}
.poll__percentage{
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  min-width: 36px;
  text-align: right;
}
.yoursay{
  display: grid;
  gap: 10px;
  height: 100%;
  grid-template-rows: auto auto 1fr;
}
.yoursay__question{
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}
.yoursay__input-area{
  display: grid;
  gap: 8px;
}
.yoursay__input{
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,0.14);
  padding: 8px 10px;
  font-size: 12px;
  background: rgba(255,255,255,0.92);
  resize: vertical;
}
.yoursay__submit{
  border-radius: 10px;
  border: 1px solid rgba(26,115,232,0.35);
  background: rgba(26,115,232,0.12);
  color: #0b57d0;
  font-weight: 700;
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
}
.yoursay__responses{
  display: grid;
  gap: 8px;
  overflow: auto;
  min-height: 0;
}
.yoursay__response{
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,0.1);
  background: rgba(255,255,255,0.75);
}
.yoursay__response-author{
  font-size: 11px;
  font-weight: 700;
  color: #0b57d0;
}
.yoursay__response-text{
  font-size: 12px;
  line-height: 1.4;
  color: var(--text);
}
.yoursay__response-time{
  font-size: 10px;
  color: var(--muted);
}

.birthday{
  display: grid;
  gap: 12px;
  height: 100%;
  min-height: 0;
}
.birthday__title{
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}
.birthday__subtitle{
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
}
.birthday__list{
  display: grid;
  gap: 10px;
  overflow: auto;
  min-height: 0;
}
.birthday__card{
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(26,115,232,0.08), rgba(26,115,232,0.04));
  border: 1px solid rgba(26,115,232,0.15);
}
.birthday__icon{
  font-size: 18px;
  line-height: 1;
}
.birthday__name{
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.birthday__role{
  font-size: 11px;
  color: var(--muted);
}
.birthday__wish{
  font-size: 12px;
  font-weight: 600;
  color: #0b57d0;
  margin-top: 2px;
}
.birthday__empty{
  font-size: 12px;
  color: var(--muted);
  padding: 12px;
  text-align: center;
}

.notify__header{
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.notify__title{
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.notify__hint{
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}
.notify__input{
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,0.14);
  padding: 0 10px;
  font-size: 12px;
  background: rgba(255,255,255,0.92);
}
.notify__input--area{
  height: auto;
  min-height: 56px;
  resize: vertical;
  padding: 8px 10px;
}
.notify--banner .notify__row{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.notify--banner .notify__input{
  flex: 1 1 120px;
  min-width: 120px;
}
.notify--medium{
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  min-height: 0;
}
.notify--medium .notify__input--area{
  flex: 1 1 auto;
  min-height: 60px;
  max-height: 120px;
}
.notify--medium .notify__actions{
  flex-shrink: 0;
}
.notify__actions{
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
}
.notify__dropdown{
  border: 1px solid rgba(15,23,42,0.14);
  border-radius: 10px;
  background: rgba(255,255,255,0.92);
  padding: 6px 8px;
  position: relative;
  z-index: 50;
  min-width: 220px;
}
.notify__dropdown-label{
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  list-style: none;
}
.notify__dropdown-label::-webkit-details-marker{
  display: none;
}
.notify__options{
  position: absolute;
  top: -60px;
  left: -10px;
  width: calc(100% + 40px);
  min-width: 260px;
  max-height: 280px;
  overflow: auto;
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.12);
  background: rgba(255,255,255,0.96);
  box-shadow: 0 10px 30px rgba(2,6,23,0.12);
  z-index: 60;
}
.notify__close{
  margin-top: 4px;
  height: 26px;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,0.14);
  background: rgba(255,255,255,0.92);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.notify__dropdown:not([open]) .notify__options{
  display: none;
}
.notify__option{
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.notify__send{
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(26,115,232,0.35);
  background: rgba(26,115,232,0.12);
  color: #0b57d0;
  font-weight: 700;
  padding: 0 12px;
  cursor: pointer;
}
.widget--notify,
.widget-tile--notify{
  overflow: visible;
}
.news__title{
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.list-item{
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.7);
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}
.list-item__meta{
  color: var(--muted);
}

.profile{
  display: grid;
  gap: 12px;
  height: 100%;
}
.widget--profile{
  min-height: 0;
  height: 100%;
}
.widget--fixed-profile{
  position: sticky;
  top: 18px;
  align-self: start;
  z-index: 2;
}
.profile__header{
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: center;
}
.profile__avatar{
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(140deg, rgba(26,115,232,1), rgba(11,87,208,1));
  color: white;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 18px;
}
.profile__name{ font-weight: 900; font-size: 16px; }
.profile__role{ font-size: 12px; color: var(--muted); }
.profile__section{
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.72);
  padding: 10px 10px;
  display: grid;
  gap: 8px;
}
.profile__row{
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}
.profile__label{ color: var(--muted); }
.profile__value{ font-weight: 700; text-align: right; }
.profile__stats{ display: grid; gap: 8px; }
.profile__bar{
  height: 8px;
  border-radius: 999px;
  background: rgba(15,23,42,0.08);
  overflow: hidden;
}
.profile__bar span{
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #facc15, #f59e0b);
}

.note{
  border-radius: 14px;
  border: 1px dashed rgba(15,23,42,0.18);
  background: rgba(255,255,255,0.6);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--muted);
}

.button-widget{
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  cursor: pointer;
}
.button-widget__btn{
  border-radius: 14px;
  border: none;
  background: transparent;
  color: #0b57d0;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  height: 100%;
  width: 100%;
}
.button-widget__btn:hover{
  background: rgba(26,115,232,0.08);
}
.button-widget__label{
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.button-widget__image{
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.button-widget__sub{
  font-size: 11px;
  color: var(--muted);
}

.map{
  height: 100%;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.12);
  background:
    radial-gradient(circle at 30% 30%, rgba(20,184,166,0.25), transparent 45%),
    radial-gradient(circle at 70% 60%, rgba(59,130,246,0.25), transparent 45%),
    linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,255,255,0.2));
  display: grid;
  place-items: center;
  color: rgba(15,23,42,0.6);
  font-weight: 700;
  position: relative;
}
.map__pin{
  width: 14px;
  height: 14px;
  background: #ef4444;
  border-radius: 999px;
  box-shadow: 0 0 0 6px rgba(239,68,68,0.2);
  position: absolute;
  top: 40%;
  left: 55%;
}

.calculator{
  display: grid;
  gap: 8px;
  height: 100%;
}
.calculator__display{
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.12);
  background: rgba(255,255,255,0.9);
  padding: 10px 12px;
  font-weight: 800;
  text-align: right;
  font-size: 16px;
}
.calculator__grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.calc-btn{
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,0.12);
  background: rgba(255,255,255,0.8);
  padding: 8px;
  text-align: center;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}
.calc-btn--accent{
  background: rgba(26,115,232,0.15);
  color: #0b57d0;
}

.todo{
  display: grid;
  gap: 8px;
  height: 100%;
}
.todo-item{
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.7);
  padding: 8px 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}
.todo-item input{ accent-color: #1a73e8; }

.modal{
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 50;
}
.modal--hidden{ display: none; }
.modal__backdrop{
  position:absolute;
  inset:0;
  background: rgba(2,6,23,0.40);
}
.modal__card{
  position: relative;
  width: min(640px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.30);
  box-shadow: 0 30px 120px rgba(2,6,23,0.30);
  backdrop-filter: blur(12px);
}
.modal__header{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(15,23,42,0.12);
}
.modal__title{ font-weight: 800; }
.modal__body{
  padding: 14px;
  overflow: auto;
  max-height: calc(100vh - 180px);
}
.modal__footer{
  display:flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 12px 14px;
  border-top: 1px solid rgba(15,23,42,0.10);
}

.form{
  display: grid;
  gap: 12px;
}
.template-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.template-tile{
  border: 1px solid rgba(15,23,42,0.12);
  background: rgba(255,255,255,0.85);
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 10px;
  text-align: left;
  cursor: pointer;
}
.template-tile--selected{
  border-color: rgba(26,115,232,0.35);
  box-shadow: 0 0 0 3px rgba(26,115,232,0.12);
}
.template-title{
  font-weight: 800;
  font-size: 13px;
}
.template-preview{
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-auto-rows: 8px;
  gap: 4px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(248,250,252,0.9);
  padding: 8px;
}
.template-block{
  border-radius: 6px;
  background: rgba(26,115,232,0.18);
  border: 1px solid rgba(26,115,232,0.25);
}
.template-block--accent{
  background: rgba(16,185,129,0.18);
  border-color: rgba(16,185,129,0.35);
}
.label{ font-size: 12px; color: var(--muted); }
input[type="text"], textarea, select{
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.14);
  background: rgba(255,255,255,0.85);
  outline: none;
}
textarea{ min-height: 110px; resize: vertical; }

@media (max-width: 980px){
  .dash-header{
    grid-template-columns: 1fr;
  }
  .dash-header__left{
    grid-template-columns: 1fr;
  }
  .dash-quick{
    grid-template-columns: repeat(3, minmax(80px, 1fr));
  }
  .widgets-grid{
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  body{ overflow: auto; }
  .widgets-grid{
    height: auto;
    grid-auto-rows: var(--row);
  }
}
@media (max-height: 820px){
  body{ overflow: auto; }
  .widgets-grid{
    height: auto;
    grid-auto-rows: var(--row);
  }
}
@media (max-width: 640px){
  .dashboard{ padding: 18px 16px 30px; }
  .dash-quick{
    grid-template-columns: repeat(2, minmax(80px, 1fr));
  }
  .widgets-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  body{ overflow: auto; }
  .widgets-grid{
    height: auto;
    grid-auto-rows: var(--row);
  }
}

