/* Home, leave reports and leave requests. Higher specificity is intentional:
   module styles and report styles can also arrive with AJAX page content. */

/* Home: readable summary cards with a consistent blue identity. */
main#content .office-home { padding: 28px; background: #fff; }
main#content .office-home.content_bg div.att-home-dashboard.clear {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100% !important;
  gap: 16px !important;
  margin: 24px 0 !important;
}
main#content .office-home.content_bg .att-home-dashboard > .card { min-width: 0; }
main#content .office-home.content_bg .att-home-dashboard > .card .card-item {
  background: #fff !important; color: var(--office-ink) !important;
  border: 1px solid var(--office-line) !important;
  border-top: 3px solid var(--brand-blue) !important;
  min-height: 148px; height: 100% !important;
  padding: 18px !important; gap: 14px;
  align-items: flex-start !important;
  box-shadow: 0 3px 12px rgb(7 108 174 / 5%) !important;
}
main#content .office-home.content_bg .att-home-dashboard > .card .card-item:hover {
  border-color: var(--primary-400) !important;
  box-shadow: 0 5px 18px rgb(7 108 174 / 10%) !important;
}
main#content .office-home.content_bg .att-home-dashboard > .card .card-item * { color: var(--office-ink) !important; white-space: normal !important; }
main#content .office-home.content_bg .att-home-dashboard > .card .card-subitem.icon {
  width: 42px !important; height: 42px !important;
  align-self: flex-start; border-radius: 10px;
  background: var(--primary-50) !important; color: var(--brand-blue) !important;
}
main#content .office-home.content_bg .att-home-dashboard > .card .card-subitem.icon::before { font-size: 1.4rem !important; }
main#content .office-home.content_bg .att-home-dashboard > .card .card-subitem:not(.icon) { padding: 0 !important; gap: 6px; }
main#content .office-home.content_bg .att-home-dashboard > .card .card-subitem .title { font-size: .875rem !important; color: var(--office-muted) !important; line-height: 1.65; }
main#content .office-home.content_bg .att-home-dashboard > .card .card-subitem b { font-size: clamp(1.4rem, 1rem + .6vw, 1.8rem) !important; line-height: 1.5 !important; overflow-wrap: anywhere; }
main#content .office-home.content_bg div.att-home-content { width: 100% !important; margin: 28px 0 0 !important; }
.office-home .dashboard:not(.att-home-dashboard):not(.att-home-content) { width: 100%; max-width: none; margin: 24px 0; }
.office-home .dashboard .ggrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.office-home .dashboard .ggrid::before, .office-home .dashboard .ggrid::after { display: none; }
.office-home .dashboard .qmenu { float: none; width: 100%; margin: 0; min-width: 0; }
.office-home .qmenu a { display: flex; align-items: center; min-height: 56px; padding: 14px; border: 1px solid var(--office-line); border-radius: 10px; background: #f3f9fd; color: var(--primary-700); white-space: normal; }
.office-home #att-calendar-container { border: 1px solid var(--office-line); border-radius: 16px; box-shadow: none; }
.office-home .att-cal-topbar { background: #f3f9fd; }
.office-home .att-cal-title-group { min-width: 0; }
.office-home .att-cal-title-group h3 { font-size: 1.125rem; line-height: 1.6; }

/* Reports: blue navigation, quiet cards and a separate scrollable table. */
main#content .report-suite-leave { background: #f2f8fc !important; border: 1px solid var(--office-line); overflow: visible; }
main#content .report-suite-leave .leave-wrap { padding: 24px; }
main#content .report-suite-leave .tab_settings_bg { padding: 12px 24px; border-radius: 17px 17px 0 0; box-shadow: none; }
main#content .report-suite-leave .leave-nav-tabs { gap: 8px; padding: 6px; border-color: var(--office-line); box-shadow: none; }
main#content .report-suite-leave .leave-nav-tab { min-height: 46px; padding: 10px 14px; font-size: .9375rem; font-weight: 500; white-space: normal; }
main#content .report-suite-leave .leave-nav-tab.active { background: var(--brand-blue) !important; color: #fff !important; box-shadow: none; }
main#content .report-suite-leave .leave-nav-tab:not(.active):hover { background: var(--primary-50); color: var(--primary-700); }
main#content .report-suite-leave .leave-tab-count { font-size: .875rem; min-width: 28px; text-align: center; }
main#content .report-suite-leave .leave-pulse-dot { animation: none; }
main#content .report-suite-leave .leave-hero { margin-bottom: 24px !important; border-bottom: 3px solid var(--brand-lime) !important; }
main#content .report-suite-leave .leave-hero-title { flex: 1 1 480px; min-width: 0; }
main#content .report-suite-leave .leave-hero-title h2 { font-size: clamp(1.25rem, 1rem + .6vw, 1.65rem) !important; line-height: 1.6 !important; }
main#content .report-suite-leave .leave-hero-title p { line-height: 1.8; max-width: 65ch; }
main#content .report-suite-leave .leave-hero-badge { font-size: .875rem; line-height: 1.6; white-space: normal; }
main#content .report-suite-leave .leave-kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
main#content .report-suite-leave .leave-kpi-card { padding: 20px; min-width: 0; border: 1px solid var(--office-line); border-radius: 14px; box-shadow: none; }
main#content .report-suite-leave .leave-kpi-card:hover { transform: none; box-shadow: none; }
main#content .report-suite-leave .leave-kpi-label { font-size: .875rem; line-height: 1.65; }
main#content .report-suite-leave .leave-kpi-val { font-size: 1.85rem; line-height: 1.6; }
main#content .report-suite-leave .leave-kpi-sub { font-size: .875rem; line-height: 1.6; }
main#content .report-suite-leave .datatable { min-width: 0; padding: 20px; border: 1px solid var(--office-line); border-radius: 14px; box-shadow: none; }
main#content .report-suite-leave .datatable .tableheader { margin: 0 0 20px; padding: 0; border: 0; background: transparent; }
main#content .report-suite-leave .datatable .table_nav { margin: 0 0 16px; background: #f3f9fd; }
main#content .report-suite-leave .datatable .table_nav > div { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; width: 100%; }
main#content .report-suite-leave .datatable .table_nav fieldset { min-width: 0; flex: 1 1 160px; }
main#content .report-suite-leave .datatable .table_nav fieldset > label { display: flex; flex-direction: column; align-items: stretch; gap: 6px; width: 100%; font-size: .875rem; }
main#content .report-suite-leave .datatable .table_nav :is(select, input[type=text], input[type=date], .input-gcalendar) { min-height: 44px; width: 100%; max-width: 100%; font-size: 1rem !important; }
main#content .report-suite-leave .datatable .tablebody { width: 100%; overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid var(--office-line); border-radius: 10px; }
main#content .report-suite-leave .datatable .tablebody table { min-width: 900px; margin: 0; }
main#content .report-suite-leave .datatable .tablebody td { line-height: 1.7; }
main#content .report-suite-leave .tablebody table.responsive-v > thead { display: table-header-group; }
main#content .report-suite-leave .tablebody table.responsive-v > tbody { display: table-row-group; border: 0; }
main#content .report-suite-leave .tablebody table.responsive-v > tbody > tr { display: table-row; }
main#content .report-suite-leave .tablebody table.responsive-v > tbody > tr > td { display: table-cell; }
main#content .report-suite-leave .tablebody table.responsive-v > tbody > tr > td::before { display: none; }
main#content .report-suite-leave .tablebody table.responsive-v > tbody > tr > td > * { display: revert; padding: revert; }
main#content .report-suite-leave .datatable .tablebody td:last-child { min-width: 220px; }
main#content .report-suite-leave .datatable .tablebody td .button { width: auto; height: auto; min-height: 40px; padding: 8px 10px !important; font-size: .875rem !important; margin: 3px; white-space: nowrap; }
main#content .report-suite-leave .datatable .button.blue { background: var(--primary-50) !important; color: var(--primary-700) !important; border: 1px solid var(--primary-200) !important; }
main#content .report-suite-leave .datatable .button.blue:hover { background: var(--brand-blue) !important; color: #fff !important; }
main#content .report-suite-leave .datatable .tablefooter { padding: 16px 0 0; background: #fff; }
main#content .report-suite-leave .datatable .table_nav.action { flex-wrap: wrap; margin-top: 16px; }
main#content .report-suite-leave .leave-avatar { background: var(--primary-50); color: var(--primary-700); }

/* Leave form: one clear panel, legible controls and flexible date groups. */
main#content .leave-form-shell { width: 100%; max-width: 960px; margin: 0 auto 28px; }
main#content .leave-form-shell .leave-form-hero { margin-bottom: 20px; border-bottom: 3px solid var(--brand-lime); }
main#content .leave-form-shell .leave-form-hero-badge { background: rgb(255 255 255 / 12%); font-size: .875rem; line-height: 1.7; text-transform: none; letter-spacing: 0; }
main#content .leave-form-shell .leave-form-hero h3 { font-size: 1.6rem; font-weight: 600; line-height: 1.6; }
main#content .leave-form-shell .leave-form-hero p { font-size: .9375rem; line-height: 1.8; }
main#content .leave-form-shell .setup_frm { width: 100%; padding: 28px !important; border: 1px solid var(--office-line); border-radius: 16px; box-shadow: none; }
main#content .leave-form-shell .setup_frm legend { font-weight: 600 !important; font-size: 1.125rem !important; line-height: 1.7; }
main#content .leave-form-shell .setup_frm .item > label,
main#content .leave-form-shell .setup_frm .groups .width50 > label { font-size: .9375rem !important; font-weight: 500 !important; line-height: 1.7 !important; }
main#content .leave-form-shell .setup_frm .g-input { background: #fff !important; border-color: #b7cedf !important; border-radius: 10px !important; overflow: visible !important; }
main#content .leave-form-shell .setup_frm .g-input:focus-within { border-color: var(--brand-blue) !important; box-shadow: 0 0 0 3px rgb(7 108 174 / 12%) !important; }
main#content .leave-form-shell .setup_frm .g-input :is(input[type=text], input[type=date], select) { font-size: 1rem !important; line-height: 1.65 !important; height: auto !important; min-height: 48px; padding-top: 10px !important; padding-bottom: 10px !important; }
main#content .leave-form-shell .setup_frm .g-input textarea { min-height: 140px; font-size: 1rem !important; line-height: 1.8 !important; }
main#content .leave-form-shell .setup_frm .groups { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 18px !important; }
main#content .leave-form-shell .setup_frm .groups > div { min-width: 0; margin: 0; }
main#content .leave-form-shell .setup_frm .groups::before,
main#content .leave-form-shell .setup_frm .groups::after { display: none; }
main#content .leave-form-shell .leave-department-card { flex-wrap: wrap; padding: 14px !important; background: #f3f9fd !important; gap: 10px !important; }
main#content .leave-form-shell .leave-department-card strong { overflow-wrap: anywhere; }
main#content .leave-form-shell .leave-department-card span { font-size: .875rem !important; white-space: normal; }
main#content .leave-form-shell #leave_detail:not(:empty) { background: var(--primary-50) !important; border-color: var(--primary-200) !important; border-left-color: var(--brand-blue) !important; color: var(--primary-800) !important; box-shadow: none !important; }
main#content .leave-form-shell #leave_detail b { color: var(--primary-800) !important; }
main#content .leave-form-shell .setup_frm .comment { display: block !important; font-size: .875rem !important; line-height: 1.8; overflow-wrap: anywhere; }
main#content .leave-form-shell .setup_frm .g-input:has(input[type=file]) { justify-content: flex-start !important; padding: 16px !important; background: #f3f9fd !important; }
main#content .leave-form-shell .setup_frm input[type=file] { width: 100%; min-width: 0; max-width: 100%; }
main#content .leave-form-shell .setup_frm fieldset.submit { justify-content: flex-end !important; padding-top: 20px !important; border-top: 1px solid var(--office-line) !important; }
main#content .leave-form-shell .setup_frm .button.ok { background: var(--brand-blue) !important; box-shadow: none !important; min-height: 48px; }
main#content .leave-form-shell .setup_frm .button.ok:hover { background: var(--primary-700) !important; transform: none !important; }

@media (max-width: 1100px) {
  main#content .office-home.content_bg div.att-home-dashboard.clear,
  main#content .report-suite-leave .leave-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .office-home .dashboard .ggrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  main#content .office-home { padding: 18px 12px; }
  main#content .office-home.content_bg div.att-home-dashboard.clear { gap: 12px !important; margin: 18px 0 !important; }
  main#content .office-home.content_bg .att-home-dashboard > .card .card-item { padding: 14px !important; min-height: 128px; gap: 10px; }
  main#content .office-home.content_bg .att-home-dashboard > .card .card-subitem.icon { width: 34px !important; height: 34px !important; }
  .office-home .att-cal-topbar, .office-home .att-cal-month-bar { flex-wrap: wrap; gap: 14px; padding: 16px; }
  .office-home .att-cal-actions { flex-wrap: wrap; max-width: 100%; }
  main#content .report-suite-leave .leave-wrap { padding: 14px; }
  main#content .report-suite-leave .tab_settings_bg { padding: 10px 14px; }
  main#content .report-suite-leave .leave-nav-tabs { display: grid; grid-template-columns: minmax(0, 1fr); }
  main#content .report-suite-leave .leave-nav-tab { width: 100%; justify-content: space-between; }
  main#content .report-suite-leave .leave-kpi-grid { gap: 10px; }
  main#content .report-suite-leave .leave-kpi-card { padding: 14px; }
  main#content .report-suite-leave .leave-kpi-val { font-size: 1.5rem; }
  main#content .report-suite-leave .datatable { padding: 12px; }
  main#content .report-suite-leave .datatable .tableheader { margin: 0 0 16px; padding: 0; }
  main#content .report-suite-leave .datatable .table_nav fieldset { flex-basis: 100%; width: 100%; }
  main#content .report-suite-leave .datatable .table_nav.action > * { max-width: 100%; }
  main#content .leave-form-shell .setup_frm { padding: 20px 14px !important; }
  main#content .leave-form-shell .setup_frm .groups { grid-template-columns: minmax(0, 1fr) !important; gap: 16px !important; }
  main#content .leave-form-shell .setup_frm fieldset.submit .button.ok { width: 100%; }
}
@media (max-width: 420px) {
  main#content .office-home.content_bg div.att-home-dashboard.clear { grid-template-columns: minmax(0, 1fr); }
  main#content .office-home.content_bg .att-home-dashboard > .card .card-item { min-height: 116px; }
  .office-home .dashboard .ggrid,
  main#content .report-suite-leave .leave-kpi-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   Settings: landing page cards (module=settings) and the tab bar on
   each settings page, whose grouped item opens as a dropdown.
   ========================================================================== */
main#content .settings-hub { display: grid; gap: 28px; }
main#content .settings-hub-title {
  margin: 0 0 12px; font-size: 1rem; font-weight: 700; color: var(--office-ink);
  display: flex; align-items: center; gap: 10px;
}
main#content .settings-hub-title::after { content: ""; flex: 1; height: 1px; background: var(--office-line); }
main#content .settings-hub-grid {
  display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
main#content a.settings-hub-card {
  display: flex; align-items: center; gap: 14px; min-height: 84px; padding: 16px 18px;
  background: #fff; border: 1px solid var(--office-line); border-radius: var(--radius-lg);
  color: var(--office-ink) !important; text-decoration: none !important;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
main#content a.settings-hub-card:hover,
main#content a.settings-hub-card:focus-visible {
  border-color: var(--brand-sky); box-shadow: 0 8px 22px rgb(7 65 103 / 10%); transform: translateY(-1px);
}
main#content .settings-hub-icon {
  flex: 0 0 46px; width: 46px; height: 46px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--att-primary-light); color: var(--brand-blue); font-size: 1.25rem;
}
main#content .settings-hub-icon::before { margin: 0 !important; }
main#content a.settings-hub-card:hover .settings-hub-icon { background: var(--brand-blue); color: #fff; }
main#content .settings-hub-text { display: grid; gap: 3px; min-width: 0; }
main#content .settings-hub-text strong { font-size: 1rem; font-weight: 700; line-height: 1.35; }
main#content .settings-hub-text small { font-size: .875rem; color: var(--office-muted); line-height: 1.4; }

