:root{--bg:#f3f5f8;--panel:#fff;--text:#1f2937;--muted:#6b7280;--line:#dce2e8;--accent:#2563eb;--accent-dark:#1d4ed8;--sidebar:#182235;--sidebar-hover:#28364f;--danger:#b91c1c;--success:#15803d;--warning:#a16207}*{box-sizing:border-box}body{margin:0;font-family:"Segoe UI","Yu Gothic UI",sans-serif;background:var(--bg);color:var(--text)}a{color:inherit}button,input,select{font:inherit}.layout{min-height:100vh;display:grid;grid-template-columns:250px 1fr}.sidebar{background:var(--sidebar);color:#fff;padding:20px 15px;display:flex;flex-direction:column;gap:16px}.brand{font-size:20px;font-weight:700;padding:2px 8px 4px}.role-badge{margin:0 8px 6px;width:max-content;padding:4px 9px;border-radius:999px;background:rgba(255,255,255,.12);font-size:12px}.nav{display:grid;gap:6px}.nav a{display:block;text-decoration:none;color:#d8e0eb;border-radius:8px;padding:10px 12px}.nav a:hover{background:var(--sidebar-hover);color:#fff}.nav-section{color:#91a0b5;font-size:12px;padding:12px 12px 2px}.sidebar-footer{margin-top:auto;border-top:1px solid rgba(255,255,255,.12);padding:16px 8px 0;color:#c7d0dc;font-size:13px}.content{padding:28px;overflow-x:auto}.login-shell{min-height:100vh;display:grid;place-items:center;padding:24px;background:linear-gradient(135deg,#edf2ff,#f8fafc)}.login-card{width:min(440px,100%);background:#fff;border:1px solid var(--line);border-radius:16px;padding:32px;box-shadow:0 20px 50px rgba(15,23,42,.12)}.login-card h1{margin:0 0 8px;font-size:24px}.login-card p{margin:0 0 26px;color:var(--muted)}.page-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:20px}.page-header h1{margin:0;font-size:25px}.page-header p{margin:5px 0 0;color:var(--muted);font-size:14px}.panel{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:18px;margin-bottom:18px}.toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:end}.field{margin-bottom:16px}.toolbar .field{margin-bottom:0;min-width:170px}.field label{display:block;margin-bottom:7px;font-size:14px;font-weight:600}.field input,.field select,td input,td select{width:100%;border:1px solid var(--line);border-radius:7px;padding:9px 10px;background:#fff}.button,button{display:inline-block;border:0;border-radius:8px;padding:10px 15px;cursor:pointer;font-weight:600;text-decoration:none}.primary{background:var(--accent);color:#fff}.primary:hover{background:var(--accent-dark)}.secondary{background:#e7ecf2;color:#243041}.danger{background:#fee2e2;color:var(--danger)}.small{padding:7px 10px;margin-top:10px}table{width:100%;border-collapse:collapse;background:#fff}th,td{padding:11px 10px;border-bottom:1px solid var(--line);text-align:left;white-space:nowrap}th{background:#f8fafc;color:#475569;font-size:13px}.num{text-align:right}.summary-grid{display:grid;grid-template-columns:repeat(4,minmax(160px,1fr));gap:14px;margin-bottom:18px}.metric{background:#fff;border:1px solid var(--line);border-radius:12px;padding:18px}.metric .label{color:var(--muted);font-size:13px;margin-bottom:8px}.metric .value{font-size:23px;font-weight:700}.positive{color:var(--success)}.negative{color:var(--danger)}.note{margin-top:10px;color:var(--muted);font-size:13px}.flash{margin-bottom:16px;padding:12px 14px;border-radius:8px}.flash.success{background:#dcfce7;color:#166534}.flash.error{background:#fee2e2;color:#991b1b}.inline-form{display:inline}.actions{display:flex;gap:7px}.right{text-align:right}.muted{color:var(--muted)}@media(max-width:900px){.layout{grid-template-columns:1fr}.sidebar{position:sticky;top:0;z-index:10;padding:12px}.nav{display:flex;overflow-x:auto}.nav a,.nav-section{white-space:nowrap}.sidebar-footer,.role-badge{display:none}.summary-grid{grid-template-columns:repeat(2,1fr)}.content{padding:16px}}@media(max-width:560px){.summary-grid{grid-template-columns:1fr}.page-header{flex-direction:column}}
.hidden{display:none!important}.work-hours-toolbar{justify-content:flex-end;margin-bottom:12px}


.checkbox-row{display:flex;gap:18px;align-items:center;min-height:39px}.checkbox-row label{display:flex;gap:6px;align-items:center;margin:0;font-weight:400}.checkbox-row input{width:auto}.employee-table-wrap{overflow-x:auto}.employee-password-row td{background:#f8fafc;padding-top:6px;padding-bottom:10px}.password-reset-form{justify-content:flex-end}.password-reset-form .field{min-width:280px}.panel h2{margin:0 0 14px;font-size:18px}

.daily-date-navigation{display:flex;align-items:end;justify-content:center;gap:12px;flex-wrap:wrap;margin-bottom:18px}.daily-date-form{display:flex;align-items:end;gap:10px}.daily-date-form .field{margin:0}.button.disabled{opacity:.45;cursor:not-allowed;pointer-events:none}.month-status-grid{display:grid;grid-template-columns:repeat(10,minmax(48px,1fr));gap:8px}.day-status{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:54px;border:1px solid var(--line);border-radius:8px;text-decoration:none;background:#fff}.day-status:hover{border-color:var(--accent)}.day-status.entered{background:#ecfdf5;border-color:#86efac}.day-status.selected{outline:2px solid var(--accent);outline-offset:1px}.day-number{font-size:12px;color:var(--muted)}.day-mark{font-size:20px;font-weight:700}.daily-total-line{text-align:right;margin-top:16px;font-size:18px}.daily-hours-input{min-width:110px}.work-project-add-field{min-width:360px!important}@media(max-width:900px){.month-status-grid{grid-template-columns:repeat(7,minmax(42px,1fr))}}@media(max-width:560px){.month-status-grid{grid-template-columns:repeat(5,minmax(42px,1fr))}.work-project-add-field{min-width:100%!important}}

/* 売上管理ガント */
.sales-gantt-filter .field{min-width:190px}.sales-gantt-summary{grid-template-columns:repeat(2,minmax(220px,320px))}.sales-gantt-panel{padding:0;overflow:hidden}.sales-gantt-scroll{overflow:auto;max-width:100%}.sales-gantt-table{width:max-content;min-width:100%;table-layout:fixed}.sales-gantt-table th,.sales-gantt-table td{text-align:center}.sales-gantt-table thead th{position:sticky;top:0;z-index:2}.sales-gantt-company-col{position:sticky!important;left:0;z-index:3!important;width:210px;min-width:210px;max-width:210px;text-align:left!important;background:#fff;overflow:hidden;text-overflow:ellipsis}.sales-gantt-table thead .sales-gantt-company-col{background:#f8fafc}.sales-gantt-project-col{position:sticky!important;left:210px;z-index:3!important;width:260px;min-width:260px;max-width:260px;text-align:left!important;background:#fff}.sales-gantt-table thead .sales-gantt-project-col{background:#f8fafc}.sales-gantt-status-col{position:sticky!important;left:470px;z-index:3!important;width:90px;min-width:90px;background:#fff}.sales-gantt-table thead .sales-gantt-status-col{background:#f8fafc}.sales-gantt-amount-col{position:sticky!important;left:560px;z-index:3!important;width:135px;min-width:135px;background:#fff}.sales-gantt-table thead .sales-gantt-amount-col{background:#f8fafc}.sales-gantt-month-col,.sales-gantt-cell{width:70px;min-width:70px;max-width:70px;border-left:1px solid #e5e7eb}.sales-gantt-project-name{font-weight:600;overflow:hidden;text-overflow:ellipsis}.sales-status{display:inline-block;border-radius:999px;padding:4px 8px;font-size:12px;font-weight:600}.sales-status-proposal{background:#fef3c7;color:#92400e}.sales-status-active{background:#dbeafe;color:#1d4ed8}.sales-status-completed{background:#e5e7eb;color:#374151}.sales-gantt-cell{position:relative;padding:0;height:54px;background:#fff}.sales-gantt-cell.is-period:before{content:"";position:absolute;left:0;right:0;top:50%;height:16px;transform:translateY(-50%)}.sales-gantt-cell.status-proposal:before{background:#fcd34d}.sales-gantt-cell.status-active:before{background:#60a5fa}.sales-gantt-cell.status-completed:before{background:#9ca3af}.sales-gantt-marker{position:relative;z-index:1;font-size:20px;color:#111827}.sales-gantt-bar{position:relative;z-index:1;display:block}.sales-gantt-legend{display:flex;gap:18px;flex-wrap:wrap;padding:14px 18px;border-top:1px solid var(--line);font-size:13px}.sales-gantt-legend span{display:inline-flex;align-items:center;gap:6px}.legend-box{display:inline-block;width:24px;height:10px;border-radius:2px}.legend-box.status-proposal{background:#fcd34d}.legend-box.status-active{background:#60a5fa}.legend-box.status-completed{background:#9ca3af}@media(max-width:900px){.sales-gantt-summary{grid-template-columns:1fr}.sales-gantt-company-col{width:170px;min-width:170px;max-width:170px}.sales-gantt-project-col{left:170px;width:210px;min-width:210px;max-width:210px}.sales-gantt-status-col{left:380px}.sales-gantt-amount-col{left:470px}}

.sales-gantt-status-filter{min-width:300px!important}.sales-gantt-status-filter .checkbox-row{gap:14px;min-height:39px;white-space:nowrap}.sales-gantt-month-col{padding-left:6px;padding-right:6px}
