/* Modern TEPCO workspace layer.
   Keeps the original calculation and report styles intact while upgrading the
   signed-in application chrome, controls, cards, and functional iconography. */

:root{
  --icon-plus:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%3E%3Cpath%20d='M12%205v14M5%2012h14'/%3E%3C/svg%3E");
  --icon-arrow-left:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='m15%2018-6-6%206-6M9%2012h11'/%3E%3C/svg%3E");
  --icon-arrow-right:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='m9%2018%206-6-6-6M15%2012H4'/%3E%3C/svg%3E");
  --icon-check:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='m5%2012%204%204L19%206'/%3E%3C/svg%3E");
  --icon-calculator:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='4'%20y='2'%20width='16'%20height='20'%20rx='2'/%3E%3Cpath%20d='M8%206h8M8%2010h.01M12%2010h.01M16%2010h.01M8%2014h.01M12%2014h.01M16%2014h.01M8%2018h.01M12%2018h.01M16%2018h.01'/%3E%3C/svg%3E");
  --icon-download:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%203v12m0%200%205-5m-5%205-5-5M5%2021h14'/%3E%3C/svg%3E");
  --icon-refresh:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M20%206v5h-5M4%2018v-5h5M6.1%209a7%207%200%200%201%2011.4-2.6L20%2011M4%2013l2.5%204.6A7%207%200%200%200%2017.9%2015'/%3E%3C/svg%3E");
  --icon-trash:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M4%207h16M9%207V4h6v3M7%207l1%2013h8l1-13M10%2011v5M14%2011v5'/%3E%3C/svg%3E");
  --icon-copy:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='8'%20y='8'%20width='12'%20height='12'%20rx='2'/%3E%3Cpath%20d='M16%208V6a2%202%200%200%200-2-2H6a2%202%200%200%200-2%202v8a2%202%200%200%200%202%202h2'/%3E%3C/svg%3E");
  --icon-search:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%3E%3Ccircle%20cx='11'%20cy='11'%20r='7'/%3E%3Cpath%20d='m20%2020-4-4'/%3E%3C/svg%3E");
  --icon-users:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M16%2021v-2a4%204%200%200%200-4-4H6a4%204%200%200%200-4%204v2M9%2011a4%204%200%201%200%200-8%204%204%200%200%200%200%208M22%2021v-2a4%204%200%200%200-3-3.87M16%203.13a4%204%200%200%201%200%207.75'/%3E%3C/svg%3E");
  --icon-logout:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M10%2017l5-5-5-5M15%2012H3M21%2019V5a2%202%200%200%200-2-2h-5'/%3E%3C/svg%3E");
  --icon-file:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M14%202H6a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h12a2%202%200%200%200%202-2V8zM14%202v6h6M8%2013h8M8%2017h6'/%3E%3C/svg%3E");
  --icon-folder:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M3%205h6l2%202h10v12a2%202%200%200%201-2%202H5a2%202%200%200%201-2-2z'/%3E%3C/svg%3E");
  --icon-shield:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%202l8%204v6c0%205-3.4%208.7-8%2010-4.6-1.3-8-5-8-10V6zM9%2012l2%202%204-4'/%3E%3C/svg%3E");
  --icon-building:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M4%2021V4h11v17M15%209h5v12M8%208h3M8%2012h3M8%2016h3M2%2021h20'/%3E%3C/svg%3E");
  --icon-link:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M10%2013a5%205%200%200%200%207.1.1l2-2a5%205%200%200%200-7.1-7.1l-1.1%201.1M14%2011a5%205%200%200%200-7.1-.1l-2%202A5%205%200%200%200%2012%2020l1.1-1.1'/%3E%3C/svg%3E");
  --icon-layers:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='m12%202%209%205-9%205-9-5zM3%2012l9%205%209-5M3%2017l9%205%209-5'/%3E%3C/svg%3E");
  --icon-chart:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M4%2019V9M10%2019V5M16%2019v-7M22%2019H2'/%3E%3C/svg%3E");
}