/* Tab bar on settings pages */
main#content .tab_settings_bg .tab_menus { align-items: center; overflow: visible; }
main#content .tab_settings_bg .tab_menus > li { position: relative; overflow: visible; align-self: center; }
main#content .tab_settings_bg .tab_menus > li > a { display: flex; align-items: center; cursor: pointer; }
main#content .tab_settings_bg .tab_menus > li.select > a { color: #fff !important; background: transparent !important; box-shadow: none !important; }
main#content .tab_settings_bg .tab_menus > li.menu-arrow > a::after {
  content: ""; width: 7px; height: 7px; margin-left: 8px; margin-top: -3px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg);
}
main#content .tab_settings_bg .tab_menus > li > ul {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
  min-width: 240px; margin: 0; padding: 6px; list-style: none;
  background: #fff; border: 1px solid var(--office-line); border-radius: 12px;
  box-shadow: 0 14px 34px rgb(7 65 103 / 16%);
}
main#content .tab_settings_bg .tab_menus > li > ul::before {
  content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px;
}
main#content .tab_settings_bg .tab_menus > li:hover > ul,
main#content .tab_settings_bg .tab_menus > li:focus-within > ul { display: block; }
main#content .tab_settings_bg .tab_menus > li > ul > li { margin: 0; padding: 0; list-style: none; float: none; }
main#content .tab_settings_bg .tab_menus > li > ul a {
  display: block; padding: 10px 12px; border-radius: 8px; white-space: nowrap;
  color: var(--office-ink) !important; background: transparent !important;
  font-weight: 600; font-size: .9375rem; text-decoration: none !important;
}
main#content .tab_settings_bg .tab_menus > li > ul a:hover,
main#content .tab_settings_bg .tab_menus > li > ul a:focus-visible {
  background: var(--att-primary-light) !important; color: var(--brand-blue) !important;
}
@media (max-width: 760px) {
  main#content .settings-hub-grid { grid-template-columns: minmax(0, 1fr); }
  main#content .tab_settings_bg .tab_menus > li > ul { left: auto; right: 0; min-width: 220px; }
}

