:root{
  --bg:#f7f2ec;--panel:#fffdf9;--ink:#2d2723;--muted:#81756c;--line:#e8ddd3;
  --red:#842c21;--red2:#ae4b3b;--redsoft:#f5e3de;--olive:#687251;--olive-soft:#e9ecdf;
  --yellow:#a46f24;--green:#47755d;--shadow:0 12px 40px rgba(62,46,36,.07)
}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Pretendard,"Noto Sans KR",Arial,sans-serif;background:var(--bg);color:var(--ink)}
a{text-decoration:none;color:inherit}button,input,select,textarea{font:inherit}.hidden{display:none!important}
.app{display:grid;grid-template-columns:244px 1fr;min-height:100vh}
.sidebar{height:100vh;position:sticky;top:0;background:#261f1b;color:#fff;padding:18px 14px;display:flex;flex-direction:column}
.side-brand{display:flex;align-items:center;gap:10px;padding:5px 5px 24px}.brand-mark{width:42px;height:42px;border-radius:13px;background:linear-gradient(145deg,#a13b2c,#722118);display:grid;place-items:center;font-weight:900;box-shadow:0 10px 24px rgba(124,37,28,.25)}
.side-brand b{display:block;font-size:13px;letter-spacing:.04em}.side-brand span{display:block;font-size:9px;color:#a89d96;letter-spacing:.22em;margin-top:3px}
.nav{display:flex;flex-direction:column;gap:5px}.nav-item{display:flex;align-items:center;gap:11px;padding:11px 12px;border-radius:11px;color:#cec4bd;font-weight:700;font-size:12px}.nav-item span{width:20px;color:#9e9087}.nav-item:hover,.nav-item.active{background:#3a312c;color:#fff}
.side-spacer{flex:1}.sync-card{border:1px solid #413732;background:#2d2622;border-radius:14px;padding:12px;display:flex;gap:10px;align-items:flex-start}.sync-card i{width:8px;height:8px;border-radius:50%;background:#70af8a;margin-top:4px;box-shadow:0 0 0 5px rgba(112,175,138,.08)}.sync-card b{display:block;font-size:10px}.sync-card span{font-size:9px;color:#9c9189;line-height:1.5;display:block;margin-top:2px}
.side-user{display:flex;align-items:center;gap:9px;padding:14px 5px 3px}.avatar{width:36px;height:36px;border-radius:50%;background:#efe4db;color:var(--red);font-weight:900;display:grid;place-items:center}.side-user>div:nth-child(2){flex:1;min-width:0}.side-user b{display:block;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.side-user span{display:block;font-size:9px;color:#9e928b;margin-top:2px}.logout{border:1px solid #453b35;width:33px;height:33px;border-radius:10px;display:grid;place-items:center}
.workspace{min-width:0}.topbar{padding:29px 34px 13px;display:flex;justify-content:space-between;gap:18px;align-items:flex-start}.eyebrow{font-size:10px;letter-spacing:.18em;color:var(--red);font-weight:900}.topbar h1{font-size:28px;letter-spacing:-.035em;margin:5px 0 4px}.topbar p{font-size:11px;color:var(--muted);margin:0}.top-actions{display:flex;gap:8px}.icon-link{position:relative;width:42px;height:42px;border-radius:12px;background:#fff;border:1px solid var(--line);display:grid;place-items:center;box-shadow:0 8px 24px rgba(60,45,35,.04)}.icon-link em{position:absolute;right:-5px;top:-5px;min-width:18px;height:18px;padding:0 4px;background:var(--red);color:#fff;border-radius:999px;border:2px solid var(--bg);font-style:normal;font-size:8px;display:grid;place-items:center}
.content{padding:15px 34px 40px}.grid{display:grid;gap:15px}.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.card{background:rgba(255,255,255,.9);border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow);padding:18px}.card.hero{background:linear-gradient(135deg,#fff,#f8f1e9);position:relative;overflow:hidden}.card.hero:after{content:"RP";position:absolute;right:-5px;bottom:-27px;font-family:Georgia,serif;font-size:100px;font-weight:900;color:rgba(132,44,33,.035)}
.stat{min-height:128px}.stat-head{display:flex;justify-content:space-between;align-items:center}.stat small{font-size:10px;color:var(--muted);font-weight:900}.stat strong{display:block;font:700 38px Georgia,serif;margin-top:11px;letter-spacing:-.04em}.stat p{font-size:9px;color:var(--muted);margin:3px 0 0}.mini-icon{width:31px;height:31px;border-radius:9px;background:#f3ece5;display:grid;place-items:center}
.section-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:2px 0 12px}.section-head h3{font-size:15px;margin:0}.section-head p{font-size:9px;color:var(--muted);margin:3px 0 0}.btn{border:0;border-radius:11px;padding:10px 14px;font-weight:800;font-size:11px;cursor:pointer}.btn-primary{background:linear-gradient(135deg,var(--red),#722117);color:#fff}.btn-secondary{background:#fff;border:1px solid var(--line);color:var(--ink)}.btn-soft{background:var(--redsoft);color:var(--red)}.btn-full{width:100%}
.badge{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:5px 8px;font-size:9px;font-weight:900;white-space:nowrap}.badge:before{content:"";width:5px;height:5px;border-radius:50%;background:currentColor}.badge.green{background:#e6f0e8;color:var(--green)}.badge.yellow{background:#f8edda;color:var(--yellow)}.badge.red{background:#f7e5e2;color:#a13d34}.badge.gray{background:#eeeae6;color:#746b65}
.store-row{display:flex;align-items:center;gap:12px;padding:12px 6px;border-bottom:1px solid var(--line)}.store-row:last-child{border-bottom:0}.store-number{width:38px;height:38px;border-radius:12px;background:#f3ece5;display:grid;place-items:center;color:var(--red);font:800 13px Georgia,serif;flex:0 0 auto}.store-main{min-width:0;flex:1}.store-main b{font-size:12px}.store-main span{display:block;font-size:9px;color:var(--muted);margin-top:3px}
.table-card{padding:0;overflow:hidden}.table-scroll{overflow:auto}table{width:100%;border-collapse:collapse;min-width:760px}th,td{text-align:left;padding:12px 14px;border-bottom:1px solid var(--line);font-size:10px;vertical-align:top}th{background:#fbf8f4;color:var(--muted);font-size:9px}tr:last-child td{border-bottom:0}tbody tr:hover td{background:#fcf8f4}
.toolbar{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}.search,.field input,.field select,.field textarea{border:1px solid var(--line);background:#fff;border-radius:11px;padding:10px 11px;outline:0}.search{min-width:220px}.field input,.field select,.field textarea{width:100%;font-size:11px}.field textarea{min-height:100px;resize:vertical}.field label{display:block;font-size:9px;font-weight:900;color:var(--muted);margin-bottom:6px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field.full{grid-column:1/-1}
.relation-card h3{font-size:15px;margin:0}.relation-card .meta{font-size:9px;line-height:1.8;color:var(--muted);margin:10px 0}.relation-card .note{font-size:10px;line-height:1.55;color:var(--muted);min-height:34px}.chips{display:flex;flex-wrap:wrap;gap:6px}.chip{font-size:8px;border:1px solid var(--line);background:#f7f2ec;border-radius:999px;padding:6px 8px}
.timeline{display:flex;flex-direction:column;gap:12px}.timeline-item{display:grid;grid-template-columns:90px 1fr;gap:10px}.timeline-date{font-size:9px;color:var(--muted);padding-top:2px}.timeline-body{font-size:10px;line-height:1.55;border-left:2px solid #d8c6ba;padding-left:11px}
.chat-shell{display:grid;grid-template-columns:275px 1fr;min-height:650px;background:#fff;border:1px solid var(--line);border-radius:22px;overflow:hidden;box-shadow:var(--shadow)}.chat-list{background:#fbf8f4;border-right:1px solid var(--line);padding:14px}.chat-list h3{font-size:12px;margin:3px 5px 12px}.chat-store{display:flex;gap:9px;align-items:center;padding:10px;border-radius:12px;margin-bottom:4px}.chat-store:hover,.chat-store.active{background:#eee4dc}.chat-store b{font-size:10px}.chat-store span{display:block;font-size:8px;color:var(--muted);margin-top:3px}
.chat-main{display:flex;flex-direction:column;min-width:0}.chat-head{height:72px;border-bottom:1px solid var(--line);padding:15px 18px;display:flex;align-items:center;justify-content:space-between}.chat-head b{display:block;font-size:12px}.chat-head span{display:block;font-size:9px;color:var(--muted);margin-top:3px}.messages{flex:1;padding:18px;background:#fdfbf8;overflow:auto;max-height:600px}.msg{display:flex;margin:9px 0}.msg.mine{justify-content:flex-end}.msg-wrap{max-width:72%}.msg-author{font-size:8px;color:var(--muted);margin:0 0 4px 5px}.bubble{background:#fff;border:1px solid var(--line);padding:10px 12px;border-radius:14px 14px 14px 4px;font-size:10px;line-height:1.6}.mine .bubble{background:linear-gradient(135deg,#8e3024,#76231b);color:#fff;border:0;border-radius:14px 14px 4px 14px}.msg-time{font-size:7px;color:#a59b94;margin-top:3px;padding:0 4px}.mine .msg-time{text-align:right}.attachment{display:block;margin-top:7px;padding:7px 8px;border-radius:9px;background:rgba(0,0,0,.04);font-size:9px}.mine .attachment{background:rgba(255,255,255,.13)}.attachment img{max-width:260px;max-height:220px;object-fit:cover;border-radius:8px;margin-top:7px;display:block}.composer{border-top:1px solid var(--line);padding:12px;background:#fff}.composer-row{display:flex;gap:8px;align-items:flex-end}.composer textarea{flex:1;border:1px solid var(--line);border-radius:12px;padding:10px;resize:none;min-height:42px}
.flash{padding:11px 13px;border-radius:12px;font-size:10px;margin-bottom:12px}.flash.ok{background:#e6f0e8;color:#38654e}.flash.err{background:#f8e5e2;color:#9c3e35}.empty{text-align:center;padding:42px 20px;color:var(--muted);font-size:10px}.empty b{display:block;font-size:13px;color:var(--ink);margin-bottom:4px}
.login-page{min-height:100vh;display:grid;grid-template-columns:1.1fr .9fr;background:#261f1b}.login-art{padding:8vw;display:flex;flex-direction:column;justify-content:center;color:#fff;background:radial-gradient(circle at 20% 20%,rgba(174,75,59,.18),transparent 25%),linear-gradient(145deg,#241e1a,#3a2b24)}.login-art .brand-mark{width:70px;height:70px;border-radius:22px;font-size:22px}.login-art .eyebrow{color:#e4d4ca;margin-top:35px}.login-art h1{font:500 clamp(46px,5.5vw,78px)/1.06 Georgia,serif;letter-spacing:-.05em;margin:18px 0 24px}.login-art h1 em{color:#dc9f7b}.login-art p{color:#d2c5bd;max-width:620px;font-size:14px;line-height:1.9}.login-panel{background:var(--bg);padding:8vw;display:flex;flex-direction:column;justify-content:center}.login-panel h2{font-size:34px;margin:8px 0 5px;letter-spacing:-.04em}.login-panel>p{font-size:11px;color:var(--muted);margin:0 0 25px}.login-panel .field{margin-top:12px}.login-panel .btn{height:48px;margin-top:17px}
@media(max-width:1000px){.grid-4{grid-template-columns:repeat(2,1fr)}.grid-3{grid-template-columns:repeat(2,1fr)}}
@media(max-width:820px){.app{grid-template-columns:1fr}.sidebar{height:auto;position:static;padding:11px}.side-brand{padding-bottom:10px}.nav{display:flex;flex-direction:row;overflow:auto}.nav-item{min-width:110px;justify-content:center}.nav-item span{display:none}.side-spacer,.sync-card,.side-user{display:none}.topbar{padding:20px 18px 9px}.content{padding:12px 18px 28px}.chat-shell{grid-template-columns:1fr}.chat-list{display:flex;gap:4px;overflow:auto;border-right:0;border-bottom:1px solid var(--line)}.chat-list h3{display:none}.chat-store{min-width:155px}.login-page{grid-template-columns:1fr}.login-art{display:none}.login-panel{min-height:100vh}}
@media(max-width:600px){.grid-4,.grid-3,.grid-2{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.field.full{grid-column:auto}.msg-wrap{max-width:88%}}

/* REAL PASTA brand */
.brand-logo{background:#fff;overflow:hidden;flex-shrink:0;box-shadow:none}
.brand-logo img{display:block;width:100%;height:100%;object-fit:contain}
.side-brand .brand-logo{width:52px;height:52px;border-radius:12px;padding:2px}
.side-user .brand-logo{width:40px;height:40px;border-radius:10px;padding:1px}
.login-art .brand-logo{width:156px;height:152px;border-radius:20px;padding:8px}
.login-art h1{font-family:inherit;font-size:clamp(36px,4.3vw,64px);font-weight:700;line-height:1.3;word-break:keep-all}
.login-art h1 em{font-style:normal}
@media(max-width:820px){.login-art{display:flex;padding:32px 24px}.login-art .brand-logo{width:100px;height:98px;border-radius:14px}.login-art .eyebrow{margin-top:20px}.login-art h1{font-size:32px;margin:14px 0}.login-art p{font-size:13px;margin:0}.login-panel{min-height:auto;padding:36px 24px 48px}}

/* Mobile workspace update */
@media(max-width:820px){
 html{-webkit-text-size-adjust:100%}
 .app,.workspace,.content,.card,.field,.grid>*{min-width:0}
 .sidebar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;padding:12px 14px}
 .side-brand{padding:0;gap:8px}.side-brand .brand-logo{width:44px;height:44px}
 .sidebar .side-user{display:flex;grid-column:2;grid-row:1;padding:0;gap:6px}
 .side-user .avatar,.side-user>div:nth-child(2){display:none}
 .side-user .logout{width:auto;min-width:72px;min-height:44px;padding:8px;color:var(--ink);font-size:13px}
 .sidebar .nav{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;overflow:visible}
 .nav-item{min-width:0;min-height:44px;padding:9px 4px;font-size:13px;text-align:center}
 .topbar{padding:20px 14px 8px;gap:10px}.topbar h1{font-size:25px}.topbar p{font-size:13px;line-height:1.6}
 .content{padding:12px 14px 28px}.card{padding:16px;border-radius:16px}.grid-2,.grid-3{grid-template-columns:1fr}.grid-4{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .stat{min-height:115px}.stat small{font-size:12px}.stat p{font-size:11px}.stat strong{font-size:32px}
 .section-head{flex-wrap:wrap}.section-head h3{font-size:17px}.section-head p{font-size:12px;line-height:1.6}
 .form-grid{grid-template-columns:1fr}.field.full{grid-column:auto}.field label{font-size:13px;line-height:1.5}
 .field input,.field select,.field textarea,.search,.composer textarea,td input,td select,.toolbar select{font-size:16px!important;min-height:44px;max-width:100%;border:1px solid var(--line);border-radius:10px;padding:10px;background:#fff}
 .field textarea{min-height:130px}.field input[type=checkbox]{width:20px!important;min-height:20px;height:20px;vertical-align:middle;margin:8px}
 input[type=file]{width:100%;min-width:0}input[type=file]::file-selector-button{min-height:40px;border:0;border-radius:8px;background:var(--redsoft);margin-right:8px;padding:8px}
 .field small{display:block;font-size:12px;line-height:1.6;overflow-wrap:anywhere}
 .btn{min-height:44px;font-size:14px;padding:11px 14px}.field.full>.btn{width:100%}
 .toolbar>*{max-width:100%}.search{width:100%;min-width:0}.badge{font-size:12px}.flash{font-size:14px;line-height:1.6}
 .table-card{padding:0;background:transparent;border:0;box-shadow:none}.table-scroll{overflow:auto}
 table.mobile-cards{display:block;min-width:0;width:100%}table.mobile-cards thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 table.mobile-cards tbody{display:grid;gap:12px}table.mobile-cards tr{display:block;background:#fff;border:1px solid var(--line);border-radius:16px;padding:8px 14px}
 table.mobile-cards td{display:block;min-width:0!important;max-width:none!important;width:100%;padding:9px 0;border-bottom:1px solid var(--line);font-size:14px;white-space:normal;overflow-wrap:anywhere}
 table.mobile-cards td:before{content:attr(data-label);display:block;font-size:12px;font-weight:700;color:var(--muted);margin-bottom:6px}
 table.mobile-cards td:last-child{border-bottom:0}table.mobile-cards tbody tr:hover td{background:transparent}
 table.mobile-cards td form{flex-wrap:wrap;gap:8px}.request-detail summary{min-height:44px;font-size:15px}
 .attachment{font-size:14px;min-height:44px;line-height:1.6;overflow-wrap:anywhere}.attachment img{max-width:100%}
 .store-main b{font-size:14px}.store-main span{font-size:12px;line-height:1.6}.store-row{flex-wrap:wrap}
 .relation-card .meta,.relation-card .note{font-size:13px}.chip{font-size:12px}
 .timeline-item{grid-template-columns:70px minmax(0,1fr)}.timeline-date{font-size:11px}.timeline-body{font-size:14px;overflow-wrap:anywhere}
 .chat-shell{min-height:0}.chat-list{min-width:0}.chat-store{flex:0 0 160px}.chat-store b{font-size:13px}.chat-store span{font-size:11px}
 .chat-head{height:auto;min-height:68px;gap:8px;flex-wrap:wrap}.chat-head b{font-size:15px}.chat-head span{font-size:12px}
 .messages{padding:12px;max-height:55vh}.bubble{font-size:15px;overflow-wrap:anywhere}.msg-author,.msg-time{font-size:11px}.msg-wrap{max-width:90%}
 .composer-row{flex-wrap:wrap}.composer textarea{min-width:0;width:100%;flex-basis:100%}.composer-row>.btn{width:100%}
 .content .card>p{font-size:14px!important;line-height:1.8!important}.content .card>h3{font-size:17px!important}
 .login-art{padding:24px}.login-art .brand-logo{width:82px;height:80px}.login-art .eyebrow{font-size:9px;margin-top:16px}.login-art h1{font-size:29px;line-height:1.3}.login-art p{font-size:13px}
 .login-panel{padding:28px 24px 40px}.login-panel h2{font-size:28px}.login-panel>p{font-size:13px;line-height:1.6}
}
@media(max-width:360px){.grid-4{grid-template-columns:1fr}.side-brand b{font-size:11px}.side-brand span{font-size:8px}}

.side-user .logout{width:auto;min-width:60px;padding:8px;font-size:12px;white-space:nowrap}
