/* AI社員 管理画面：水色・青緑を基調にした、明るく親しみやすい見た目 */
:root{
  --bg:#F2F8FB; --card:#FFFFFF; --line:#DDECF2; --ink:#17303A; --sub:#3E5963; --mute:#55707A;
  --teal:#0E7C86; --teal-d:#0B6E77; --teal-l:#E0F4F5; --sky:#38BDF8; --sun:#FDE68A;
  --ok:#15803D; --ok-l:#DCFCE7; --warn:#B45309; --warn-l:#FEF3C7; --ng:#B23A0A; --ng-l:#FFEDD5;
  --round:'M PLUS Rounded 1c','Noto Sans JP',sans-serif;
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font-family:'Noto Sans JP',system-ui,sans-serif;font-size:15px;line-height:1.6}
a{color:var(--teal-d)} a:hover{color:#084C52}
h1,h2,h3{font-family:var(--round);font-weight:800;margin:0;line-height:1.4}
h1{font-size:26px} h2{font-size:19px} h3{font-size:16px}
.layout{display:flex;flex-wrap:wrap;min-height:100vh}
.side{flex:1 1 220px;max-width:250px;background:#fff;border-right:1px solid var(--line);padding:22px 14px;display:flex;flex-direction:column;gap:4px}
.brand{display:flex;align-items:center;gap:10px;padding:0 8px 22px}
.brand b{font-family:var(--round);font-weight:800;font-size:16px;display:block}
.brand small{font-size:12px;color:var(--mute)}
.nav{display:flex;align-items:center;gap:12px;min-height:46px;padding:0 12px;border-radius:12px;color:var(--sub);text-decoration:none;font-weight:500}
.nav:hover{background:var(--bg);color:var(--ink)}
.nav.on{background:var(--teal-l);color:#0B5F67;font-weight:700}
.nav span{flex-grow:1}
.badge{background:#F59E0B;color:#3A2300;font-size:12px;font-weight:700;border-radius:999px;padding:1px 8px}
.side-foot{margin-top:auto;background:var(--bg);border-radius:12px;padding:12px;font-size:12px;color:var(--sub)}
.side-foot button{margin-top:8px}
.main{flex:999 1 560px;min-width:0;padding:24px 28px 48px;display:flex;flex-direction:column;gap:22px;max-width:1220px}
.card{background:var(--card);border:1px solid var(--line);border-radius:20px;padding:20px 22px}
.row{display:flex;flex-wrap:wrap;gap:18px;align-items:stretch}
.row>*{flex:1 1 360px;min-width:0}
.head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:10px}
.muted{color:var(--mute);font-size:13px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:0 20px;border-radius:12px;border:0;background:var(--teal);color:#fff;font-family:inherit;font-size:15px;font-weight:700;text-decoration:none;cursor:pointer}
.btn:hover{background:#0B6A73;color:#fff}
.btn.line{background:#fff;color:var(--ink);border:1px solid #C9DDE5;font-weight:500}
.btn.ok{background:var(--ok)} .btn.stop{background:#fff;color:var(--ng);border:2px solid #C2410C}
.btn.ng{background:#fff;color:#B91C1C;border:1px solid #B91C1C;font-weight:500}
.btn.small{min-height:40px;padding:0 14px;font-size:14px}
.pill{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:700;border-radius:999px;padding:2px 10px;background:var(--ok-l);color:#166534;white-space:nowrap}
.pill.warn{background:var(--warn-l);color:#7A4A00} .pill.ng{background:#FEE2E2;color:#991B1B} .pill.gray{background:#E6EEF2;color:var(--sub)}
.dot{width:9px;height:9px;border-radius:50%;display:inline-block}
.notice{border-radius:14px;padding:12px 16px;font-weight:500}
.notice.ok{background:var(--ok-l);color:#166534} .notice.ng{background:var(--ng-l);color:#7C2D12;border:1px solid #FDBA74}

/* ホーム */
.hero{background:#DFF3F7;border-radius:24px;padding:24px 28px;display:flex;flex-wrap:wrap;align-items:center;gap:20px}
.hero .text{flex:1 1 340px;min-width:0;display:flex;flex-direction:column;gap:12px}
.hero svg{flex:0 1 380px;max-width:100%;height:auto}
.state{display:inline-flex;align-items:center;gap:8px;background:#fff;border-radius:999px;padding:6px 14px;font-size:14px;font-weight:700}
.actions{display:flex;flex-wrap:wrap;gap:10px}
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px}
.tile{background:#fff;border:1px solid var(--line);border-radius:20px;padding:18px;text-decoration:none;color:var(--ink);display:flex;flex-direction:column;gap:12px;min-height:170px}
.tile:hover{border-color:#9ED3DD;color:var(--ink);box-shadow:0 4px 14px rgba(14,124,134,.08)}
.tile .top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.tile .lbl{display:flex;align-items:center;gap:10px;font-weight:700}
.ic{width:42px;height:42px;border-radius:13px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.tile .val{font-family:var(--round);font-size:34px;font-weight:800;line-height:1.1}
.tile .val small{font-size:15px;color:var(--mute);font-weight:700}
.tile .mid{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;flex-grow:1}
.tile .more{font-size:13px;font-weight:500;color:var(--teal-d)}
.floor{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
.bot{text-decoration:none;color:var(--ink);border-radius:20px;padding:14px 12px 16px;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center}
.bot.dim{opacity:.8}
.bubble{background:#fff;border-radius:12px;padding:4px 10px;font-size:12px;color:var(--sub);min-height:18px}
.av{position:relative;width:84px;height:84px}
.av .tool{position:absolute;right:-4px;bottom:2px;width:30px;height:30px;border-radius:50%;background:#fff;display:flex;align-items:center;justify-content:center}
.alert{display:flex;gap:12px;align-items:flex-start;text-decoration:none;color:var(--ink);border-radius:14px;padding:12px 14px}
.alert .ic{width:34px;height:34px;border-radius:10px;background:#fff}
.alert b{display:block;font-size:14px} .alert span{font-size:12px;color:var(--sub)}
.tl{list-style:none;margin:0;padding:0}
.tl li{display:flex;gap:12px}
.tl .t{width:42px;flex-shrink:0;font-size:13px;color:var(--sub);font-weight:500}
.tl .rail{display:flex;flex-direction:column;align-items:center;flex-shrink:0}
.tl .rail i{width:12px;height:12px;border-radius:50%;margin-top:5px;border:2px solid #fff}
.tl .rail em{width:2px;flex-grow:1;background:var(--line);min-height:20px}
.tl .x{padding-bottom:12px;font-size:14px}

/* 承認 */
.split{display:flex;flex-wrap:wrap;gap:20px;align-items:flex-start}
.list{flex:2 1 300px;min-width:0;display:flex;flex-direction:column;gap:10px}
.item{display:flex;flex-direction:column;gap:6px;background:#fff;border:2px solid var(--line);border-radius:18px;padding:14px 16px;text-decoration:none;color:var(--ink)}
.item.on{border-color:var(--teal)}
.item b{font-size:15px;line-height:1.5}
.detail{flex:3 1 440px;min-width:0;display:flex;flex-direction:column;gap:16px}
.prose{font-size:15px;line-height:1.85;color:var(--sub);overflow-x:auto}
.prose table{border-collapse:collapse;width:100%;font-size:14px}
.prose th,.prose td{border-top:1px solid var(--line);padding:8px 10px;text-align:left}
.prose th{background:var(--bg);font-weight:500}
.prose h1,.prose h2,.prose h3{color:var(--ink);margin:14px 0 6px}
.prose pre{background:var(--bg);padding:12px;border-radius:10px;overflow-x:auto}
.decide{display:flex;flex-direction:column;gap:12px;border-top:1px solid var(--line);padding-top:16px}
.decide .btns{display:flex;flex-wrap:wrap;gap:10px}
.decide .btns .btn{flex:1 1 150px;min-height:52px;font-size:16px}
label{font-size:14px;font-weight:500}
textarea,input[type=text],input[type=password]{width:100%;font-family:inherit;font-size:16px;padding:12px;border:1px solid #C9DDE5;border-radius:12px;background:#fff;color:var(--ink)}
textarea{resize:vertical;min-height:90px}
.tabs{display:flex;gap:8px;flex-wrap:wrap}
.tab{min-height:40px;display:inline-flex;align-items:center;padding:0 16px;border-radius:999px;border:1px solid #C9DDE5;background:#fff;color:var(--ink);text-decoration:none;font-size:14px}
.tab.on{background:var(--teal);border-color:var(--teal);color:#fff}

/* 社員 */
.emps{display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:16px}
.bar{display:flex;height:14px;border-radius:999px;overflow:hidden;gap:2px;background:#E6EEF2}
.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.stat{background:var(--bg);border-radius:12px;padding:10px 12px}
.stat small{display:block;font-size:12px;color:var(--mute)} .stat b{font-size:18px}
details summary{cursor:pointer;font-weight:500;color:var(--teal-d);min-height:32px}
pre.plain{white-space:pre-wrap;background:var(--bg);border-radius:10px;padding:12px;font-family:inherit;font-size:13px;margin:8px 0 0}

/* 費用 */
.chart{display:flex;align-items:flex-end;gap:4px;height:170px;border-bottom:1px solid var(--line)}
.chart .col{flex:1 1 0;display:flex;flex-direction:column-reverse;gap:1px;height:100%}
.chart .col i{display:block;border-radius:3px}
.xlab{display:flex;gap:4px;font-size:10px;color:var(--mute)}
.xlab span{flex:1 1 0;text-align:center;overflow:hidden}

/* ログイン */
.login{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:20px}
.login form{width:100%;max-width:380px;display:flex;flex-direction:column;gap:12px}

@media (max-width:700px){
  .side{max-width:none;flex-basis:100%;flex-direction:row;flex-wrap:wrap;padding:10px;border-right:0;border-bottom:1px solid var(--line)}
  .brand{padding:0 6px;width:100%}
  .nav{min-height:44px;padding:0 10px;font-size:14px}
  .nav svg{display:none}
  .side-foot{display:none}
  .main{padding:16px 14px 40px}
  .hero{padding:20px}
  .hero svg{display:none}
  h1{font-size:22px}
}

/* ---- 動き（遊び心）：ロボットはゆっくり揺れて、ときどきまばたき ---- */
@keyframes bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
@keyframes blink{0%,92%,100%{transform:scaleY(1)}95%{transform:scaleY(.1)}}
@keyframes tip{0%,100%{opacity:1}50%{opacity:.35}}
@keyframes drift{0%{transform:translateX(0)}50%{transform:translateX(18px)}100%{transform:translateX(0)}}
@keyframes draw{from{stroke-dashoffset:160}to{stroke-dashoffset:0}}
@keyframes sunglow{0%,100%{transform:scale(1)}50%{transform:scale(1.06)}}
@keyframes zz{0%{opacity:0;transform:translate(0,0)}30%{opacity:1}100%{opacity:0;transform:translate(8px,-14px)}}
@keyframes shake{0%,100%{transform:rotate(0)}25%{transform:rotate(-4deg)}75%{transform:rotate(4deg)}}
/* 気づいてほしい所：やわらかく光る（速い点滅はしない） */
@keyframes glow{0%,100%{box-shadow:0 0 0 0 rgba(245,158,11,0)}50%{box-shadow:0 0 0 6px rgba(245,158,11,.28)}}
@keyframes glowred{0%,100%{box-shadow:0 0 0 0 rgba(194,65,12,0)}50%{box-shadow:0 0 0 5px rgba(194,65,12,.22)}}
@keyframes dot{0%,100%{opacity:1}50%{opacity:.25}}
@keyframes pop{0%,100%{transform:scale(1)}50%{transform:scale(1.15)}}

.hero .hbot{transform-box:fill-box;transform-origin:center bottom;animation:bob 3.2s ease-in-out infinite}
.hero .hbot.b2{animation-delay:-1.4s}
svg .eyes{transform-box:fill-box;transform-origin:center;animation:blink 5s infinite}
.hero .b2 .eyes{animation-delay:-2.2s}
svg .tip{animation:tip 2.4s ease-in-out infinite}
.hero .cloud{animation:drift 14s ease-in-out infinite}
.hero .cloud.c2{animation-duration:18s;animation-delay:-6s}
.hero .sun{transform-box:fill-box;transform-origin:center;animation:sunglow 6s ease-in-out infinite}
.hero .chart{stroke-dasharray:160;animation:draw 2.2s ease-out 1 both}
.hero.is-stopped .hbot,.hero.is-stopped .eyes,.hero.is-stopped .tip,.hero.is-stopped .cloud{animation:none}
.hero .zz{animation:zz 2.6s ease-out infinite}
.hero .zz.z2{animation-delay:-1.3s}

.bot .av>svg{animation:bob 3.6s ease-in-out infinite}
.floor .bot:nth-child(2n) .av>svg{animation-delay:-1.2s}
.floor .bot:nth-child(3n) .av>svg{animation-delay:-2.1s}
.floor .bot:nth-child(2n) .eyes{animation-delay:-1.7s}
.floor .bot:nth-child(3n) .eyes{animation-delay:-3.1s}
.bot:hover .av>svg{animation:shake .5s ease-in-out 2}
.bot.dim .av>svg,.bot.dim .eyes,.bot.dim .tip,.bot.sleep .av>svg,.bot.sleep .eyes,.bot.sleep .tip{animation:none}
.bot.sleep .eyes{transform:scaleY(.15)}
.bot.trouble .av>svg{animation:shake 1.2s ease-in-out infinite}

.tile.attn{border-color:#F6C66B;animation:glow 2.4s ease-in-out infinite}
.alert.attn{animation:glowred 2.6s ease-in-out infinite}
.btn.attn{animation:glow 2.4s ease-in-out infinite}
.badge.pulse{animation:pop 1.8s ease-in-out infinite;display:inline-block}
.blink-dot{width:7px;height:7px;border-radius:50%;background:currentColor;display:inline-block;animation:dot 1.6s ease-in-out infinite}

/* 動きを減らす設定の端末では、すべて止める */
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

/* ホームの見出しの件数：押すと承認・気になることへ */
.hero-links{font-size:13px;color:#2F5561}
.hero-links a{color:#0F5E6E;font-weight:700;text-decoration:underline;text-underline-offset:3px}
.hero-links a:hover,a.state:hover{opacity:.8}
html{scroll-behavior:smooth}
#h-alert{scroll-margin-top:80px}
#h-alert:target{animation:glow 1.6s ease-in-out 2}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}#h-alert:target{animation:none}}