/* ==========================================================================
   Leave request form (module=eleave-leave): two-column layout on desktop,
   date pickers the same height as selects, readable upload box.
   ========================================================================== */
main#content .leave-form-shell { max-width: 1180px; }
main#content .leave-form-shell .setup_frm .input-groups {
  display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0;
}
main#content .leave-form-shell .setup_frm .input-groups > div { width: auto !important; max-width: none !important; flex: none !important; min-width: 0; margin: 0 !important; float: none !important; }
main#content .leave-form-shell .setup_frm .input-groups::before,
main#content .leave-form-shell .setup_frm .input-groups::after { display: none; }
main#content .leave-form-shell .setup_frm .input-gcalendar {
  display: flex !important; align-items: center; width: 100% !important; min-height: 48px;
  border: 0 !important; box-shadow: none !important; background: transparent !important;
  font-size: 1rem !important; box-sizing: border-box;
}
main#content .leave-form-shell .setup_frm .leave-department-card { min-height: 50px; align-items: center; padding: 10px 14px !important; box-sizing: border-box; }
main#content .leave-form-shell .setup_frm .g-input:has(.g-file) {
  border-style: dashed !important; border-width: 2px !important; cursor: pointer;
  transition: border-color .15s, background .15s;
}
main#content .leave-form-shell .setup_frm .g-input:has(.g-file):hover { border-color: var(--brand-blue) !important; background: var(--att-primary-light) !important; }
main#content .leave-form-shell .setup_frm .g-input:has(.g-file) input[type=text] {
  background: transparent !important; border: 0 !important; color: var(--office-ink) !important;
  font-size: 1rem !important; opacity: 1; -webkit-text-fill-color: currentColor;
}
main#content .leave-form-shell .setup_frm .g-input:has(.g-file) input[type=text]::placeholder { color: var(--brand-blue); opacity: 1; font-weight: 600; }
main#content .leave-form-shell .setup_frm .g-input:has(.g-file)::before { color: var(--brand-blue); font-size: 1.2rem; }
main#content .leave-form-shell .setup_frm textarea#communication { min-height: 120px; }

