:root{
  --bg:#000; --surface:#1c1c1e; --surface2:#2c2c2e; --line:#2e2e30;
  --txt:#fff; --txt2:#8e8e93; --txt3:#636366;
  --green:#1fbf8f; --green-bright:#30d158;
  --blue:#3f7fd6; --ev-green:#2fa463; --ev-brown:#9c7a1e; --ev-red:#7a2e2e;
  --purple:#9b6ddb;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent;margin:0;padding:0}
html,body{height:100%}
body{
  background:var(--bg);color:var(--txt);
  font-family:-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Malgun Gothic","Noto Sans KR",sans-serif;
  font-size:15px;line-height:1.4;-webkit-font-smoothing:antialiased;
  overscroll-behavior:none;
}
#app{max-width:480px;margin:0 auto;min-height:100%;display:flex;flex-direction:column;position:relative}

/* 상태바 */
.statusbar{display:flex;justify-content:space-between;align-items:center;padding:8px 22px 4px;font-size:14px;font-weight:600}
.sb-right{display:flex;align-items:center;gap:6px}
.sb-batt{width:24px;height:12px;border:1px solid #fff;border-radius:3px;position:relative;display:inline-block}
.sb-batt b{position:absolute;inset:2px;width:60%;background:#fff;border-radius:1px}
.sb-batt::after{content:"";position:absolute;right:-3px;top:3px;width:2px;height:6px;background:#fff;border-radius:0 1px 1px 0}

/* 화면 전환 */
#screens{flex:1;position:relative}
.screen{display:none;flex-direction:column;padding-bottom:84px}
.screen.active{display:flex}

/* 탑바 */
.topbar{display:flex;align-items:center;justify-content:space-between;padding:10px 18px 12px}
.topbar h1{font-size:24px;font-weight:800;letter-spacing:-.5px}
.topbar.detail{padding:6px 12px 10px}
.title-row.center{flex:1;text-align:center}
.title-row.center h1{font-size:17px;font-weight:700;color:var(--green)}
.title-row.center .sub{font-size:12px;color:var(--txt2)}
.detail-mini{color:var(--green)!important;font-size:16px!important}
.caret{font-size:14px;color:var(--txt2)}
.top-actions{display:flex;gap:14px}
.ic-btn{background:none;border:none;color:var(--txt);font-size:20px}
.star-circle{background:var(--surface2);width:34px;height:34px;border-radius:50%;font-size:16px;color:var(--green)}
.back{background:none;border:none;color:var(--green);font-size:30px;line-height:1;width:34px}

/* 캘린더 칩 */
.cal-chips{display:flex;gap:8px;overflow-x:auto;padding:2px 14px 12px;scrollbar-width:none}
.cal-chips::-webkit-scrollbar{display:none}
.chip{display:flex;align-items:center;gap:6px;background:var(--surface);padding:7px 12px;border-radius:10px;white-space:nowrap;font-size:13px;flex-shrink:0}
.chip .sw{width:18px;height:18px;border-radius:5px;display:grid;place-items:center;font-size:9px;font-weight:800;color:#fff}
.chip.on{background:#3a3a3c;font-weight:700}

/* 요일 */
.weekdays{display:grid;grid-template-columns:repeat(7,1fr);text-align:center;font-size:12px;color:var(--txt2);padding:0 4px 4px;border-bottom:1px solid var(--line)}
.weekdays .sun{color:#ff6b6b}.weekdays .sat{color:#5b9cff}

/* 월 그리드 */
.month-grid{display:grid;grid-template-columns:repeat(7,1fr);flex:1}
.cell{border-right:1px solid #161618;border-bottom:1px solid #161618;min-height:104px;padding:2px 2px 0;overflow:hidden}
.cell:nth-child(7n){border-right:none}
.cell .dnum{font-size:12px;font-weight:600;padding:2px 3px 1px;display:flex;justify-content:space-between}
.cell .lunar{font-size:8px;color:var(--txt3);font-weight:400}
.cell.sun .dnum>span:first-child,.cell.holi .dnum>span:first-child{color:#ff6b6b}
.cell.sat .dnum>span:first-child{color:#5b9cff}
.cell.other{opacity:.35}
.cell.today .dnum>span:first-child{background:#fff;color:#000;border-radius:50%;width:18px;height:18px;display:inline-flex;align-items:center;justify-content:center}
.ev{font-size:9.5px;line-height:1.25;color:#fff;border-radius:3px;padding:1px 3px;margin-bottom:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ev.blue{background:var(--blue)}.ev.green{background:var(--ev-green)}
.ev.brown{background:var(--ev-brown)}.ev.red{background:var(--ev-red)}
.ev.span{border-radius:3px}
.more-mini{font-size:8.5px;color:var(--txt2);padding-left:3px}

/* FAB */
.fab{position:fixed;right:calc(50% - 240px + 18px);bottom:96px;width:56px;height:56px;border-radius:50%;background:#48484a;color:#fff;border:none;font-size:30px;box-shadow:0 4px 14px rgba(0,0,0,.5);z-index:20}
@media(max-width:480px){.fab{right:18px}}

/* 배너/세그 */
.banner-info{background:var(--surface);margin:0 14px 12px;padding:14px 16px;border-radius:12px;font-size:13.5px;color:#d1d1d6}
.seg{display:flex;justify-content:center;gap:36px;border-bottom:1px solid var(--line);padding:0 14px}
.seg-item{padding:12px 4px;font-size:15px;color:var(--txt2)}
.seg-item.active{color:var(--txt);font-weight:700;border-bottom:2px solid var(--green);margin-bottom:-1px}
.list-count{padding:14px 18px 6px;font-size:13px;color:var(--txt2)}

/* 캘린더 리스트 */
.cal-list{padding:0 14px}
.cal-row{display:flex;align-items:center;gap:14px;padding:14px 4px;border-bottom:1px solid #161618}
.cal-thumb{width:60px;height:48px;border-radius:10px;flex-shrink:0;display:grid;place-items:center;font-size:13px;font-weight:900;text-align:center;line-height:1.05;color:#fff;padding:3px}
.cal-meta{flex:1;min-width:0}
.cal-meta .nm{font-size:16px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cal-meta .avs{display:flex;gap:3px;margin-top:7px}
.badge-new{background:#c0392b;color:#fff;font-size:10px;font-weight:700;padding:2px 7px;border-radius:8px}
.chev{color:var(--txt3);font-size:20px}
.mini-av{width:20px;height:20px;border-radius:50%;font-size:9px;display:grid;place-items:center;color:#fff;font-weight:700}

/* 알림 */
.noti-list{padding:12px 14px}
.noti-card{background:var(--surface);border-radius:14px;padding:14px 14px 8px;margin-bottom:14px;border-left:3px solid var(--green)}
.noti-card .ev-title{font-size:15px;font-weight:700;margin-bottom:4px}
.noti-card .ev-sub{font-size:12.5px;color:var(--txt2);margin-bottom:2px}
.noti-card .ev-cal{font-size:12px;color:var(--green)}
.log-row{display:flex;align-items:center;gap:10px;padding:9px 0 4px;border-top:1px solid #2e2e30;margin-top:10px}
.log-row:first-of-type{border-top:1px solid #2e2e30}
.log-av{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;font-size:11px;color:#fff;font-weight:700;flex-shrink:0}
.log-txt{flex:1;font-size:13.5px}
.log-time{font-size:11.5px;color:var(--txt2)}

/* 더보기 */
.promo{background:linear-gradient(135deg,#1fbf8f,#149c74);margin:4px 14px 16px;border-radius:16px;padding:26px 20px;min-height:120px;display:flex;align-items:center}
.promo-text{font-size:20px;font-weight:800;line-height:1.35}
.grid-menu{display:grid;grid-template-columns:repeat(3,1fr);background:var(--surface);margin:0 14px;border-radius:14px;overflow:hidden}
.gm{padding:20px 0;text-align:center;font-size:13px;color:#d1d1d6;border-right:1px solid #161618;border-bottom:1px solid #161618}
.gm:nth-child(3n){border-right:none}
.gm-ic{display:block;font-size:24px;margin-bottom:8px;filter:saturate(1.2)}
.section-label{padding:22px 18px 8px;font-size:12px;color:var(--txt2)}
.account-card{display:flex;align-items:center;gap:14px;background:var(--surface);margin:0 14px;border-radius:14px;padding:16px}
.acc-info{flex:1}.acc-info b{display:block;font-size:16px}.acc-info span{font-size:12.5px;color:var(--txt2)}
.avatar.big{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;font-weight:800;font-size:18px;color:#fff}
.setting-row{display:flex;justify-content:space-between;align-items:center;background:var(--surface);margin:8px 14px 0;border-radius:12px;padding:16px}
.set-val{color:var(--txt2);font-size:14px}
.mock-tag{text-align:center;color:#c08a2b;font-size:12px;margin:24px 14px}

/* 일별 목록 */
.day-list{padding:6px 0}
.day-ev{display:flex;gap:12px;padding:12px 16px;border-bottom:1px solid #161618}
.day-ev .when{width:48px;flex-shrink:0;font-size:11px;color:var(--txt2);text-align:center;padding-top:2px}
.day-ev .bar{width:3px;border-radius:2px;flex-shrink:0}
.day-ev .body{flex:1;min-width:0}
.day-ev .et{font-size:15px;font-weight:600;margin-bottom:3px}
.day-ev .es{font-size:12.5px;color:var(--txt2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.day-ev .tag-av{width:30px;height:30px;border-radius:50%;background:var(--purple);display:grid;place-items:center;font-size:12px;font-weight:700;flex-shrink:0}

/* 상세 */
.detail-body{padding:8px 0 90px}
.detail-tag{text-align:center;margin:14px 0}
.detail-tag .pill{display:inline-grid;place-items:center;width:42px;height:42px;border-radius:50%;background:var(--purple);font-size:16px;font-weight:700}
.detail-title{text-align:center;font-size:22px;font-weight:800;padding:6px 20px;line-height:1.3}
.detail-date{text-align:center;font-size:17px;font-weight:700;padding:10px 0 18px}
.detail-content{padding:16px;border-top:1px solid var(--line);font-size:14.5px;line-height:1.7;white-space:pre-wrap;color:#e5e5ea}
.detail-content a{color:#5b9cff;text-decoration:underline}
.meta-row{display:flex;align-items:center;gap:14px;padding:16px;border-top:1px solid var(--line);font-size:14.5px}
.meta-row .mi{color:var(--blue);font-size:18px}
.log-block{padding:16px;border-top:1px solid var(--line)}
.log-block h4{font-size:12px;color:var(--txt2);margin-bottom:10px;font-weight:600}
.foot-log{text-align:center;color:var(--txt2);font-size:13px;padding:20px 0}
.foot-log .pc{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--purple);font-size:10px;vertical-align:middle;margin-right:4px}

/* 액션바 */
.action-bar{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:480px;display:flex;align-items:center;gap:8px;padding:12px 18px calc(12px + env(safe-area-inset-bottom));background:#111;border-top:1px solid var(--line)}
.action-bar button{background:var(--surface2);border:none;color:#fff;width:42px;height:42px;border-radius:50%;font-size:18px}
.action-bar .reply{flex:1;width:auto;border-radius:22px;font-size:14px;color:var(--txt2);text-align:left;padding-left:18px}

/* 탭바 */
.tabbar{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:480px;display:flex;background:#0a0a0a;border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom);z-index:30}
.tab{flex:1;background:none;border:none;color:var(--txt2);padding:8px 0 10px;display:flex;flex-direction:column;align-items:center;gap:3px;font-size:11px;position:relative}
.tab .t-ic{font-size:21px;filter:grayscale(1) opacity(.7)}
.tab.active{color:var(--green)}
.tab.active .t-ic{filter:none}
.noti-dot::after{content:"";position:absolute;top:-2px;right:-4px;width:7px;height:7px;background:#ff3b30;border-radius:50%}
.tab .noti-dot{position:relative}

/* ===== 확장 화면 (로그인/보고서/고객) ===== */
/* 공통 버튼 */
.btn-primary{width:100%;background:var(--green);color:#fff;border:none;border-radius:12px;padding:16px;font-size:16px;font-weight:700}
.btn-warn{width:100%;background:#e2674a;color:#fff;border:none;border-radius:12px;padding:16px;font-size:16px;font-weight:700}
.btn-warn.full{margin-top:20px}
.sticky-btn{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:480px;padding:12px 16px calc(14px + env(safe-area-inset-bottom));background:#0a0a0a;border-top:1px solid var(--line)}

/* 로그인 */
.login-wrap{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 32px;text-align:center;min-height:80vh}
.login-logo{width:88px;height:88px;border-radius:22px;margin-bottom:20px}
.login-title{font-size:26px;font-weight:800}
.login-sub{color:var(--txt2);margin:6px 0 40px}
.btn-google{width:100%;max-width:320px;background:#fff;color:#1a1a1a;border:none;border-radius:12px;padding:15px;font-size:16px;font-weight:700;display:flex;align-items:center;justify-content:center;gap:10px;margin-bottom:12px}
.btn-google .g{font-weight:900;color:#4285f4}
.btn-phone{width:100%;max-width:320px;background:var(--surface2);color:#fff;border:none;border-radius:12px;padding:15px;font-size:16px;font-weight:600}
.login-note{color:var(--txt3);font-size:12.5px;margin-top:28px;line-height:1.6}

/* 보고서 작성 */
.report-edit{padding:8px 16px 96px}
.re-site{background:var(--surface);border-radius:12px;padding:14px;font-size:13.5px;color:#d1d1d6;margin-bottom:18px}
.re-section{margin-bottom:24px}
.re-section h3{font-size:15px;font-weight:700;margin-bottom:12px}
.photo-group{margin-bottom:14px}
.pg-label{font-size:13px;color:var(--txt2);margin-bottom:8px}
.pg-thumbs{display:flex;gap:10px}
.thumb{width:84px;height:84px;border-radius:10px;flex-shrink:0;display:grid;place-items:center;font-size:12px;font-weight:600;color:#fff}
.thumb.s전{background:#5a6b7a}.thumb.s중{background:#8a7a4a}.thumb.s후{background:#2fa463}
.thumb.add{background:var(--surface2);color:var(--txt2);font-size:28px;border:1px dashed #48484a}
.cl-cat{margin-bottom:14px}
.cl-cat-h{font-size:14px;font-weight:700;color:var(--green);padding:6px 0}
.cl-item{display:flex;align-items:center;gap:10px;padding:9px 4px;font-size:14px;color:#c7c7cc;border-bottom:1px solid #161618}
.cl-item .cb{width:20px;height:20px;border-radius:6px;border:2px solid #48484a;flex-shrink:0;position:relative}
.cl-item.checked{color:#fff}
.cl-item.checked .cb{background:var(--green);border-color:var(--green)}
.cl-item.checked .cb::after{content:"✓";position:absolute;inset:0;color:#fff;font-size:13px;display:grid;place-items:center;font-weight:900}
.re-notice{width:100%;min-height:90px;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:14px;color:#fff;font-size:14px;font-family:inherit;resize:vertical}

/* 고객 인증 */
.cust-auth{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 32px;text-align:center;min-height:85vh}
.auth-box{background:var(--surface);border-radius:16px;padding:28px 22px;width:100%;max-width:320px;margin-top:24px}
.auth-box p{font-size:14.5px;line-height:1.6;margin-bottom:18px}
.auth-input{width:100%;background:#0a0a0a;border:1px solid var(--line);border-radius:12px;padding:16px;font-size:24px;text-align:center;letter-spacing:12px;color:#fff;margin-bottom:16px}
.auth-note{color:var(--txt3);font-size:12px;margin-top:14px}

/* 고객 보고서 */
.cust-header{background:linear-gradient(135deg,#1fbf8f,#149c74);padding:28px 20px 24px;text-align:center}
.cust-header h2{font-size:21px;font-weight:800}
.cust-header p{font-size:13px;opacity:.95;margin-top:6px}
.cust-body{padding:16px 16px 96px}
.cust-card{background:var(--surface);border-radius:14px;padding:16px;margin-bottom:14px}
.cust-card h3{font-size:15px;font-weight:700;margin-bottom:12px;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:6px}
.cust-info{display:flex;gap:12px;padding:7px 0;font-size:14px;border-bottom:1px solid #161618}
.cust-info span{color:var(--txt2);width:48px;flex-shrink:0}
.cust-info b{font-weight:600}
.cust-photos{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.cp-img{aspect-ratio:3/4;border-radius:10px;display:grid;place-items:center;font-size:13px;font-weight:700;color:#fff}
.cl-alldone{font-size:12px;background:var(--green);color:#fff;padding:3px 10px;border-radius:10px;font-weight:700}
.cust-cl-cat{display:flex;justify-content:space-between;align-items:center;padding:9px 0;font-size:14px;border-bottom:1px solid #161618}
.ccc-n{color:#e5e5ea}
.cl-done{color:var(--green);font-size:13px;font-weight:600}
.cust-notice{font-size:14px;line-height:1.7;color:#e5e5ea}

/* AS 폼 */
.as-form{padding:16px 16px 40px}
.as-label{display:block;font-size:13px;color:var(--txt2);margin:16px 0 8px}
.as-input{width:100%;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:14px;color:#fff;font-size:15px;font-family:inherit}
.as-input.ta{min-height:120px;resize:vertical}
select.as-input{appearance:none}

/* 상세 보고서 버튼 */
.detail-cta{padding:20px 16px 4px}