body.logged-in{
  font-family:"Segoe UI Variable Text","Segoe UI",Inter,Arial,sans-serif;
  font-size:1rem;
  line-height:1.5;
}
body.logged-in main{padding:clamp(18px,3vw,40px);padding-top:26px}
body.logged-in .topbar{padding-top:20px;padding-bottom:20px}
body.logged-in .brand-block{gap:5px}
body.logged-in .brand-identity{gap:14px}
body.logged-in .application-title{font-size:clamp(1.35rem,2vw,1.75rem);letter-spacing:-.025em}
body.logged-in .topbar p{font-size:.94rem}
body.logged-in .user-panel{gap:10px}
body.logged-in .user-panel span{padding:9px 13px;border-radius:999px;font-size:.82rem;font-weight:700}

body.logged-in .card,
body.logged-in .group-dashboard,
body.logged-in .group-project,
body.logged-in .group-risk,
body.logged-in .group-structure,
body.logged-in .group-lines,
body.logged-in .group-zones,
body.logged-in .group-calculated,
body.logged-in .group-protection,
body.logged-in .group-summary,
body.logged-in .group-cost-benefit{
  padding:clamp(18px,2.2vw,28px);
  border-radius:18px;
  box-shadow:0 1px 2px rgba(20,23,26,.04),0 16px 42px rgba(20,23,26,.07);
}
body.logged-in .section-title,
body.logged-in .section-head,
body.logged-in .selected-protection-title{gap:14px;margin-bottom:22px;padding-bottom:16px}
body.logged-in .section-title h2,
body.logged-in .section-head h2,
body.logged-in .selected-protection-title h2{font-size:1.18rem;letter-spacing:-.015em}
body.logged-in .section-title>span{max-width:48ch;font-size:.82rem;font-weight:600;line-height:1.4}

body.logged-in .section-title[data-symbol]::before,
body.logged-in .section-head[data-symbol]::before{
  content:"";
  width:42px;
  height:42px;
  flex-basis:42px;
  border:0;
  border-radius:12px;
  background:#fff2e5;
  box-shadow:inset 0 0 0 1px rgba(244,122,0,.16);
}
body.logged-in .section-title[data-symbol]::after,
body.logged-in .section-head[data-symbol]::after{
  content:"";
  position:absolute;
  width:20px;
  height:20px;
  margin-left:11px;
  background:#d96300;
  -webkit-mask:var(--section-icon,var(--icon-file)) center/contain no-repeat;
  mask:var(--section-icon,var(--icon-file)) center/contain no-repeat;
  pointer-events:none;
}
body.logged-in .section-title,
body.logged-in .section-head{position:relative}
body.logged-in [data-symbol="PR"]{--section-icon:var(--icon-folder)}
body.logged-in [data-symbol="RC"]{--section-icon:var(--icon-refresh)}
body.logged-in [data-symbol="US"]{--section-icon:var(--icon-users)}
body.logged-in [data-symbol="EN"],
body.logged-in [data-symbol="PM"]{--section-icon:var(--icon-shield)}
body.logged-in [data-symbol="PJ"]{--section-icon:var(--icon-folder)}
body.logged-in [data-symbol="RS"],
body.logged-in [data-symbol="CV"]{--section-icon:var(--icon-chart)}
body.logged-in [data-symbol="ST"]{--section-icon:var(--icon-building)}
body.logged-in [data-symbol="LN"]{--section-icon:var(--icon-link)}
body.logged-in [data-symbol="ZN"]{--section-icon:var(--icon-layers)}
body.logged-in [data-symbol="CB"]{--section-icon:var(--icon-calculator)}
body.logged-in [data-symbol="RP"]{--section-icon:var(--icon-file)}