@media (min-width: 1000px) {
  main#content .leave-form-shell .setup_frm > fieldset:not(.submit) {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; row-gap: 22px;
  }
  main#content .leave-form-shell .setup_frm > fieldset:not(.submit) > * { grid-column: 1 / -1; order: 20; margin: 0 !important; min-width: 0; }
  main#content .leave-form-shell .setup_frm > fieldset:not(.submit) > .item:has(#leave_id) { grid-column: 1; order: 1; }
  main#content .leave-form-shell .setup_frm > fieldset:not(.submit) > .leave-department-field { grid-column: 2; order: 2; }
  main#content .leave-form-shell .setup_frm > fieldset:not(.submit) > #leave_detail { order: 3; }
  main#content .leave-form-shell .setup_frm > fieldset:not(.submit) > .item:has(#start_date) { grid-column: 1; order: 4; }
  main#content .leave-form-shell .setup_frm > fieldset:not(.submit) > .item:has(#end_date) { grid-column: 2; order: 5; }
  main#content .leave-form-shell .setup_frm > fieldset:not(.submit) > .item:has(#detail) { grid-column: 1; order: 6; }
  main#content .leave-form-shell .setup_frm > fieldset:not(.submit) > .item:has(#communication) { grid-column: 2; order: 7; }
  main#content .leave-form-shell .setup_frm > fieldset:not(.submit) > .item:has(.g-file) { order: 8; }
  main#content .leave-form-shell .setup_frm > fieldset:not(.submit) > .item:has(#detail) textarea,
  main#content .leave-form-shell .setup_frm > fieldset:not(.submit) > .item:has(#communication) textarea { min-height: 150px; }
}
main#content .leave-form-shell .setup_frm .input-groups > div > .g-input { display: flex !important; width: 100% !important; box-sizing: border-box; }
main#content .leave-form-shell .setup_frm .input-groups > div > .g-input > :is(select, .input-gcalendar) { flex: 1 1 auto; width: 100% !important; min-width: 0; }
main#content .leave-form-shell .setup_frm > fieldset:not(.submit) > legend { margin-bottom: 18px !important; }
@media (min-width: 1000px) {
  main#content .leave-form-shell .setup_frm > fieldset:not(.submit) > .item:has(#detail) textarea,
  main#content .leave-form-shell .setup_frm > fieldset:not(.submit) > .item:has(#communication) textarea { height: 150px; min-height: 150px; }
}