body.logged-in button{
  min-height:42px;
  padding:10px 15px;
  border-radius:10px;
  font-family:inherit;
  font-size:.88rem;
  font-weight:700;
  letter-spacing:.005em;
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease,background .16s ease;
}
body.logged-in button:hover{transform:translateY(-1px)}
body.logged-in button:focus-visible,
body.logged-in summary:focus-visible{outline:3px solid rgba(244,122,0,.25);outline-offset:2px}
body.logged-in button[data-icon]::before,
body.logged-in .ghost[data-icon]::before{
  content:"";
  width:18px;
  height:18px;
  flex:0 0 18px;
  border:0;
  border-radius:0;
  background:currentColor;
  box-shadow:none;
  -webkit-mask:var(--button-icon,var(--icon-file)) center/contain no-repeat;
  mask:var(--button-icon,var(--icon-file)) center/contain no-repeat;
}
body.logged-in [data-icon="+"]{--button-icon:var(--icon-plus)}
body.logged-in [data-icon="←"]{--button-icon:var(--icon-arrow-left)}
body.logged-in [data-icon="→"]{--button-icon:var(--icon-arrow-right)}
body.logged-in [data-icon="✓"]{--button-icon:var(--icon-check)}
body.logged-in [data-icon="="]{--button-icon:var(--icon-calculator)}
body.logged-in [data-icon="⇩"]{--button-icon:var(--icon-download)}
body.logged-in [data-icon="↻"],
body.logged-in [data-icon="⟳"]{--button-icon:var(--icon-refresh)}
body.logged-in [data-icon="×"],
body.logged-in [data-icon="x"]{--button-icon:var(--icon-trash)}
body.logged-in [data-icon="⧉"]{--button-icon:var(--icon-copy)}
body.logged-in [data-icon="⌕"]{--button-icon:var(--icon-search)}
body.logged-in [data-icon="USR"]{--button-icon:var(--icon-users)}
body.logged-in [data-icon="OUT"]{--button-icon:var(--icon-logout)}
body.logged-in #logoutBtn::before,
body.logged-in #userManagementBtn::before,
body.logged-in #restoreProjectsBtn::before,
body.logged-in #calculateBtn::before,
body.logged-in #exportBtn::before{content:""}

body.logged-in .toolbar{
  top:12px;
  z-index:20;
  gap:9px;
  margin-bottom:22px;
  padding:10px;
  border-radius:15px;
  background:rgba(35,38,41,.93);
  box-shadow:0 14px 32px rgba(18,20,22,.2);
  backdrop-filter:blur(18px) saturate(140%);
}
body.logged-in .report-output-menu summary{
  min-height:42px;
  border-radius:10px;
  font-family:inherit;
  font-size:.88rem;
  font-weight:700;
}
body.logged-in .report-output-menu summary::before{
  content:"";
  width:18px;
  height:18px;
  border:0;
  border-radius:0;
  background:#fff;
  box-shadow:none;
  -webkit-mask:var(--icon-file) center/contain no-repeat;
  mask:var(--icon-file) center/contain no-repeat;
}
body.logged-in .report-output-dropdown{border-radius:14px;box-shadow:0 20px 50px rgba(20,23,26,.18)}
body.logged-in .selected-protection-title .title-icon{
  position:relative;
  width:42px;
  height:42px;
  border:0;
  border-radius:12px;
  background:#fff2e5;
  color:transparent;
  box-shadow:inset 0 0 0 1px rgba(244,122,0,.16);
  font-size:0;
}
body.logged-in .selected-protection-title .title-icon::before{
  content:"";
  width:20px;
  height:20px;
  background:#d96300;
  -webkit-mask:var(--icon-shield) center/contain no-repeat;
  mask:var(--icon-shield) center/contain no-repeat;
}

body.logged-in label{gap:8px;font-size:.875rem;font-weight:650;letter-spacing:0}
body.logged-in input,
body.logged-in select{
  height:44px;
  padding:10px 12px;
  border-radius:10px;
  font-family:inherit;
  font-size:.94rem;
  transition:border-color .15s ease,box-shadow .15s ease,background .15s ease;
}
body.logged-in input:focus,
body.logged-in select:focus{outline:0;box-shadow:0 0 0 3px rgba(244,122,0,.14)}
body.logged-in input[type="checkbox"],
body.logged-in input[type="radio"]{width:19px;height:19px;min-height:19px;accent-color:#ef7808}
body.logged-in .check-option{min-height:48px;padding:12px 14px;border-radius:12px;font-size:.9rem}
body.logged-in fieldset,
body.logged-in .ng-panel,
body.logged-in .adjacent-card,
body.logged-in .adjacent-parameters,
body.logged-in .location-panel,
body.logged-in .zone-card,
body.logged-in .protection-panel{border-radius:14px}
body.logged-in .unit-field{min-height:44px;border-radius:10px}
body.logged-in .unit-field input{height:42px}
body.logged-in .segmented-control{padding:4px;border-radius:12px}
body.logged-in .segmented-control button{min-height:36px;border-radius:8px}

body.logged-in #dashboardPage .project-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,360px),1fr));gap:18px}
body.logged-in #dashboardPage .project-card{
  min-height:190px;
  padding:22px;
  border-radius:15px;
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
body.logged-in #dashboardPage .project-card::before{width:5px}
body.logged-in #dashboardPage .project-card h3{font-size:1.08rem;letter-spacing:-.01em}
body.logged-in #dashboardPage .project-card p{font-size:.875rem;line-height:1.55;color:#626a71}
body.logged-in #dashboardPage .project-card:hover{transform:translateY(-3px);box-shadow:0 18px 38px rgba(20,23,26,.11)}
body.logged-in .empty{padding:38px;border-radius:14px;font-size:.94rem}

body.logged-in .table-wrap,
body.logged-in .summary-result-table{border-radius:14px}
body.logged-in th,
body.logged-in td{padding:10px 12px;font-size:.84rem}
body.logged-in th{font-size:.76rem;font-weight:750;letter-spacing:.035em}
body.logged-in tbody tr{transition:background .12s ease}
body.logged-in tbody tr:hover td{background:#fff8f1}
body.logged-in .kpi{padding:15px;border-radius:12px}
body.logged-in .kpi small{font-size:.76rem}
body.logged-in .kpi strong{font-size:1.2rem}
body.logged-in .protection-panel-head{padding:12px 15px;border-radius:13px 13px 0 0}
body.logged-in .protection-status,
body.logged-in .summary-flow-panel,
body.logged-in .summary-lines-panel,
body.logged-in .zone-preview{padding:14px 16px;border-radius:12px}

/* Keep controls aligned when one damage-factor label wraps to two lines. */
body.logged-in .line-damage-grid{
  align-items:stretch;
  grid-auto-rows:minmax(92px,auto);
}
body.logged-in .line-damage-grid>label{
  min-height:92px;
  justify-content:flex-end;
}
body.logged-in .line-damage-grid>label>input,
body.logged-in .line-damage-grid>label>select{
  flex:0 0 44px;
}

@media(max-width:900px){
  body.logged-in main{padding:16px}
  body.logged-in .topbar{padding:18px 20px}
  body.logged-in .application-title{font-size:1.35rem}
  body.logged-in .toolbar{top:8px}
  body.logged-in .section-title,
  body.logged-in .section-head{display:grid;grid-template-columns:42px 1fr;align-items:center}
  body.logged-in .section-title::after,
  body.logged-in .section-head::after{top:11px;left:0}
  body.logged-in .section-title h2,
  body.logged-in .section-head h2{grid-column:2;margin:0}
  body.logged-in .section-title>span{grid-column:2;text-align:left;margin:0}
  body.logged-in .section-head .project-actions{grid-column:1/-1;width:100%}
  body.logged-in .section-head .project-actions button{flex:1 1 190px}
  body.logged-in .line-damage-grid{grid-auto-rows:auto}
  body.logged-in .line-damage-grid>label{min-height:0;justify-content:flex-start}
}

@media(max-width:560px){
  body.logged-in .card,
  body.logged-in .group-dashboard,
  body.logged-in .group-project,
  body.logged-in .group-risk,
  body.logged-in .group-structure,
  body.logged-in .group-lines,
  body.logged-in .group-zones,
  body.logged-in .group-calculated,
  body.logged-in .group-protection,
  body.logged-in .group-summary,
  body.logged-in .group-cost-benefit{padding:17px;border-radius:14px}
  body.logged-in .toolbar{position:static}
  body.logged-in .toolbar>*{flex:1 1 145px}
  body.logged-in .toolbar #saveBtn{margin-left:0}
  body.logged-in .report-output-menu summary{width:100%}
  body.logged-in .project-actions{gap:8px}
  body.logged-in .project-actions button{min-width:0}
}

@media(prefers-reduced-motion:reduce){
  body.logged-in *,
  body.logged-in *::before,
  body.logged-in *::after{scroll-behavior:auto!important;transition:none!important}
}

@media print{
  body.logged-in{font-family:Arial,Helvetica,sans-serif;font-size:14px}
}
