:root{--nav:#0f172a;--nav2:#111c32;--bg:#f5f7fb;--card:#fff;--text:#111827;--muted:#64748b;--line:#e2e8f0;--primary:#2563eb;--green:#92D050;--red:#ef4444;--blue:#0ea5e9;--shadow:0 10px 30px rgba(15,23,42,.07)}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,Arial,sans-serif;font-size:14px}a{color:inherit;text-decoration:none}button,input,select{font:inherit}.app{min-height:100vh;display:flex}.sidebar{position:fixed;inset:0 auto 0 0;width:245px;background:linear-gradient(180deg,var(--nav),#0b1222);color:#cbd5e1;padding:22px 14px;display:flex;flex-direction:column;z-index:20}.brand{display:flex;align-items:center;gap:10px;padding:4px 12px 28px;color:white}.brand-icon{width:38px;height:38px;border-radius:12px;background:linear-gradient(135deg,#3b82f6,#22c55e);display:grid;place-items:center;font-weight:800;font-size:20px;box-shadow:0 8px 20px rgba(37,99,235,.3)}.brand strong{display:block;letter-spacing:1.4px;font-size:16px}.brand span{display:block;color:#94a3b8;font-size:10px;margin-top:2px}.brand.center{justify-content:center;padding-bottom:24px}.sidebar nav{display:flex;flex-direction:column;gap:5px}.sidebar nav a{display:flex;align-items:center;gap:12px;padding:11px 13px;border-radius:10px;color:#94a3b8;font-weight:600}.sidebar nav a b{width:22px;text-align:center;font-size:17px}.sidebar nav a:hover,.sidebar nav a.active{background:#1e293b;color:#fff}.sidebar nav a.active{box-shadow:inset 3px 0 #60a5fa}.nav-title{font-size:9px;color:#64748b;font-weight:800;letter-spacing:1px;padding:20px 13px 6px}.side-bottom{margin-top:auto}.user-card{display:flex;align-items:center;gap:9px;padding:12px;border:1px solid #24324a;border-radius:12px;background:#111c32}.user-card strong{display:block;color:#fff;font-size:12px}.user-card span{display:block;font-size:9px;color:#94a3b8;margin-top:3px}.avatar{width:34px;height:34px;border-radius:10px;background:#2563eb;color:#fff;display:grid;place-items:center;font-weight:800}.avatar.small{width:30px;height:30px;font-size:11px}.logout{display:block;padding:12px;color:#94a3b8;font-size:12px}.main{margin-left:245px;width:calc(100% - 245px)}.topbar{height:82px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 30px;position:sticky;top:0;z-index:15}.topbar h1{margin:2px 0 0;font-size:20px}.eyebrow{font-size:9px;color:#64748b;letter-spacing:1.1px;font-weight:800}.top-right{display:flex;align-items:center;gap:10px}.pill,.badge{padding:6px 9px;border-radius:999px;font-size:10px;font-weight:800}.pill{background:#eff6ff;color:#2563eb}.menu-btn{display:none}.content{padding:28px 30px 50px;max-width:1600px;margin:auto}.hero,.page-head{background:linear-gradient(135deg,#0f172a,#172554);color:white;border-radius:18px;padding:24px;display:flex;justify-content:space-between;align-items:center;gap:20px;box-shadow:var(--shadow);margin-bottom:18px}.hero h2,.page-head h2{margin:5px 0;font-size:26px}.hero p,.page-head p{color:#cbd5e1;margin:7px 0 0}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:18px}.stat,.card,.toolbar-card,.table-card{background:var(--card);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow)}.stat{padding:18px}.stat span,.stat small{display:block;color:var(--muted)}.stat strong{display:block;font-size:28px;margin:8px 0}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:18px}.card{padding:20px}.card.narrow{max-width:800px;margin-bottom:18px}.card-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:15px}.card-title h3{margin:0;font-size:15px}.card-title span{display:block;color:var(--muted);font-size:11px;margin-top:3px}.badge.green{background:#dcfce7;color:#15803d}.badge.red{background:#fee2e2;color:#b91c1c}.badge.blue{background:#dbeafe;color:#1d4ed8}.badge.gray{background:#f1f5f9;color:#64748b}.rule{display:flex;justify-content:space-around;align-items:center;padding:20px;background:#f8fafc;border-radius:14px;font-size:16px}.rule i{color:#94a3b8}.legend-row{display:flex;gap:14px;flex-wrap:wrap;align-items:center;color:#64748b;font-size:11px}.dot{display:inline-block;width:9px;height:9px;border-radius:3px;background:#cbd5e1}.dot.weekend{background:#92D050}.dot.work{background:#e2e8f0}.quick{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.quick a{border:1px solid var(--line);border-radius:12px;padding:15px;text-align:center;background:#fafafa}.quick b{display:block;font-size:22px;margin-bottom:7px}.quick span{font-size:11px;color:#475569}.page-head{margin-bottom:14px}.period-form,.actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.period-form select,.period-form input{height:38px;border-radius:9px;border:1px solid #d7dee9;padding:0 10px;background:white}.btn{border:0;border-radius:9px;padding:9px 13px;font-weight:700;font-size:11px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:6px}.btn.primary{background:#2563eb;color:white}.btn.secondary{background:#f1f5f9;color:#334155}.btn.danger{background:#ef4444;color:#fff}.btn.wide{width:100%;height:44px}.toolbar-card{padding:12px 14px;display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:14px}.notice,.flash{padding:11px 14px;border-radius:10px;margin-bottom:14px;font-size:12px}.notice{background:#fff7ed;color:#9a3412;border:1px solid #fed7aa}.flash.success{background:#ecfdf5;color:#047857;border:1px solid #a7f3d0}.flash.error{background:#fef2f2;color:#b91c1c;border:1px solid #fecaca}.table-card{overflow:hidden}.table-scroll{overflow:auto;max-height:70vh}.attendance{border-collapse:separate;border-spacing:0;min-width:max-content;font-size:10px}.attendance th,.attendance td{border-right:1px solid var(--line);border-bottom:1px solid var(--line);height:43px;text-align:center;background:#fff}.attendance thead th{position:sticky;top:0;z-index:8;background:#f8fafc;color:#000;font-weight:800}.attendance .sticky{position:sticky;z-index:6;background:#fff}.attendance thead .sticky{z-index:10;background:#f8fafc}.attendance .c1{left:0;width:42px;min-width:42px}.attendance .c2{left:42px;width:70px;min-width:70px}.attendance .c3{left:112px;width:155px;min-width:155px}.attendance .c4{left:267px;width:105px;min-width:105px}.attendance .name{text-align:left;padding-left:10px}.attendance .name small,.data-table small{display:block;color:#94a3b8;font-size:8px;margin-top:3px}.attendance .pos{text-align:left;padding-left:8px}.day-head{width:34px;min-width:34px}.day-head b{display:block}.day-head span{display:block;color:#000;font-size:8px;margin-top:2px}.day{padding:0}.att{width:100%;height:42px;border:0;background:transparent;text-align:center;text-align-last:center;font-weight:700;outline:none;cursor:pointer}.att:disabled{cursor:not-allowed;opacity:.8}.att.st-full{background:#dcfce7;color:#166534}.att.st-half{background:#fef3c7;color:#92400e}.att.st-leave{background:#dbeafe;color:#1d4ed8}.att.st-quarantine{background:#ede9fe;color:#6d28d9}.att.st-zero{background:#fee2e2;color:#b91c1c}.total{min-width:45px;font-weight:700}.small-note{font-size:9px;color:#64748b;padding:7px}.data-table{width:100%;border-collapse:collapse;font-size:11px}.data-table th,.data-table td{padding:10px 9px;border-bottom:1px solid var(--line);text-align:left}.data-table th{background:#f8fafc;color:#475569}.data-table td:nth-child(1),.data-table th:nth-child(1),.data-table td:nth-child(5),.data-table td:nth-child(6),.data-table td:nth-child(7),.data-table td:nth-child(8){text-align:center}.data-table .summary{background:#eff6ff;font-weight:800}.weekend-text{color:#15803d}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.form-grid label{display:block;font-size:10px;color:#64748b;font-weight:700}.form-grid input,.form-grid select{width:100%;height:40px;margin-top:5px;border:1px solid #d7dee9;border-radius:9px;padding:0 10px;background:#fff;color:#111827}.form-actions{display:flex;align-items:end;gap:8px}.mini-list{display:flex;flex-direction:column;gap:5px;max-height:430px;overflow:auto}.mini-row{display:flex;align-items:center;gap:9px;padding:9px;border:1px solid #eef2f7;border-radius:10px}.mini-row .grow{flex:1}.mini-row b,.mini-row span{display:block}.mini-row b{font-size:11px}.mini-row span{font-size:9px;color:#94a3b8;margin-top:2px}.mini-row>a{font-size:10px;color:#2563eb;font-weight:700}.rule-list{display:flex;flex-direction:column;gap:8px}.rule-list div{display:flex;justify-content:space-between;padding:12px;background:#f8fafc;border-radius:10px;font-size:11px}.rule-list span{color:#64748b}.auth-body{min-height:100vh;display:grid;place-items:center;padding:20px;background:radial-gradient(circle at top,#dbeafe,#f8fafc 55%)}.auth-card{width:min(420px,100%);background:#fff;border:1px solid var(--line);border-radius:20px;box-shadow:0 25px 70px rgba(15,23,42,.12);padding:30px}.auth-card h1{margin:0 0 5px;font-size:25px}.auth-card form{margin-top:20px}.auth-card label{display:block;font-size:11px;font-weight:700;color:#475569;margin:12px 0}.auth-card input{display:block;width:100%;height:43px;margin-top:5px;border:1px solid #d7dee9;border-radius:10px;padding:0 12px}.muted,.hint{color:var(--muted);font-size:11px}.hint{margin-top:15px}.toast{position:fixed;right:20px;bottom:20px;opacity:0;transform:translateY(10px);padding:11px 15px;border-radius:10px;background:#0f172a;color:#fff;font-size:11px;z-index:99;transition:.2s}.toast.show{opacity:1;transform:none}.toast.success{background:#047857}.toast.error{background:#b91c1c}.mobile-brand{display:none}.danger-link{color:#dc2626;font-weight:700;font-size:10px}@media(max-width:1000px){.sidebar{transform:translateX(-100%);transition:.2s}.main{margin-left:0;width:100%}.nav-open .sidebar{transform:none}.menu-btn{display:block;border:0;background:#f1f5f9;border-radius:8px;padding:8px}.content{padding:18px}.topbar{padding:0 18px}.mobile-brand{display:block;font-weight:800}.topbar>div:nth-child(2){display:none}.stats{grid-template-columns:repeat(2,1fr)}.grid2{grid-template-columns:1fr}.quick{grid-template-columns:repeat(2,1fr)}.toolbar-card{align-items:flex-start;flex-direction:column}.page-head{align-items:flex-start;flex-direction:column}.form-grid{grid-template-columns:1fr}.hero{align-items:flex-start;flex-direction:column}}

.mobile-attendance{display:none}
@media(max-width:700px){
  body{font-size:13px;overflow-x:hidden}
  .topbar{height:64px;padding:0 12px;position:sticky;top:0}
  .mobile-brand{font-size:15px}
  .top-right{gap:6px}
  .pill{padding:6px 8px}
  .content{padding:10px 10px 28px}
  .page-head{padding:16px;border-radius:16px;margin-bottom:10px}
  .page-head h2{font-size:20px}
  .page-head p{font-size:11px;line-height:1.5}
  .period-form{width:100%;display:grid;grid-template-columns:1fr 92px auto}
  .period-form select,.period-form input{height:42px;min-width:0}
  .period-form .btn{height:42px;padding:0 12px}
  .toolbar-card{padding:12px;margin-bottom:10px;border-radius:14px}
  .legend-row{gap:9px;font-size:10px}
  .actions{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:7px}
  .actions form,.actions form .btn,.actions>a{width:100%}
  .actions .btn{min-height:40px;padding:8px 7px}
  .desktop-attendance{display:none}
  .mobile-attendance{display:block;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);overflow:hidden}
  .mobile-editor-head{padding:14px 14px 10px;display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid var(--line)}
  .mobile-editor-head b{display:block;font-size:14px}
  .mobile-editor-head span{display:block;color:var(--muted);font-size:10px;margin-top:3px}
  .mobile-selectors{display:grid;grid-template-columns:1.4fr .9fr;gap:8px;padding:10px 12px;background:#f8fafc}
  .mobile-selectors label{font-size:9px;color:#64748b;font-weight:800}
  .mobile-selectors select{width:100%;height:42px;margin-top:4px;border:1px solid #d7dee9;border-radius:10px;background:#fff;padding:0 8px;font-weight:700;color:#1e293b;min-width:0}
  .mobile-employee-summary{padding:11px 12px;display:flex;justify-content:space-between;align-items:center;gap:8px;border-bottom:1px solid var(--line)}
  .mobile-employee-summary b{font-size:12px}
  .mobile-employee-summary span{display:block;color:#94a3b8;font-size:9px;margin-top:3px}
  .mobile-totals{display:flex;gap:7px}
  .mobile-totals span{display:inline-block;padding:6px 7px;background:#f1f5f9;border-radius:8px;color:#64748b;font-size:9px}
  .mobile-totals b{font-size:10px;color:#0f172a}
  .mobile-week{padding:12px}
  .mobile-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
  .mobile-day{min-width:0;border:1px solid #e2e8f0;border-radius:8px;background:#fff;overflow:hidden}
  .mobile-day.mobile-weekend{background:#92D050;border-color:#7fbd3e}
  .mobile-day-label{text-align:center;padding:6px 1px 4px}
  .mobile-day-label b{display:block;font-size:12px;color:#0f172a}
  .mobile-day-label span{display:block;font-size:8px;color:#475569;margin-top:2px;font-weight:700}
  .mobile-day .att{height:44px;min-height:44px;font-size:13px;border-top:1px solid rgba(15,23,42,.08);background:rgba(255,255,255,.85);border-radius:0}
  .mobile-day.mobile-weekend .att{background:rgba(255,255,255,.9)}
  .mobile-hint{padding:0 12px 12px;color:#64748b;font-size:9px;line-height:1.4}
  .notice{font-size:10px;margin-bottom:10px}
}
/* OM4 WORKING PLAN */
.doosan-word{font-weight:900;font-style:italic;font-size:20px;letter-spacing:1px;color:#1680c5;min-width:82px}.brand>div:last-child strong{font-size:11px;letter-spacing:.7px}.brand>div:last-child span{font-size:9px}.mobile-doosan{font-weight:900;font-style:italic;color:#1680c5;margin-right:8px}.wp-head{background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px 20px;display:flex;justify-content:space-between;align-items:flex-end;gap:18px;box-shadow:var(--shadow);margin-bottom:12px}.doosan-mini{font-size:22px;font-weight:900;font-style:italic;color:#1680c5;letter-spacing:1px}.wp-head h2{margin:2px 0 12px;text-align:center;text-decoration:underline;font-family:Georgia,serif;font-size:22px;color:#1f2937}.wp-meta{display:flex;gap:18px;align-items:center;font-size:11px;color:#000}.wp-meta span{margin-left:20px}.wp-toolbar{background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px 14px;display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px;box-shadow:var(--shadow)}.wp-legend{display:flex;gap:14px;flex-wrap:wrap;font-size:10px;color:#000}.legend-box{display:inline-block;width:18px;height:12px;border:1px solid #7c8795;vertical-align:-2px;margin-right:3px}.legend-dayoff{background:#fff}.legend-leave{background:#e8b4c2}.legend-weekend{background:#ffe500}.legend-holiday{background:#FF0000}.wp-table-card{overflow:hidden}.wp-table{min-width:1280px;font-size:10px}.wp-table th,.wp-table td{border:1px solid #a8b0ba}.wp-table thead th{background:#f8fafc}.wp-table .c1{width:28px;min-width:28px}.wp-table .c3.name{width:145px;min-width:145px}.wp-table .c4.pos{width:105px;min-width:105px}.wp-table .c2.code{width:80px;min-width:80px}.wp-table .month-group{background:#dceff5;color:#334155;height:26px}.wp-table .day-head{width:31px;min-width:31px;padding:3px 1px}.wp-table .day-head b{display:block;font-size:8px}.wp-table .day-head span{display:block;font-size:10px;margin-top:2px}.wp-table .weekend-head{background:#dcefc7}.wp-table .holiday-head{background:#ffd6d6}.wp-table .day-cell{padding:0;height:25px}.wp-table .att{height:25px;font-size:10px}.wp-table .wp-weekend-base{background:#92D050}.wp-table .wp-workday-base{background:#fff}.wp-table .weekend-total{width:72px;min-width:72px}.summary-row th,.summary-row td{background:#f7f7f7;font-weight:700}.summary-row .summary-label{text-align:left;padding-left:7px}.absent-row th,.absent-row td{background:#fafafa}.wp-note{display:flex;gap:12px;align-items:flex-start;margin-top:10px;font-size:10px;color:#000}.note-grid{display:flex;gap:12px;flex-wrap:wrap}.approval-grid{display:grid;grid-template-columns:repeat(3,1fr);width:min(650px,100%);margin:12px 0 0 auto}.approval-grid div{border:1px solid #a8b0ba;height:70px;text-align:center;background:#fff}.approval-grid b{display:block;font-size:9px;padding:3px;border-bottom:1px solid #a8b0ba}.approval-grid span{display:block;height:55px}.wp-mobile{display:none}
@media(max-width:700px){.wp-head{padding:14px;align-items:flex-start;flex-direction:column}.wp-head h2{text-align:left;font-size:19px;margin:4px 0 9px}.wp-meta{flex-wrap:wrap;gap:7px;font-size:10px}.wp-meta span{margin-left:0}.wp-head .period-form{width:100%}.wp-toolbar{padding:10px;display:block}.wp-legend{gap:8px;line-height:1.7;margin-bottom:8px}.wp-toolbar .actions{display:grid;grid-template-columns:1fr 1fr;gap:6px}.wp-toolbar .actions form,.wp-toolbar .actions a{width:100%}.wp-toolbar .actions .btn{width:100%;padding:8px 5px}.desktop-attendance{display:none}.wp-mobile{display:block}.mobile-day .att{background:rgba(255,255,255,.88)}.mobile-day-label b{font-size:11px}.mobile-day-label span{font-size:8px}.mobile-totals{gap:4px}.mobile-totals span{font-size:8px;padding:6px 5px}.wp-note{font-size:9px;line-height:1.7}.note-grid{gap:6px 10px}.approval-grid{display:none}.doosan-mini{font-size:19px}.mobile-brand{font-size:11px}.mobile-doosan{font-size:16px}}

/* V6 - synchronized desktop/mobile OM4 layout */
.wp-table-scroll{max-height:72vh;overflow:auto}
.wp-table .sticky{position:sticky;z-index:12;background:#fff}
.wp-table thead .sticky{background:#f7fafc;z-index:16}
.wp-table .c1{left:0;width:34px;min-width:34px}
.wp-table .c2{left:34px;width:180px;min-width:180px}
.wp-table .c3{left:214px;width:125px;min-width:125px}
.wp-table .c4{left:339px;width:92px;min-width:92px}
.wp-table .name{text-align:left;padding-left:8px}
.wp-table .dept{text-align:left;padding-left:8px}
.wp-table .code{text-align:center}
.wp-table .month-group{font-family:"Times New Roman",Georgia,serif;font-size:11px;font-weight:700;background:#dceff5}
.wp-table .day-head{font-family:"Times New Roman",Georgia,serif}
.wp-table .day-head b{font-size:9px}
.wp-table .day-head span{font-size:11px}
.wp-table .day-cell{padding:0}
.wp-table .att{font-family:"Times New Roman",Georgia,serif;font-weight:700}




.legend-holiday-work{background:#ffe500}
.wp-note{border-top:1px solid var(--line);padding-top:10px}
.mobile-status-help{display:flex;gap:6px;flex-wrap:wrap;padding:0 12px 12px}
.mobile-status-help span{font-size:9px;color:#475569;background:#f8fafc;border:1px solid #e2e8f0;border-radius:999px;padding:5px 7px}
.mobile-status-help b{color:#0f172a}
.mobile-day{box-shadow:0 1px 2px rgba(15,23,42,.04)}
.mobile-day .att{font-family:"Times New Roman",Georgia,serif;font-weight:700}
@media(max-width:700px){
  .wp-head{gap:12px}
  .wp-title-block{width:100%}
  .wp-head .period-form{grid-template-columns:minmax(0,1fr) 82px 78px}
  .wp-head .period-form select,.wp-head .period-form input{height:40px}
  .wp-toolbar .actions{grid-template-columns:repeat(2,minmax(0,1fr))}
  .wp-toolbar .actions .btn{min-height:42px}
  .mobile-selectors{grid-template-columns:minmax(0,1.35fr) minmax(0,.95fr)}
  .mobile-day-label{padding:5px 1px 4px}
  .mobile-day-label b{font-size:12px}
  .mobile-day .att{height:42px;min-height:42px;font-size:14px}
  .wp-note{display:none}
}
@media(min-width:701px){.wp-mobile{display:none!important}}

/* V7 clean responsive layer */
:root{--status-o:#e5e7eb;--status-p:#e8b4c2;--status-w:#92D050;--holiday:#FF0000}
.wp-title-block{min-width:0}
.wp-meta{display:flex;flex-wrap:wrap;gap:8px 22px;align-items:center}
.wp-meta>div{display:flex;align-items:center;gap:7px;min-width:0}
.wp-meta span{margin:0;color:#000!important}
.wp-meta strong{white-space:nowrap}
.wp-legend{align-items:center}
.wp-legend span,.mobile-status-help span{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
.legend-dayoff{background:var(--status-o)!important;border-color:#cbd5e1}
.legend-leave{background:var(--status-p)!important;border-color:#c98d9d}
.legend-weekend{background:var(--status-w)!important;border-color:#78ad3e}
.wp-table .att,.mobile-day .att{appearance:none;-webkit-appearance:none;-moz-appearance:none}
.att-picker{position:fixed;z-index:9999;display:none;flex-direction:column;gap:8px;width:290px;max-width:92vw;padding:10px;background:#fff;border:1px solid #cbd5e1;border-radius:12px;box-shadow:0 14px 34px rgba(15,23,42,.2)}
.att-picker.open{display:flex}
.att-picker-presets{display:flex;flex-wrap:wrap;gap:6px}
.att-picker-opt{min-width:42px;height:38px;padding:0 9px;border:1px solid rgba(15,23,42,.15);border-radius:8px;font-weight:800;font-size:13px;font-family:"Times New Roman",Georgia,serif;cursor:pointer}
.att-picker-opt.active{outline:2px solid #2563eb;outline-offset:1px}
.att-picker-divider{font-size:10px;font-weight:800;color:#64748b;letter-spacing:.3px;padding-top:8px;border-top:1px dashed #e2e8f0}
.att-picker-custom-row{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-top:4px}
.att-custom-symbol{width:64px;height:34px;border:1px solid #d7dee9;border-radius:8px;padding:0 8px;font-size:13px}
.att-custom-value{width:60px;height:34px;border:1px solid #d7dee9;border-radius:8px;padding:0 6px;font-size:13px}
.att-custom-bg,.att-custom-fg{width:34px;height:34px;border:1px solid #d7dee9;border-radius:8px;padding:2px;cursor:pointer;background:#fff}
.att-picker-apply{height:34px;padding:0 12px;border:0;border-radius:8px;background:#2563eb;color:#fff;font-weight:700;font-size:12px;cursor:pointer}
@media(max-width:700px){.att-picker-opt{min-width:38px;height:40px;font-size:14px}.att-custom-symbol,.att-custom-value,.att-custom-bg,.att-custom-fg{height:38px}.att-picker-apply{height:38px}}















.mobile-status-help{justify-content:center}
.status-help-o{background:#f1f5f9!important}.status-help-p{background:#fdf0f3!important}.status-help-w{background:#eef8e7!important}

@media(min-width:701px){
  .wp-mobile{display:none!important}
  .desktop-attendance{display:block!important}
  .wp-table-card{border-radius:14px}
  .wp-table-scroll{overflow:auto;max-height:72vh}
}

@media(max-width:700px){
  body{overflow-x:hidden}
  .content{padding:10px 10px 28px}
  .topbar{height:64px;padding:0 12px}
  .topbar h1{display:none}
  .mobile-brand{display:flex!important;align-items:center;gap:7px;font-size:14px;white-space:nowrap}
  .mobile-doosan{font-size:15px!important}
  .pill{font-size:10px;padding:7px 9px}
  .menu-btn{font-size:18px;width:40px;height:40px}
  .wp-head{display:block;padding:16px 14px;border-radius:16px;margin-bottom:10px}
  .wp-title-block{width:100%}
  .doosan-mini{font-size:19px}
  .wp-head h2{font-size:22px;text-align:left;margin:4px 0 12px;line-height:1.1}
  .wp-meta{display:block;font-size:11px;line-height:1.45}
  .wp-meta>div{display:block;margin-top:5px}
  .wp-meta span{display:inline-block;margin-right:5px!important}
  .wp-meta strong{white-space:normal}
  .wp-head .period-form{display:grid;width:100%;grid-template-columns:minmax(0,1fr) 82px 78px;gap:6px;margin-top:12px}
  .wp-head .period-form select,.wp-head .period-form input,.wp-head .period-form .btn{height:42px;min-width:0}
  .wp-head .period-form input{width:100%}
  .wp-toolbar{display:block;padding:10px;border-radius:14px;margin-bottom:10px}
  .wp-legend{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-bottom:10px;font-size:9px}
  .wp-legend span{justify-content:center;background:#f8fafc;border:1px solid #e2e8f0;border-radius:9px;padding:7px 4px}
  .wp-toolbar .actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}
  .wp-toolbar .actions form,.wp-toolbar .actions a{width:100%}
  .wp-toolbar .actions .btn{width:100%;min-height:42px;padding:8px 5px}
  .wp-mobile{display:block!important;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);overflow:hidden;margin-bottom:12px}
  .mobile-editor-head{padding:13px 12px 10px}
  .mobile-editor-head b{font-size:16px}
  .mobile-editor-head span{font-size:10px}
  .mobile-selectors{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,.95fr);gap:7px;padding:10px 11px;background:#f8fafc}
  .mobile-selectors label{font-size:9px}
  .mobile-selectors select{height:42px;font-size:12px;padding:0 7px}
  .mobile-employee-summary{padding:10px 11px}
  .mobile-employee-summary b{font-size:13px}
  .mobile-employee-summary span{font-size:9px}
  .mobile-totals{gap:5px}
  .mobile-totals span{font-size:8px;padding:6px 6px}
  .mobile-week{padding:10px 9px 12px}
  .mobile-days{display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:4px!important;width:100%}
  .mobile-day{display:flex;flex-direction:column;min-width:0;height:86px;border-radius:9px;overflow:hidden}
  .mobile-day-label{padding:6px 1px 4px!important;min-height:30px}
  .mobile-day-label b{font-size:12px!important}
  .mobile-day-label span{font-size:8px!important}
  .mobile-day .att{display:block;width:100%;height:46px!important;min-height:46px!important;font-size:14px!important;border:0;border-top:1px solid rgba(15,23,42,.08);padding:0 2px}
  .mobile-status-help{display:flex;gap:5px;padding:0 10px 11px}
  .mobile-status-help span{font-size:9px;padding:5px 7px}
  .desktop-attendance{display:none!important}
  .wp-note{display:none}
  .approval-grid{display:none}
  .notice{font-size:10px}
}


/* V8 FINAL RESPONSIVE OVERRIDES */
.wp-head{background:#fff;color:#111827;border:1px solid #e2e8f0;border-radius:18px;padding:22px 24px;display:flex;justify-content:space-between;align-items:flex-end;gap:24px;box-shadow:0 8px 24px rgba(15,23,42,.05)}
.wp-title-block{flex:1;min-width:0}.doosan-mini{color:#111827;font-style:normal;font-size:22px;letter-spacing:0}.wp-head h2{font-family:Inter,Arial,sans-serif;text-decoration:none;font-size:28px;font-weight:800;letter-spacing:-.4px;color:#111827;margin:7px 0 13px}.wp-meta{display:flex;flex-wrap:wrap;gap:7px 22px;font-size:13px;line-height:1.4}.wp-meta>div{display:block}.wp-meta .period-line{color:#000}.wp-meta .period-line strong{color:#111827}.wp-head .period-form{flex:0 0 auto}.wp-toolbar{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:12px 14px;box-shadow:0 8px 24px rgba(15,23,42,.04)}
.wp-legend{font-size:12px;gap:10px}.wp-legend span{display:inline-flex;align-items:center;gap:5px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:9px;padding:7px 9px}.legend-box{width:14px;height:14px;border-radius:4px;margin:0}

.mobile-attendance{display:none}
@media (max-width:700px){
 html,body{width:100%;max-width:100%;overflow-x:hidden} .app{display:block;width:100%;min-width:0}.main{width:100%;margin:0;min-width:0}.topbar{height:64px;padding:0 12px}.content{width:100%;padding:10px 10px 28px;min-width:0}.mobile-brand{font-size:13px;gap:4px;overflow:hidden}.mobile-brand span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pill{font-size:9px}.menu-btn{width:40px;height:40px}
 .wp-head{display:block;width:100%;padding:15px 14px;margin:0 0 9px;border-radius:16px}.doosan-mini{font-size:17px}.wp-head h2{font-size:23px;line-height:1.12;margin:5px 0 10px}.wp-meta{display:block;font-size:11px}.wp-meta>div{margin:4px 0}.wp-meta .period-line{font-size:11px}.wp-head .period-form{display:grid;width:100%;grid-template-columns:minmax(0,1fr) 76px 78px;gap:6px;margin-top:11px}.wp-head .period-form select,.wp-head .period-form input,.wp-head .period-form .btn{height:40px;min-width:0;padding-left:7px;padding-right:7px}.wp-head .period-form .btn{font-size:10px}
 .wp-toolbar{width:100%;padding:9px;border-radius:14px;margin-bottom:9px}.wp-legend{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin-bottom:8px}.wp-legend span{justify-content:center;font-size:9px;padding:7px 3px}.wp-toolbar .actions{display:grid;grid-template-columns:1fr 1fr;gap:6px}.wp-toolbar .actions form,.wp-toolbar .actions a{width:100%}.wp-toolbar .actions .btn{width:100%;min-height:40px;font-size:10px;padding:7px 3px}
 .wp-mobile{display:block!important;width:100%;background:#fff;border:1px solid #e2e8f0;border-radius:16px;box-shadow:0 8px 24px rgba(15,23,42,.05);overflow:hidden;margin-bottom:10px}.mobile-editor-head{display:flex;justify-content:space-between;align-items:center;padding:11px 10px 8px}.mobile-editor-head b{font-size:15px}.mobile-editor-head span{font-size:9px;color:#64748b}.mobile-selectors{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,.85fr);gap:6px;padding:8px 9px;background:#f8fafc}.mobile-selectors label{font-size:8px;color:#64748b;font-weight:700}.mobile-selectors select{display:block;width:100%;height:38px;margin-top:3px;border:1px solid #d7dee9;border-radius:9px;background:#fff;font-size:11px;padding:0 5px;min-width:0}.mobile-employee-summary{display:flex;justify-content:space-between;align-items:center;padding:8px 9px;border-bottom:1px solid #e2e8f0}.mobile-employee-summary b{font-size:12px}.mobile-employee-summary span{display:block;font-size:8px;color:#64748b;margin-top:2px}.mobile-totals{display:flex;gap:4px}.mobile-totals span{font-size:8px;padding:5px 6px;background:#f1f5f9;border-radius:7px}.mobile-week{padding:8px 7px 9px!important;width:100%!important}.mobile-days{display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:4px!important;width:100%!important}.mobile-day{display:flex!important;flex-direction:column!important;width:100%!important;min-width:0!important;height:76px!important;border:1px solid #e2e8f0!important;border-radius:8px!important;overflow:hidden!important}.mobile-day-label{height:30px!important;min-height:30px!important;padding:4px 1px 2px!important;text-align:center!important}.mobile-day-label b{display:block!important;font-size:11px!important;line-height:12px!important}.mobile-day-label span{display:block!important;font-size:7px!important;line-height:9px!important;margin:1px 0 0!important}.mobile-day .att{display:block!important;width:100%!important;height:44px!important;min-height:44px!important;margin:0!important;padding:0!important;border:0!important;border-top:1px solid rgba(15,23,42,.08)!important;border-radius:0!important;font-size:12px!important;font-weight:800!important;text-align:center!important;text-align-last:center!important}.mobile-status-help{display:flex;justify-content:center;gap:5px;padding:0 8px 9px}.mobile-status-help span{font-size:8px;padding:5px 6px}.desktop-attendance{display:none!important}.wp-note,.approval-grid{display:none!important}
}
@media (min-width:701px){.wp-mobile{display:none!important}.desktop-attendance{display:block!important}}
/* V9 - configurable status / settings / backup */
.status-settings .mini-input{width:100%;height:32px;border:1px solid #d7dee9;border-radius:7px;padding:0 6px;font-size:11px;background:#fff}.status-settings .mini-input.wide{min-width:150px}.status-settings .mini-input.num{width:75px}.color-input{width:40px;height:32px;padding:2px;border:1px solid #d7dee9;border-radius:7px;background:#fff}.status-table-wrap{overflow:auto}.status-settings{min-width:1050px}.row-actions{display:flex!important;align-items:center;gap:5px;white-space:nowrap}.btn.danger{background:#fee2e2;color:#b91c1c;border:1px solid #fecaca}.quick-values{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:-2px 0 14px;color:#64748b;font-size:12px;font-weight:700}.chip{border:1px solid #dbe4ef;background:#f8fafc;color:#334155;border-radius:999px;padding:7px 11px;font-weight:700;cursor:pointer}.chip:hover{background:#eef4ff;border-color:#bfd3f5}.status-add-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.status-add-grid label{font-size:10px;color:#64748b;font-weight:700}.status-add-grid input,.status-add-grid select{display:block;width:100%;height:38px;margin-top:5px;border:1px solid #d7dee9;border-radius:9px;padding:0 9px;background:#fff}.status-add-grid input[type=color]{padding:3px}.settings-card{margin-bottom:18px}.backup-help{border-left:4px solid #2563eb}.dynamic-legend{max-height:150px;overflow:auto}.dynamic-legend span{white-space:nowrap}.mobile-status-help{flex-wrap:wrap}.mobile-status-help span{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;color:#000}
@media(max-width:700px){.quick-values{gap:6px}.chip{padding:6px 9px;font-size:11px}.status-add-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.status-add-grid .form-actions{grid-column:1/-1}.settings-card{padding:13px}.page-head{display:block}.page-head .btn{margin-top:10px}.status-settings{min-width:1000px}.dynamic-legend{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px!important}.dynamic-legend span{overflow:hidden;text-overflow:ellipsis}.wp-mobile .mobile-days{grid-template-columns:repeat(7,minmax(0,1fr))!important}.wp-mobile .mobile-day{height:82px!important}.wp-mobile .mobile-day-label{height:31px!important;min-height:31px!important}.wp-mobile .mobile-day .att{height:50px!important;min-height:50px!important;font-size:10px!important}.wp-toolbar .dynamic-legend{max-height:130px}.row-actions{flex-wrap:wrap}}
.batch-card{padding:18px}.batch-grid{display:grid;grid-template-columns:1.1fr 1fr 1fr;gap:16px}.batch-panel{border:1px solid var(--line);border-radius:16px;padding:16px;background:#fbfdff}.batch-panel-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.batch-panel-title b{font-size:16px}.batch-employee-tools input,.batch-panel select{width:100%;padding:11px 12px;border:1px solid var(--line);border-radius:10px;background:#fff}.batch-employee-list{max-height:430px;overflow:auto;margin-top:10px;display:grid;gap:7px}.batch-employee{display:flex;gap:10px;align-items:center;padding:9px;border:1px solid var(--line);border-radius:10px;background:#fff}.batch-employee span{display:flex;flex-direction:column}.batch-employee small{color:var(--muted);margin-top:2px}.batch-selected-count{margin-top:10px;color:var(--muted)}.batch-date-tools{display:flex;gap:8px;margin:10px 0;flex-wrap:wrap}.batch-week-dates{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.batch-week-dates label{display:flex;gap:8px;align-items:center;padding:10px;border:1px solid var(--line);border-radius:10px;background:#fff}.batch-week-dates label span{display:flex;flex-direction:column}.batch-week-dates small{color:var(--muted)}.batch-preview-box{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:14px 0}.batch-preview-box div{background:#fff;border:1px solid var(--line);border-radius:10px;padding:10px}.batch-preview-box span{display:block;color:var(--muted);font-size:12px}.batch-preview-box b{display:block;margin-top:4px}.batch-warning{font-size:12px;color:#92400e;background:#fff7ed;border:1px solid #fed7aa;border-radius:10px;padding:10px;line-height:1.45}.batch-apply{width:100%;margin-top:14px}.batch-help{padding:16px}.share-layout{display:grid;grid-template-columns:420px 1fr;gap:16px}.share-editor,.share-preview{padding:18px}.share-fields{grid-template-columns:1fr}.share-fields textarea{resize:vertical}.share-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}.share-url-box{margin-top:14px}.share-url-box span{display:block;color:var(--muted);font-size:12px;margin-bottom:5px}.share-url-box input{width:100%;padding:10px;border:1px solid var(--line);border-radius:10px;background:#f8fafc;font-size:12px}.share-preview{overflow-x:auto}.share-preview iframe{width:1000px;max-width:none;height:760px;border:1px solid var(--line);border-radius:12px;background:#fff}.btn.small{padding:7px 10px;font-size:12px}@media(max-width:1000px){.batch-grid,.share-layout{grid-template-columns:1fr}.share-preview iframe{height:600px}}@media(max-width:700px){.batch-preview-box{grid-template-columns:1fr}.batch-week-dates{grid-template-columns:1fr}.share-actions .btn{flex:1 1 45%}}

/* V10.2 - clearer mobile Working Plan + Batch Attendance */
.step-title{display:flex;align-items:center;gap:10px}
.step-title .step-no{width:30px;height:30px;border-radius:10px;background:#dbeafe;color:#1d4ed8;display:grid;place-items:center;font-weight:900;font-size:13px;flex:0 0 30px}
.batch-card{background:linear-gradient(180deg,#ffffff,#f8fbff)}
.batch-grid{align-items:start}
.batch-panel{box-shadow:0 5px 18px rgba(15,23,42,.04);background:#fff}
.batch-panel-title{padding-bottom:9px;border-bottom:1px solid #eef2f7}
.batch-employee{transition:.15s;border-color:#e5eaf2}
.batch-employee:hover{border-color:#bfdbfe;background:#f8fbff}
.batch-employee[hidden]{display:none!important}
.batch-employee:has(input:checked){border-color:#93c5fd;background:#eff6ff;box-shadow:0 0 0 1px #bfdbfe inset}
.batch-employee input,.batch-date-check{accent-color:#2563eb;width:18px;height:18px;flex:0 0 18px}
.batch-date-tools .btn{flex:1}
.batch-week-dates label{transition:.15s;min-height:58px}
.batch-week-dates label:has(input:checked){border-color:#93c5fd;background:#eff6ff}
.batch-week-dates[hidden]{display:none!important}
.batch-preview-box div{background:#f8fafc}
.batch-preview-box b{font-size:18px;color:#0f172a}
.batch-apply{min-height:46px;font-size:13px;box-shadow:0 8px 18px rgba(37,99,235,.2)}
.batch-selected-count{padding:9px 11px;background:#f1f5f9;border-radius:10px;font-size:12px}
.batch-warning{margin-top:10px}
.batch-status-label{display:flex;flex-direction:column;gap:6px}
.batch-status-label .field-label{font-size:10px;color:#64748b;font-weight:700}
.batch-status-native{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.batch-status-trigger{display:flex;align-items:center;gap:10px;width:100%;padding:11px 12px;border:1px solid var(--line);border-radius:10px;background:#fff;cursor:pointer;font:inherit;text-align:left}
.batch-status-trigger:hover{border-color:#93c5fd}
.batch-status-swatch{display:inline-flex;align-items:center;justify-content:center;min-width:30px;height:30px;padding:0 6px;border-radius:8px;border:1px solid rgba(15,23,42,.15);font-weight:800;font-size:13px;flex:0 0 auto}
.batch-status-text{flex:1;font-size:13px;color:#0f172a}
.batch-status-caret{color:#94a3b8;font-size:12px}
.batch-date-hint{font-size:11px;color:var(--muted);margin:2px 0 8px}
.batch-date-pick{cursor:pointer}

.mobile-weeks-wrap{width:100%;background:#fff}
.mobile-week{display:none!important;padding:10px 8px 12px!important}
.mobile-week.mobile-active{display:block!important}
.mobile-week[style*="display:block"]{display:block!important}
.mobile-days{grid-template-columns:repeat(7,minmax(0,1fr));}
.mobile-day{box-shadow:0 2px 7px rgba(15,23,42,.04)}
.mobile-day .att{cursor:pointer}
.mobile-day-label{background:#f8fafc}
.mobile-day .att option{font-size:13px}
@media(max-width:700px){
  .batch-card{padding:10px!important;border-radius:18px}
  .batch-grid{gap:10px}
  .batch-panel{padding:12px;border-radius:14px}
  .batch-panel-title b{font-size:14px}
  .batch-employee-list{max-height:260px}
  .batch-employee{padding:10px 9px}
  .batch-week-dates{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .batch-week-dates label{padding:8px;min-height:54px;font-size:11px}
  .batch-week-dates label span{min-width:0}
  .batch-week-dates label span b{font-size:12px}
  .batch-week-dates label small{font-size:9px}
  .batch-preview-box{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
  .batch-preview-box div{padding:8px 6px;text-align:center}
  .batch-preview-box span{font-size:9px}
  .batch-preview-box b{font-size:15px}
  .batch-warning{font-size:10px}
  .batch-apply{min-height:44px}
  .mobile-days{grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:3px!important}
  .mobile-day{height:86px!important;border-radius:8px!important}
  .mobile-day-label{height:32px!important;min-height:32px!important}
  .mobile-day-label b{font-size:11px!important}
  .mobile-day .att{height:54px!important;min-height:54px!important;font-size:10px!important;font-weight:900!important}
}

/* V10.2.1 - weekly editor at the end + final responsive cleanup */
.wp-table-card{margin-bottom:12px;max-width:100%;}
.wp-table-scroll{width:100%;max-width:100%;overflow:auto;max-height:72vh;-webkit-overflow-scrolling:touch;}
.wp-mobile{width:100%;box-sizing:border-box;}
@media(min-width:701px){
  .wp-table-card{display:block!important;}
  .wp-table-scroll{min-width:0;max-height:calc(100vh - 300px);}
  .wp-table{width:max-content;min-width:1280px;}
  .wp-mobile{display:none!important;}
}
@media(max-width:700px){
  .content{box-sizing:border-box;width:100%;max-width:100%;}
  .wp-head,.wp-toolbar,.wp-mobile{box-sizing:border-box;max-width:100%;}
  .desktop-attendance{display:none!important;}
  .wp-note,.approval-grid{display:none!important;}
  .wp-mobile{display:block!important;margin-top:14px;margin-bottom:0;border-radius:16px;overflow:hidden;}
  .mobile-editor-head{min-height:48px;box-sizing:border-box;}
  .mobile-selectors select,.mobile-day .att{-webkit-appearance:auto;appearance:auto;}
  .mobile-selectors select{min-width:0;max-width:100%;}
  .mobile-days{width:100%;box-sizing:border-box;grid-template-columns:repeat(7,minmax(0,1fr))!important;}
  .mobile-day{min-width:0!important;max-width:100%!important;}
  .mobile-day .att{min-width:0!important;max-width:100%!important;overflow:hidden;}
  .mobile-status-help{padding-bottom:12px;}
}


/* V10.2.2 - Weekly attendance editor matching the mobile reference layout */
#weeklyAttendanceEditor{scroll-margin-top:12px}
@media(max-width:700px){
  .wp-mobile{
    order:initial;
    width:100%;
    margin-top:14px!important;
    margin-left:0;
    margin-right:0;
    background:#fff;
    border:1px solid #e2e8f0;
    border-radius:18px;
    box-shadow:0 8px 24px rgba(15,23,42,.05);
  }
  .mobile-editor-head{padding:14px 14px 10px!important;min-height:0!important}
  .mobile-editor-head b{font-size:18px!important;line-height:1.2}
  .mobile-editor-head span{font-size:11px!important;margin-top:5px}
  .mobile-editor-head .badge{font-size:12px!important;padding:9px 14px!important}
  .mobile-selectors{grid-template-columns:minmax(0,1.35fr) minmax(0,.85fr)!important;gap:8px!important;padding:12px 12px!important}
  .mobile-selectors label{font-size:10px!important}
  .mobile-selectors select{height:44px!important;margin-top:5px!important;border:2px solid #dbe3ee!important;border-radius:12px!important;font-size:13px!important;font-weight:800!important;padding:0 9px!important}
  .mobile-employee-summary{padding:12px!important;min-height:66px}
  .mobile-employee-summary b{font-size:17px!important;line-height:1.2}
  .mobile-employee-summary span{font-size:11px!important;margin-top:5px}
  .mobile-totals{gap:7px!important}
  .mobile-totals span{font-size:11px!important;padding:9px 10px!important;border-radius:10px!important;background:#f1f5f9!important;white-space:nowrap}
  .mobile-totals span b{font-size:14px!important}
  .mobile-week{padding:12px 9px 14px!important}
  .mobile-days{grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:4px!important}
  .mobile-day{height:102px!important;border-radius:10px!important;border:2px solid #e2e8f0!important}
  .mobile-day-label{height:42px!important;min-height:42px!important;padding:7px 1px 4px!important;background:#fff!important}
  .mobile-day-label b{font-size:15px!important;line-height:17px!important}
  .mobile-day-label span{font-size:10px!important;line-height:12px!important;margin-top:2px!important}
  .mobile-day .att{height:58px!important;min-height:58px!important;font-size:13px!important;font-weight:900!important;border-top:1px solid #e2e8f0!important}
  .mobile-status-help{gap:8px!important;padding:0 8px 12px!important}
  .mobile-status-help span{font-size:10px!important;padding:7px 10px!important;border-radius:999px!important;white-space:nowrap}
}
@media(min-width:701px){
  /* Desktop keeps the full period table; the weekly editor is intentionally mobile-only. */
  #weeklyAttendanceEditor{display:none!important}
}


/* V10.2.4 - FINAL MOBILE ATTENDANCE FIX */
@media (max-width:700px){
  #weeklyAttendanceEditor{display:block!important;visibility:visible!important;opacity:1!important;width:100%!important;box-sizing:border-box!important;}
  #weeklyAttendanceEditor .mobile-weeks-wrap{display:block!important;visibility:visible!important;width:100%!important;min-height:120px!important;}
  #weeklyAttendanceEditor .mobile-week{width:100%!important;box-sizing:border-box!important;}
  #weeklyAttendanceEditor .mobile-week.mobile-active{display:block!important;}
  #weeklyAttendanceEditor .mobile-week[aria-hidden="false"]{display:block!important;}
  #weeklyAttendanceEditor .mobile-days{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;width:100%!important;overflow-x:auto!important;overflow-y:hidden!important;gap:6px!important;padding:4px 8px 10px!important;box-sizing:border-box!important;-webkit-overflow-scrolling:touch!important;}
  #weeklyAttendanceEditor .mobile-day{flex:0 0 78px!important;width:78px!important;min-width:78px!important;height:96px!important;box-sizing:border-box!important;}
  #weeklyAttendanceEditor .mobile-day-label{height:38px!important;min-height:38px!important;}
  #weeklyAttendanceEditor .mobile-day .att{display:block!important;width:100%!important;height:56px!important;min-height:56px!important;font-size:12px!important;font-weight:900!important;box-sizing:border-box!important;-webkit-appearance:auto!important;appearance:auto!important;}
}
@media (min-width:701px){#weeklyAttendanceEditor{display:none!important;}}

/* V10.2.5 - deterministic mobile weekly editor visibility */
@media (max-width:700px){
  #weeklyAttendanceEditor{display:block!important;visibility:visible!important;opacity:1!important;}
  #weeklyAttendanceEditor .mobile-weeks-wrap{display:block!important;visibility:visible!important;min-height:110px!important;}
  #weeklyAttendanceEditor .mobile-week{display:none!important;visibility:hidden!important;}
  #weeklyAttendanceEditor .mobile-week.mobile-active{display:block!important;visibility:visible!important;}
  #weeklyAttendanceEditor .mobile-week[hidden]{display:none!important;}
  #weeklyAttendanceEditor .mobile-days{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;gap:6px!important;overflow-x:auto!important;overflow-y:hidden!important;width:100%!important;box-sizing:border-box!important;padding:4px 8px 10px!important;}
  #weeklyAttendanceEditor .mobile-day{flex:0 0 78px!important;width:78px!important;min-width:78px!important;height:96px!important;box-sizing:border-box!important;}
  #weeklyAttendanceEditor .mobile-day .att{display:block!important;width:100%!important;height:56px!important;min-height:56px!important;box-sizing:border-box!important;}
}
@media (min-width:701px){#weeklyAttendanceEditor{display:none!important;}}

/* V10.2.6 - FINAL MOBILE ATTENDANCE HARDENING */
@media(max-width:700px){
  #weeklyAttendanceEditor{display:block!important;visibility:visible!important;opacity:1!important;width:100%!important;max-width:100%!important;}
  #weeklyAttendanceEditor .mobile-weeks-wrap{display:block!important;visibility:visible!important;min-height:110px!important;width:100%!important;}
  #weeklyAttendanceEditor .mobile-week{width:100%!important;box-sizing:border-box!important;}
  #weeklyAttendanceEditor .mobile-week:not(.mobile-active){display:none!important;visibility:hidden!important;}
  #weeklyAttendanceEditor .mobile-week.mobile-active{display:block!important;visibility:visible!important;opacity:1!important;}
  #weeklyAttendanceEditor .mobile-week[hidden]:not(.mobile-active){display:none!important;}
  #weeklyAttendanceEditor .mobile-days{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;gap:6px!important;overflow-x:auto!important;overflow-y:hidden!important;width:100%!important;box-sizing:border-box!important;padding:4px 8px 10px!important;-webkit-overflow-scrolling:touch!important;}
  #weeklyAttendanceEditor .mobile-day{display:flex!important;flex:0 0 78px!important;width:78px!important;min-width:78px!important;height:96px!important;box-sizing:border-box!important;flex-direction:column!important;}
  #weeklyAttendanceEditor .mobile-day-label{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;height:38px!important;min-height:38px!important;}
  #weeklyAttendanceEditor .mobile-day .att{display:block!important;width:100%!important;height:56px!important;min-height:56px!important;box-sizing:border-box!important;font-size:12px!important;font-weight:900!important;-webkit-appearance:auto!important;appearance:auto!important;}
}
@media(min-width:701px){#weeklyAttendanceEditor{display:none!important;}}

/* =========================================================
   Workboard 2026 mobile app UI
   Desktop table is intentionally untouched.
   ========================================================= */
.app-attendance{background:#f8fafc;border:1px solid #e2e8f0;border-radius:18px;overflow:hidden;box-shadow:0 8px 30px rgba(15,23,42,.07);margin-top:14px}
.app-att-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px;background:#fff;border-bottom:1px solid #e5e7eb}
.app-att-head b{display:block;font-size:18px;color:#0f172a}.app-att-head small{display:block;color:#64748b;font-size:10px;margin-top:4px}.app-eyebrow{display:block;font-size:9px;font-weight:900;letter-spacing:1.2px;color:#2563eb;margin-bottom:3px}.app-lock{font-size:10px;font-weight:900;padding:7px 9px;border-radius:999px;background:#eff6ff;color:#1d4ed8;white-space:nowrap}
.app-selectors{padding:10px 12px;background:#f8fafc}.app-selectors label{font-size:10px;font-weight:800}.app-selectors select{margin-top:4px;height:40px;font-size:13px;font-weight:700;background:#fff;border:1px solid #dbe2ea;border-radius:10px;padding:0 9px;width:100%}
.app-employee-card{display:flex;align-items:center;gap:10px;padding:12px;background:#fff;border-top:1px solid #e5e7eb;border-bottom:1px solid #e5e7eb}.app-avatar{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:#dbeafe;color:#1d4ed8;font-weight:900;font-size:13px;flex:none}.app-employee-main{min-width:0;flex:1}.app-employee-main b{display:block;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.app-employee-main span{font-size:10px;color:#64748b}.app-total-main{text-align:right}.app-total-main strong{display:block;font-size:23px;line-height:1;color:#0f172a}.app-total-main span{font-size:9px;color:#64748b;font-weight:700}
.app-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;padding:10px 12px;background:#fff}.app-kpis div{padding:8px 4px;text-align:center;border:1px solid #edf0f3;border-radius:10px;background:#f8fafc}.app-kpis b{display:block;font-size:15px}.app-kpis span{font-size:8px;color:#64748b;font-weight:700}
.app-week-caption{display:flex;align-items:baseline;justify-content:space-between;padding:12px 12px 4px}.app-week-caption b{font-size:12px}.app-week-caption span{font-size:9px;color:#64748b}
.app-days-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;padding:8px 10px 12px}.app-day{position:relative;min-width:0;height:94px;border:1px solid #dbe2ea;border-radius:12px;background:#fff;padding:7px 4px 5px;display:flex;flex-direction:column;align-items:center;justify-content:space-between;cursor:pointer;font:inherit;color:#0f172a;box-shadow:0 1px 3px rgba(15,23,42,.04);transition:transform .12s,box-shadow .12s}.app-day:active{transform:scale(.97)}.app-day:disabled{cursor:not-allowed;opacity:.75}.app-day-top{width:100%;display:flex;justify-content:space-between;align-items:center;padding:0 2px}.app-day-top b{font-size:15px;line-height:1}.app-day-top small{font-size:8px;font-weight:900;color:#64748b}.app-day-symbol{font-family:"Times New Roman",Georgia,serif;font-size:22px;font-weight:900;line-height:1}.app-day-label{max-width:100%;font-size:7px;font-weight:800;color:#475569;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.app-day-check{position:absolute;right:4px;top:4px;width:13px;height:13px;border-radius:50%;display:none;place-items:center;font-size:8px;background:#16a34a;color:#fff}.app-day[data-status="WORK_FULL"] .app-day-check,.app-day[data-status="WORK_HALF"] .app-day-check,.app-day[data-status="WORK_ZERO"] .app-day-check,.app-day[data-status="ANNUAL_LEAVE"] .app-day-check,.app-day[data-status="DAYOFF"] .app-day-check,.app-day[data-status="WEEKEND_WORK"] .app-day-check,.app-day[data-status="HOLIDAY_OFF"] .app-day-check,.app-day[data-status="HOLIDAY_WORK"] .app-day-check{display:grid}
.app-hidden-select{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important}.app-help{display:flex;gap:5px;flex-wrap:wrap;padding:0 10px 12px;justify-content:center}.app-help span{font-size:8px;font-weight:700;color:#64748b;background:#fff;border:1px solid #e5e7eb;border-radius:999px;padding:5px 7px}
.attendance-sheet{position:fixed;inset:0;z-index:10050;display:none}.attendance-sheet.open{display:block}.sheet-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.48);backdrop-filter:blur(2px)}.sheet-panel{position:absolute;left:0;right:0;bottom:0;background:#fff;border-radius:20px 20px 0 0;padding:9px 14px calc(14px + env(safe-area-inset-bottom));max-height:min(78vh,620px);overflow:auto;box-shadow:0 -12px 40px rgba(15,23,42,.25)}.sheet-grab{width:38px;height:4px;background:#cbd5e1;border-radius:9px;margin:0 auto 10px}.sheet-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.sheet-head b{display:block;font-size:15px}.sheet-head small{display:block;font-size:9px;color:#64748b;margin-top:3px}.sheet-close{border:0;background:#f1f5f9;border-radius:50%;width:32px;height:32px;font-size:21px;line-height:1;cursor:pointer}.sheet-options{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.sheet-option{min-height:58px;border:1px solid #dbe2ea;border-radius:12px;background:#fff;display:flex;align-items:center;gap:7px;padding:7px;cursor:pointer;text-align:left}.sheet-option.active{outline:2px solid #2563eb;outline-offset:1px}.sheet-option-symbol{width:34px;height:34px;border-radius:9px;display:grid;place-items:center;font-family:"Times New Roman",Georgia,serif;font-weight:900;font-size:16px;flex:none}.sheet-option b{display:block;font-size:10px;line-height:1.2}.sheet-option small{display:block;color:#64748b;font-size:8px;margin-top:2px}.sheet-custom{border-top:1px dashed #dbe2ea;margin-top:12px;padding-top:10px}.sheet-custom>button{width:100%;height:38px;border:1px dashed #94a3b8;border-radius:10px;background:#f8fafc;font-weight:800;color:#334155}.sheet-custom-grid{display:grid;grid-template-columns:1fr 1fr 42px 42px;gap:6px;margin:8px 0}.sheet-custom-grid input{width:100%;height:38px;box-sizing:border-box;border:1px solid #dbe2ea;border-radius:9px;padding:0 8px}.sheet-custom-grid input[type=color]{padding:3px}.sheet-custom .btn{width:100%}

/* Live preview dưới bảng công */
.wb-preview-card{margin-top:14px;background:#fff;border:1px solid #dbe3ec;border-radius:16px;overflow:hidden;box-shadow:0 6px 24px rgba(15,23,42,.06)}
.wb-preview-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 15px;border-bottom:1px solid #e5eaf0;background:#f8fafc}
.wb-preview-head h3{margin:2px 0 2px;font-size:16px;color:#0f172a}.wb-preview-head small{display:block;color:#64748b;font-size:10px}.wb-preview-eyebrow{font-size:9px;font-weight:900;letter-spacing:.08em;color:#2563eb}.wb-preview-tools{display:flex;align-items:center;gap:8px}.wb-preview-live{font-size:9px;font-weight:800;color:#15803d;white-space:nowrap}.wb-preview-live i{display:inline-block;width:7px;height:7px;border-radius:50%;background:#22c55e;margin-right:3px}.wb-preview-scroll{overflow-x:auto;overflow-y:auto;max-width:100%;width:100%;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;touch-action:pan-x pan-y}.wb-preview-table{border-collapse:collapse;min-width:1280px;width:max-content;font-size:10px}.wb-preview-table th,.wb-preview-table td{border:1px solid #d6dde6;text-align:center;height:28px;padding:2px 4px;white-space:nowrap}.wb-preview-table thead th{background:#eef4f8;color:#334155;font-weight:800}.wb-preview-table .pv-day{width:30px;min-width:30px}.wb-preview-table .pv-day b{display:block;font-size:10px}.wb-preview-table .pv-day small{display:block;font-size:7px;color:#64748b}.wb-preview-table .pv-weekend{background:#fff4eb}.wb-preview-table .pv-holiday{background:#eaf5df}.wb-preview-table .pv-name{text-align:left;width:145px;min-width:145px;max-width:145px;overflow:hidden;text-overflow:ellipsis}.wb-preview-table .pv-code{width:75px;min-width:75px}.wb-preview-table .pv-no{width:28px;min-width:28px}.wb-preview-table .pv-total{width:72px;min-width:72px;background:#eef6ff;font-weight:900}.wb-preview-table .pv-working{font-size:11px}.wb-preview-table .pv-cell{font-weight:900;font-size:11px;cursor:pointer;user-select:none}.wb-preview-table .pv-cell:active{outline:2px solid #2563eb;outline-offset:-2px}.wb-preview-table .pv-cell:focus{outline:2px solid #2563eb;outline-offset:-2px}.wb-preview-table .pv-sticky{position:sticky;z-index:2;background:#fff}.wb-preview-table thead .pv-sticky{background:#eef4f8;z-index:3}.wb-preview-table .pv-no{left:0}.wb-preview-table .pv-name{left:28px}.wb-preview-foot{display:flex;gap:14px;align-items:center;flex-wrap:wrap;padding:9px 12px;font-size:9px;color:#64748b;background:#fbfcfd;border-top:1px solid #e5eaf0}.wb-preview-foot b{color:#b45309;margin-left:auto}

@media(max-width:700px){.desktop-attendance{display:none!important}.app-attendance{display:block!important}.app-days-grid{gap:4px;padding-left:8px;padding-right:8px}.app-day{height:90px;border-radius:11px}.app-day-symbol{font-size:20px}.sheet-options{grid-template-columns:repeat(2,1fr)}}
@media(min-width:701px){.app-attendance,.attendance-sheet{display:none!important}}

/* 2026 mobile preview: always visible in portrait and editable with horizontal swipe */
@media(max-width:700px){
  #wbPreviewCard{display:block!important;width:100%;max-width:100%;margin:14px 0 12px!important;border-radius:16px;overflow:hidden;}
  #wbPreviewCard .wb-preview-head{padding:12px 11px;gap:8px;}
  #wbPreviewCard .wb-preview-head h3{font-size:15px;}
  #wbPreviewCard .wb-preview-head small{font-size:9px;line-height:1.35;}
  #wbPreviewCard .wb-preview-live{display:none;}
  #wbPreviewCard .wb-preview-tools .btn{padding:7px 9px;font-size:10px;}
  #wbPreviewCard .wb-preview-scroll{display:block!important;width:100%;max-width:100%;overflow-x:scroll!important;overflow-y:hidden!important;padding-bottom:4px;scrollbar-width:thin;}
  #wbPreviewCard .wb-preview-table{min-width:1280px!important;width:max-content!important;table-layout:auto;}
  #wbPreviewCard .wb-preview-table th,#wbPreviewCard .wb-preview-table td{height:34px;padding:3px 5px;font-size:10px;}
  #wbPreviewCard .wb-preview-table .pv-day{width:34px;min-width:34px;}
  #wbPreviewCard .wb-preview-table .pv-cell{font-size:13px;cursor:pointer;}
  #wbPreviewCard .wb-preview-table .pv-name{width:130px;min-width:130px;max-width:130px;}
  #wbPreviewCard .wb-preview-table .pv-code{width:70px;min-width:70px;}
  #wbPreviewCard .wb-preview-foot{font-size:8px;gap:7px;padding:8px 9px;}
  #wbPreviewCard .wb-preview-foot b{width:100%;margin-left:0;}
  #wbPreviewCard::before{content:'↔ Kéo ngang để xem đủ các ngày · Chạm ô để sửa';display:block;padding:7px 10px;background:#eff6ff;color:#1d4ed8;font-size:9px;font-weight:800;border-bottom:1px solid #dbeafe;}
}
@media(min-width:701px){#wbPreviewCard{display:block!important;}}


/* FINAL 2026 preview placement: desktop under main table, mobile directly under mobile editor */
.wb-preview-mobile{display:none!important;}
.wb-preview-desktop{display:block!important;}
@media(max-width:700px){
  .wb-preview-desktop{display:none!important;}
  .wb-preview-mobile{display:block!important;width:100%!important;max-width:100%!important;margin:14px 0 12px!important;box-sizing:border-box;overflow:hidden;}
  .wb-preview-mobile .wb-preview-scroll{display:block!important;width:100%!important;max-width:100%!important;overflow-x:auto!important;overflow-y:hidden!important;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y;}
  .wb-preview-mobile .wb-preview-table{min-width:1280px!important;width:max-content!important;}
  .wb-preview-mobile .wb-preview-head{padding:12px 11px;}
  .wb-preview-mobile .wb-preview-head h3{font-size:15px;margin:2px 0;}
  .wb-preview-mobile .wb-preview-head small{font-size:9px;line-height:1.35;}
  .wb-preview-mobile .wb-preview-live{display:none!important;}
  .wb-preview-mobile .wb-preview-table th,.wb-preview-mobile .wb-preview-table td{height:36px;padding:3px 5px;font-size:10px;}
  .wb-preview-mobile .wb-preview-table .pv-day{width:38px;min-width:38px;}
  .wb-preview-mobile .wb-preview-table .pv-cell{font-size:13px;cursor:pointer;}
  .wb-preview-mobile .wb-preview-foot{font-size:8px;gap:7px;padding:8px 9px;}
  .wb-preview-mobile .wb-preview-foot b{width:100%;margin-left:0;}
  .wb-preview-mobile::before{content:'↔ Kéo ngang để xem đủ các ngày · Chạm ô để sửa';display:block;padding:8px 10px;background:#eff6ff;color:#1d4ed8;font-size:9px;font-weight:800;border-bottom:1px solid #dbeafe;}
}
@media(min-width:701px){.wb-preview-desktop{display:block!important;}.wb-preview-mobile{display:none!important;}}

/* Attendance 2026: live preview directly below mobile chấm công */
.attendance-preview-card{margin:14px 0 18px;background:#fff;border:1px solid #dbe3ec;border-radius:16px;overflow:hidden;box-shadow:0 6px 24px rgba(15,23,42,.06)}
.attendance-preview-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 14px;border-bottom:1px solid #e5eaf0;background:#f8fafc}
.attendance-preview-head h3{margin:2px 0;font-size:16px;color:#0f172a}.attendance-preview-head small{display:block;color:#64748b;font-size:10px}.attendance-preview-eyebrow{font-size:9px;font-weight:900;letter-spacing:.08em;color:#2563eb}
.attendance-preview-tip{padding:8px 10px;background:#eff6ff;color:#1d4ed8;border-bottom:1px solid #dbeafe;font-size:9px;font-weight:800}
.attendance-preview-scroll{width:100%;max-width:100%;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y}
.attendance-preview-table{border-collapse:collapse;min-width:1280px;width:max-content;font-size:10px}.attendance-preview-table th,.attendance-preview-table td{border:1px solid #d6dde6;text-align:center;height:36px;padding:3px 5px;white-space:nowrap}.attendance-preview-table thead th{background:#eef4f8;color:#000;font-weight:800}.attendance-preview-table .ap-day{width:38px;min-width:38px}.attendance-preview-table .ap-day b{display:block;font-size:10px}.attendance-preview-table .ap-day small{display:block;font-size:8px;color:#000}.attendance-preview-table .ap-name{text-align:left;width:145px;min-width:145px;max-width:145px;overflow:hidden;text-overflow:ellipsis}.attendance-preview-table .ap-name small{display:block;color:#000;font-size:8px}.attendance-preview-table .ap-no{width:30px;min-width:30px}.attendance-preview-table .ap-sticky{position:sticky;z-index:2;background:#fff}.attendance-preview-table thead .ap-sticky{background:#eef4f8;z-index:3}.attendance-preview-table .ap-no{left:0}.attendance-preview-table .ap-name{left:30px}.attendance-preview-table .ap-total{width:70px;min-width:70px;background:#eef6ff;font-weight:900}.attendance-preview-table .ap-weekend{background:#92D050}.attendance-preview-table .ap-holiday{background:#FF0000;color:#fff}.attendance-preview-table thead .ap-holiday small{color:#ffe1e1}.attendance-preview-table .ap-cell{font-size:13px;font-weight:900;cursor:pointer;user-select:none}.attendance-preview-table .ap-cell:active,.attendance-preview-table .ap-cell:focus{outline:2px solid #2563eb;outline-offset:-2px}.attendance-preview-actions{display:flex;gap:10px;flex-wrap:wrap;padding:10px;background:#f8fafc;border-top:1px solid #e5eaf0}.attendance-preview-actions .btn{flex:1 1 180px;text-align:center;text-decoration:none;justify-content:center;min-height:42px;display:inline-flex;align-items:center}.attendance-preview-actions .btn.primary{background:#2563eb;color:#fff}.attendance-preview-actions .btn.secondary{background:#eef3f8;color:#334155}@media(max-width:700px){.attendance-preview-actions{padding:10px;gap:8px}.attendance-preview-actions .btn{flex:1 1 calc(50% - 4px);min-width:0;font-size:13px;padding:10px 8px;border-radius:12px}}
.attendance-preview-foot{display:flex;gap:10px;flex-wrap:wrap;padding:8px 10px;font-size:8px;color:#000;border-top:1px solid #e5eaf0;background:#fbfcfd}.attendance-preview-foot b{color:#b45309}
@media(min-width:701px){.attendance-preview-card{display:none!important}}
@media(max-width:700px){.attendance-preview-card{display:block!important;width:100%!important;box-sizing:border-box;margin:14px 0 18px!important}.attendance-preview-head{padding:11px 10px}.attendance-preview-head h3{font-size:15px}.attendance-preview-head small{font-size:9px}.attendance-preview-head .btn{padding:7px 9px;font-size:10px}.attendance-preview-table{min-width:1280px!important;width:max-content!important}.attendance-preview-table th,.attendance-preview-table td{height:38px}.attendance-preview-table .ap-name{width:135px;min-width:135px;max-width:135px}}

/* V10.2.10 totals: weekly + monthly attendance */
.attendance-month-total{display:block;margin-top:5px;font-size:11px;color:#1d4ed8;font-weight:800}.attendance-month-total b{font-size:14px}
.mobile-totals{align-items:center}.mobile-totals span{white-space:nowrap}
@media(max-width:700px){.mobile-totals{max-width:58%;justify-content:flex-end;flex-wrap:wrap}.mobile-totals span{font-size:8px;padding:5px 6px}.attendance-month-total{font-size:10px}.attendance-month-total b{font-size:13px}}

/* 2026.09 OT summary: separate weekend and holiday overtime */
.attendance-preview-table .ap-total,.wb-preview-table .pv-holiday{font-weight:900;}
.attendance-preview-table .ap-total[data-ap-holiday],.wb-preview-table .pv-holiday{background:#fff7cc;}
.app-kpis{grid-template-columns:repeat(5,minmax(0,1fr));}
@media(max-width:700px){.app-kpis{grid-template-columns:repeat(3,minmax(0,1fr));}.app-kpis div{min-width:0}.app-kpis span{font-size:8px;line-height:1.15}.mobile-totals{max-width:72%!important;}
  .mobile-totals span{white-space:normal;text-align:center;line-height:1.15;}
}

/* OT columns / summaries */
.attendance-preview-table .ap-total[data-ap-holiday], .wb-preview-table .pv-holiday{background:#fff7cc;font-weight:900;}
.attendance-month-summary,.wb-preview-summary{display:flex;gap:8px;flex-wrap:wrap;margin-top:6px;}
.attendance-month-summary strong,.wb-preview-summary strong{font-size:10px;color:#334155;background:#f1f5f9;border-radius:8px;padding:5px 7px;white-space:nowrap;}
.attendance-month-summary strong b,.wb-preview-summary strong b{color:#1d4ed8;font-size:12px;}
@media(max-width:700px){.attendance-month-summary{gap:5px}.attendance-month-summary strong{font-size:8px;padding:5px 6px}.attendance-month-summary strong b{font-size:11px}.wb-preview-summary{gap:5px;margin-top:6px}.wb-preview-summary strong{font-size:8px;padding:5px 6px}.wb-preview-summary strong b{font-size:11px}.app-kpis{grid-template-columns:repeat(3,minmax(0,1fr));}}

/* Chi tiet tang ca / phep nam tren bang cong tuan */
.mobile-employee-main{min-width:0}
.mobile-totals-month{display:flex;flex-wrap:wrap;justify-content:flex-end;max-width:70%}
.mobile-attendance-details{width:100%;margin-top:8px;padding:9px 10px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;color:#475569;font-size:11px;line-height:1.55}
.mobile-detail-group{padding:3px 0}
.mobile-detail-group>b{display:block;color:#1e3a8a;font-size:11px;margin-bottom:2px}
.mobile-detail-group span{display:inline-block;margin-right:14px;color:#475569}
.mobile-detail-group span b{color:#0f172a}
@media(max-width:700px){
  .mobile-employee-summary{display:block!important;padding:12px!important}
  .mobile-employee-main{margin-bottom:8px}
  .mobile-totals-month{max-width:none!important;justify-content:flex-start!important;gap:5px!important}
  .mobile-totals-month span{font-size:9px!important;padding:6px 7px!important}
  .mobile-attendance-details{font-size:10px;margin-top:8px;padding:8px 9px}
  .mobile-detail-group>b{font-size:10px}
  .mobile-detail-group span{margin-right:10px}
}
.attendance-preview-details{margin-top:8px;padding:8px 10px;border-radius:12px;background:#f8fafc;border:1px solid #e5eaf0}
.attendance-preview-details .mobile-detail-group{margin-top:6px}
.attendance-preview-details .mobile-detail-group:first-child{margin-top:0}
.attendance-preview-details .mobile-detail-group>div{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}
.attendance-preview-details .mobile-detail-group>div span{display:inline-flex;padding:3px 8px;border-radius:999px;background:#fff;border:1px solid #e5eaf0;font-size:12px}

/* 2026.09.14 Mobile app summary cards - gọn, rõ từng mục */
@media(max-width:700px){
  .mobile-employee-summary{
    background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%)!important;
    border-bottom:1px solid #e5eaf0!important;
  }
  .mobile-employee-main{
    padding:0 2px 8px;
    border-bottom:1px solid #edf1f5;
  }
  .mobile-employee-main b{font-size:14px!important;color:#0f172a!important}
  .mobile-employee-main span{font-size:9px!important}

  /* Các chỉ số chính: dạng app chips */
  .mobile-totals-month{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:6px!important;
    margin-top:8px;
  }
  .mobile-totals-month span{
    display:flex!important;
    align-items:center;
    justify-content:space-between;
    gap:5px;
    min-height:38px;
    padding:7px 9px!important;
    background:#fff!important;
    border:1px solid #e2e8f0!important;
    border-radius:10px!important;
    box-shadow:0 2px 7px rgba(15,23,42,.04);
    color:#64748b!important;
    font-size:9px!important;
    font-weight:700;
  }
  .mobile-totals-month span b{
    color:#1d4ed8!important;
    font-size:14px!important;
    line-height:1;
  }

  /* Khối chi tiết */
  .mobile-attendance-details{
    display:grid!important;
    gap:7px!important;
    margin-top:9px!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
    border-radius:0!important;
  }
  .mobile-detail-group{
    position:relative;
    padding:9px 10px!important;
    background:#fff;
    border:1px solid #e5eaf0;
    border-radius:11px;
    box-shadow:0 2px 8px rgba(15,23,42,.035);
  }
  .mobile-detail-group>b{
    display:flex!important;
    align-items:center;
    gap:6px;
    margin:0 0 5px!important;
    padding-bottom:5px;
    border-bottom:1px solid #edf1f5;
    color:#0f172a!important;
    font-size:10px!important;
    font-weight:800!important;
    text-transform:none;
  }
  .mobile-detail-group>b:before{
    content:'';
    display:inline-block;
    width:4px;
    height:15px;
    border-radius:99px;
    background:#2563eb;
  }
  .mobile-detail-group:nth-child(2)>b:before{background:#f59e0b}
  .mobile-detail-group:nth-child(3)>b:before{background:#a855f7}
  .mobile-detail-group>div{
    display:flex!important;
    flex-wrap:wrap;
    gap:5px!important;
    min-height:18px;
  }
  .mobile-detail-group>div span{
    display:inline-flex!important;
    align-items:center;
    margin:0!important;
    padding:4px 8px!important;
    border-radius:7px!important;
    background:#f8fafc!important;
    border:1px solid #e5eaf0!important;
    color:#475569!important;
    font-size:9px!important;
    line-height:1.25;
  }
  .mobile-detail-group>div:empty:after{content:'Chưa có';color:#94a3b8;font-size:9px}

  /* Phần chi tiết trong bảng tháng cũng dùng cùng ngôn ngữ thiết kế */
  .attendance-preview-details{
    margin-top:9px!important;
  }
  .attendance-preview-details .mobile-detail-group>div span{
    font-size:9px!important;
    padding:4px 7px!important;
  }

  /* Summary của bảng tháng: tiêu đề/chips gọn trên màn hình nhỏ */
  .attendance-month-summary,.wb-preview-summary{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:6px!important;
    margin-top:9px!important;
  }
  .attendance-month-summary strong,.wb-preview-summary strong{
    display:flex!important;
    align-items:center;
    justify-content:space-between;
    gap:4px;
    min-height:34px;
    padding:7px 8px!important;
    background:#f8fafc!important;
    border:1px solid #e5eaf0;
    border-radius:9px!important;
    color:#475569!important;
    font-size:9px!important;
    white-space:normal!important;
    line-height:1.2;
  }
  .attendance-month-summary strong b,.wb-preview-summary strong b{
    font-size:13px!important;
    color:#1d4ed8!important;
    white-space:nowrap;
  }
  .attendance-preview-head>div>h3,.wb-preview-head h3{margin-bottom:2px!important}
}

/* 2026.09.14 - Fix font chi tiet tang ca/phép tren mobile */
@media(max-width:700px){
  .mobile-detail-group>div span b,
  .attendance-preview-details .mobile-detail-group>div span b{
    font-size:9px!important;
    line-height:1.25!important;
    font-weight:700!important;
    color:#334155!important;
  }
  .mobile-detail-group>div{gap:5px 7px!important;}
  .mobile-detail-group>div span{font-size:9px!important;line-height:1.25!important;}
}
/* V10.2.11 leave balance/detail mobile */
@media(max-width:700px){
  .mobile-totals-month{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px!important;width:100%;}
  .mobile-totals-month span{font-size:9px!important;line-height:1.25!important;padding:6px 7px!important;white-space:normal!important;}
  .mobile-totals-month span b{font-size:10px!important;}
  .attendance-month-summary{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px!important;}
  .attendance-month-summary strong{font-size:9px!important;white-space:normal!important;line-height:1.25!important;}
  .attendance-month-summary strong b{font-size:10px!important;}
}


/* Leave balance history - mobile app style */
.leave-balance-button{border:0;background:#f8fafc;color:#334155;font:inherit;font-size:10px;padding:5px 8px;border-radius:10px;cursor:pointer;display:inline-flex;align-items:center;gap:3px;white-space:nowrap}.leave-balance-button b{color:#1d4ed8;font-size:12px}.leave-history-link{font-size:8px;color:#64748b;text-decoration:underline;margin-left:2px}.leave-balance-button:active{transform:scale(.98)}
.leave-history-modal{position:fixed;inset:0;z-index:9999;display:none}.leave-history-modal.is-open{display:block}.leave-history-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.45);backdrop-filter:blur(2px)}.leave-history-dialog{position:absolute;left:50%;bottom:14px;transform:translateX(-50%);width:min(94vw,430px);max-height:78vh;background:#fff;border-radius:20px;box-shadow:0 18px 55px rgba(15,23,42,.28);overflow:hidden}.leave-history-head{display:flex;justify-content:space-between;align-items:center;padding:15px 16px 11px;border-bottom:1px solid #e5eaf0}.leave-history-head h3{margin:0;font-size:16px;color:#0f172a}.leave-history-head small{display:block;margin-top:3px;color:#64748b;font-size:10px}.leave-history-close{width:32px;height:32px;border:0;border-radius:50%;background:#f1f5f9;font-size:22px;color:#475569;cursor:pointer}.leave-history-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;padding:10px 12px;background:#f8fafc}.leave-history-summary span{font-size:9px;color:#64748b;text-align:center;background:#fff;border:1px solid #e5eaf0;border-radius:10px;padding:7px 3px}.leave-history-summary b{display:block;color:#1d4ed8;font-size:13px;margin-top:2px}.leave-history-list{padding:10px 12px;max-height:48vh;overflow:auto}.leave-history-item{display:flex;align-items:center;gap:9px;padding:9px 5px;border-bottom:1px solid #eef2f7}.leave-history-index{width:24px;height:24px;display:grid;place-items:center;border-radius:8px;background:#f3e8ff;color:#7e22ce;font-size:9px;font-weight:700}.leave-history-item div{flex:1;min-width:0}.leave-history-item b{display:block;font-size:11px;color:#1e293b}.leave-history-item small{display:block;color:#64748b;font-size:9px;margin-top:2px}.leave-history-item>strong{font-size:11px;color:#dc2626}.leave-history-empty{text-align:center;color:#94a3b8;font-size:11px;padding:24px 8px}.leave-history-open{overflow:hidden}
@media(min-width:701px){.leave-history-dialog{bottom:50%;transform:translate(-50%,50%)}}

/* Weekend overtime detail dates */
.attendance-preview-details .mobile-detail-group>div>span{display:flex;flex-direction:column;gap:2px;font-size:12px;line-height:1.35;margin:3px 0}.attendance-preview-details .mobile-detail-group>div>span b{font-size:12px;font-weight:700}.attendance-preview-details .mobile-detail-group>div>span small{font-size:11px;font-weight:500;opacity:.8}.attendance-preview-details .mobile-detail-group>div>span:not(:has(small)){display:inline-flex;margin-right:8px}

/* V10.2.12 - Chi tiet tang ca cuoi tuan: hien ngay giong bang thang */
@media(max-width:700px){
  #mobileWeekendDetail .mobile-detail-item,
  #attendancePreviewWeekendDetail .mobile-detail-item,
  #wbPreviewWeekendDetail .mobile-detail-item{
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    gap:2px!important;
    margin:0!important;
    padding:4px 8px!important;
  }
  #mobileWeekendDetail .mobile-detail-item b,
  #attendancePreviewWeekendDetail .mobile-detail-item b,
  #wbPreviewWeekendDetail .mobile-detail-item b{
    font-size:10px!important;
    line-height:1.25!important;
    font-weight:700!important;
    color:#334155!important;
  }
  #mobileWeekendDetail .mobile-detail-item small,
  #attendancePreviewWeekendDetail .mobile-detail-item small,
  #wbPreviewWeekendDetail .mobile-detail-item small{
    display:block!important;
    font-size:9px!important;
    line-height:1.25!important;
    color:#64748b!important;
    opacity:1!important;
    white-space:nowrap!important;
  }
}

/* Truc 2 Thu 7 - hien ro ngay va trang thai du/ thieu */
.mobile-detail-group .duty-day,.mobile-detail-group .duty-status{display:flex!important;align-items:center;gap:6px;width:100%;margin:3px 0!important;padding:4px 7px;border-radius:7px;background:#fff;border:1px solid #e5eaf0;font-size:10px!important;color:#334155!important;box-sizing:border-box}
.mobile-detail-group .duty-day b{font-size:10px!important;font-weight:600;color:#0f172a!important}.mobile-detail-group .duty-day small{font-size:9px!important;color:#64748b}.mobile-detail-group .duty-status{font-weight:600}.mobile-detail-group .duty-missing{color:#b45309!important;background:#fffbeb;border-color:#fde68a}.mobile-detail-group .duty-ok{color:#047857!important;background:#ecfdf5;border-color:#a7f3d0}
@media(max-width:700px){.mobile-detail-group .duty-day,.mobile-detail-group .duty-status{font-size:10px!important;padding:4px 7px}.mobile-detail-group .duty-day b{font-size:10px!important}.mobile-detail-group .duty-day small{font-size:9px!important}}


/* V10.3 - mobile app shell inspired by quocdai.site/upanh */
.mobile-bottom-nav{display:none}
@media(max-width:700px){
  body{padding-bottom:70px}
  .main{min-height:100vh}
  .content{padding-bottom:18px!important}
  .topbar{background:#fff;border-bottom:1px solid #edf1f5;box-shadow:0 2px 10px rgba(15,23,42,.04)}
  .mobile-bottom-nav{position:fixed;display:grid;grid-template-columns:repeat(4,1fr);left:8px;right:8px;bottom:8px;height:58px;background:rgba(255,255,255,.97);border:1px solid #e6ebf1;border-radius:18px;box-shadow:0 10px 30px rgba(15,23,42,.12);z-index:9000;padding:4px;backdrop-filter:blur(10px)}
  .mobile-bottom-nav a{min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border-radius:13px;color:#64748b;font-size:9px;font-weight:700}
  .mobile-bottom-nav a b{font-size:18px;line-height:20px;font-weight:700}
  .mobile-bottom-nav a span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
  .mobile-bottom-nav a.active{background:#eff6ff;color:#2563eb}
  .mobile-bottom-nav a:active{transform:scale(.97)}
  body.month .mobile-week-section{display:none!important}
  body.week .wp-mobile{margin-bottom:10px}
  body.month .attendance-preview-card{display:block!important}
  body.month .attendance-preview-card{width:100%;max-width:none}
  body.month .attendance-preview-head,.attendance-preview-head{width:100%}
  .hero,.page-head{border-radius:16px;padding:17px;margin-bottom:10px}
  .hero h2,.page-head h2{font-size:20px}
  .stats{grid-template-columns:repeat(2,1fr);gap:7px}
  .stat{padding:12px;border-radius:13px}
  .stat strong{font-size:22px;margin:5px 0}
  .grid2{grid-template-columns:1fr;gap:8px}
  .card{padding:14px;border-radius:14px}
  .quick{grid-template-columns:repeat(2,1fr)}
  .quick a{padding:12px;border-radius:11px}
}

/* V10.4 - month is a truly separate mobile screen; only its own controls/table remain visible */
@media(max-width:700px){
  body.month #weeklyAttendanceEditor{display:none!important;visibility:hidden!important;height:0!important;min-height:0!important;margin:0!important;padding:0!important;overflow:hidden!important;}
  body.month .attendance-preview-card{display:block!important;width:100%!important;max-width:none!important;}
  body.month .attendance-preview-head{width:100%!important;box-sizing:border-box!important;}
  .month-mobile-selector{display:block;width:100%;margin:10px 0 8px;}
  .month-mobile-selector label{display:block;font-size:11px;font-weight:700;color:#475569;}
  .month-mobile-selector select{display:block;width:100%;height:42px;margin-top:5px;padding:0 12px;border:1px solid #dbe3ec;border-radius:10px;background:#fff;color:#0f172a;font-size:14px;font-weight:600;box-sizing:border-box;}
}
@media(min-width:701px){.month-mobile-selector{display:none!important;}}

/* 2026.09.14 - Tháng: đồng bộ khối thông tin với Công Tuần, full width */
@media(max-width:700px){
  .attendance-preview-card .attendance-preview-head{display:block!important;width:100%!important;box-sizing:border-box;padding:12px 10px!important}
  .attendance-preview-card .attendance-preview-head>div{width:100%!important;max-width:none!important}
  .attendance-preview-card .attendance-month-summary{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    width:100%!important;
    max-width:none!important;
    box-sizing:border-box!important;
    gap:6px!important;
    margin:9px 0 0!important;
  }
  .attendance-preview-card .attendance-month-summary>strong,
  .attendance-preview-card .attendance-month-summary>.leave-balance-button{
    width:100%!important;
    min-width:0!important;
    min-height:38px!important;
    box-sizing:border-box!important;
    margin:0!important;
    padding:7px 9px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:5px!important;
    border:1px solid #e2e8f0!important;
    border-radius:10px!important;
    background:#fff!important;
    color:#64748b!important;
    font-size:9px!important;
    line-height:1.2!important;
    white-space:normal!important;
  }
  .attendance-preview-card .attendance-month-summary>strong b,
  .attendance-preview-card .attendance-month-summary>.leave-balance-button b{
    color:#1d4ed8!important;
    font-size:13px!important;
    line-height:1!important;
    white-space:nowrap!important;
  }
  .attendance-preview-card .attendance-month-summary .leave-history-link{
    font-size:8px!important;
    margin-left:2px!important;
    white-space:nowrap!important;
  }
  .attendance-preview-card .attendance-preview-details{
    width:100%!important;
    box-sizing:border-box!important;
    margin:9px 0 0!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
  }
  .attendance-preview-card .attendance-preview-details .mobile-detail-group{
    width:100%!important;
    box-sizing:border-box!important;
    margin:0 0 7px!important;
    padding:9px 10px!important;
    background:#fff!important;
    border:1px solid #e5eaf0!important;
    border-radius:11px!important;
  }
  .attendance-preview-card .attendance-preview-details .mobile-detail-group>b{
    display:flex!important;
    width:100%!important;
    box-sizing:border-box!important;
    align-items:center!important;
    margin:0 0 5px!important;
    padding:0 0 5px!important;
    border-bottom:1px solid #edf1f5!important;
    color:#0f172a!important;
    font-size:10px!important;
  }
  .attendance-preview-card .attendance-preview-details .mobile-detail-group>div{
    display:block!important;
    width:100%!important;
    box-sizing:border-box!important;
    min-height:18px!important;
    margin:0!important;
  }
  .attendance-preview-card .attendance-preview-details .mobile-detail-group>div span{
    display:flex!important;
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    margin:0 0 4px!important;
    padding:4px 7px!important;
    border-radius:7px!important;
    background:#f8fafc!important;
    border:1px solid #e5eaf0!important;
    color:#475569!important;
    font-size:9px!important;
    line-height:1.3!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }
  .attendance-preview-card .attendance-preview-details .mobile-detail-group>div span:last-child{margin-bottom:0!important}
  .attendance-preview-card .attendance-preview-details .mobile-detail-group>div span b{font-size:9px!important}
  .attendance-preview-card .attendance-preview-details .mobile-detail-group>div span small{font-size:8px!important}
}

/* =========================================================
   MOBILE APP MODE v11 — touch-first UI
   Keeps desktop markup/data intact; mobile gets an app shell.
   ========================================================= */
@media (max-width:700px){
  :root{--mobile-nav-h:68px;--mobile-radius:18px}
  html{background:#f5f7fb;-webkit-tap-highlight-color:transparent}
  body{font-size:13px;padding-bottom:calc(var(--mobile-nav-h) + env(safe-area-inset-bottom));overflow-x:hidden}
  body.nav-open{overflow:hidden}
  .sidebar{display:none!important}
  .main{margin:0!important;width:100%!important;min-width:0!important}
  .topbar{height:60px!important;padding:0 14px!important;position:sticky!important;top:0!important;z-index:40!important;border-bottom:1px solid #e8edf3!important;box-shadow:0 2px 12px rgba(15,23,42,.04)}
  .topbar>div:first-child:not(.mobile-brand){display:none!important}
  .mobile-brand{display:flex!important;align-items:center!important;gap:8px!important;min-width:0!important;max-width:72%!important;font-weight:800!important;color:#0f172a!important}
  .mobile-doosan{font-size:11px!important;letter-spacing:1.1px!important;color:#1677bd!important;background:#eef7ff!important;padding:7px 8px!important;border-radius:9px!important}
  .mobile-brand span:last-child{font-size:13px!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap!important}
  .top-right{gap:7px!important}.top-right .pill{display:none!important}
  .menu-btn{display:none!important}
  .content{padding:12px 12px 20px!important;max-width:none!important}
  .hero,.page-head{border-radius:var(--mobile-radius)!important;padding:17px!important;margin-bottom:12px!important;display:block!important}
  .hero h2,.page-head h2{font-size:20px!important;line-height:1.2!important}
  .hero p,.page-head p{font-size:11px!important;line-height:1.45!important}
  .stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;margin-bottom:12px!important}
  .stat{padding:13px!important;border-radius:15px!important}.stat strong{font-size:22px!important;margin:6px 0!important}.stat span,.stat small{font-size:10px!important}
  .grid2{grid-template-columns:1fr!important;gap:10px!important;margin-bottom:10px!important}.card{padding:14px!important;border-radius:16px!important}
  .quick{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}.quick a{padding:13px 8px!important;border-radius:13px!important}.quick b{font-size:20px!important}
  .toolbar-card{display:block!important;padding:10px!important;border-radius:15px!important}.toolbar-card .actions{margin-top:8px!important}
  .period-form{display:grid!important;grid-template-columns:1fr 1fr!important}.period-form .btn{min-height:40px!important}.period-form select,.period-form input{height:40px!important;min-width:0!important}
  .data-table{font-size:10px!important}.data-table th,.data-table td{padding:9px 7px!important}
  .form-grid{grid-template-columns:1fr!important}.form-actions{display:grid!important;grid-template-columns:1fr!important}
  #wbMetaCard,.approval-grid,.wp-note,.wb-note-legend{display:none!important}
  .mobile-bottom-nav{position:fixed!important;left:0!important;right:0!important;bottom:0!important;height:calc(var(--mobile-nav-h) + env(safe-area-inset-bottom))!important;padding:6px 5px env(safe-area-inset-bottom)!important;background:rgba(255,255,255,.96)!important;backdrop-filter:blur(18px)!important;-webkit-backdrop-filter:blur(18px)!important;border-top:1px solid #e2e8f0!important;box-shadow:0 -8px 25px rgba(15,23,42,.08)!important;z-index:100!important;display:grid!important;grid-template-columns:repeat(5,1fr)!important;gap:2px!important}
  .mobile-bottom-nav a,.mobile-bottom-nav .mobile-more-btn{appearance:none!important;border:0!important;background:transparent!important;color:#64748b!important;min-width:0!important;text-decoration:none!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:3px!important;border-radius:12px!important;font:inherit!important;cursor:pointer!important}
  .mobile-bottom-nav b{font-size:19px!important;line-height:20px!important;font-weight:700!important}.mobile-bottom-nav span{font-size:9px!important;font-weight:700!important}.mobile-bottom-nav a.active{color:#2563eb!important;background:#eff6ff!important}
  .mobile-more-sheet[hidden]{display:none!important}.mobile-more-sheet{position:fixed!important;inset:0!important;z-index:120!important}.mobile-sheet-backdrop{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;border:0!important;background:rgba(15,23,42,.42)!important}.mobile-sheet-panel{position:absolute!important;left:0!important;right:0!important;bottom:0!important;background:#fff!important;border-radius:22px 22px 0 0!important;padding:8px 14px calc(18px + env(safe-area-inset-bottom))!important;box-shadow:0 -20px 50px rgba(15,23,42,.18)!important;animation:mobileSheetUp .18s ease-out}
  .mobile-sheet-handle{width:38px;height:4px;background:#cbd5e1;border-radius:99px;margin:2px auto 10px}.mobile-sheet-title{display:flex;justify-content:space-between;align-items:center;padding:4px 2px 12px;font-size:17px}.mobile-sheet-close{border:0;background:#f1f5f9;width:32px;height:32px;border-radius:50%;font-size:20px;color:#475569}.mobile-sheet-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.mobile-sheet-grid a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:76px;background:#f8fafc;border:1px solid #e8edf3;border-radius:14px;color:#334155;text-decoration:none;font-size:22px}.mobile-sheet-grid a span{font-size:10px;font-weight:700}.mobile-sheet-grid a.danger{color:#dc2626;background:#fff7f7}
  .toast{left:12px!important;right:12px!important;bottom:calc(var(--mobile-nav-h) + 12px + env(safe-area-inset-bottom))!important;text-align:center!important;border-radius:13px!important}
  .table-card{border-radius:15px!important}.table-scroll{max-height:none!important}
  .batch-panel{padding:12px!important;border-radius:14px!important}.batch-card{padding:12px!important}.share-preview{display:none!important}
  .auth-body{padding:14px!important}.auth-card{padding:22px!important;border-radius:18px!important}
}
@keyframes mobileSheetUp{from{transform:translateY(30px);opacity:.7}to{transform:none;opacity:1}}
@media (min-width:701px){.mobile-more-sheet,.mobile-more-btn{display:none!important}}

/* ================================================================
   MOBILE APP V12 — final cleanup / app-first layout
   - 5-tab navigation
   - Month screen uses the same touch editor as Week screen
   - No horizontal spreadsheet on phones
   - larger touch targets, safe-area support
   ================================================================ */
@media (max-width:700px){
  :root{--mobile-nav-h:68px;--touch-min:44px;}
  html{background:#f5f7fb;}
  body{padding-bottom:calc(var(--mobile-nav-h) + env(safe-area-inset-bottom) + 8px);overflow-x:hidden;-webkit-tap-highlight-color:transparent;}
  body .sidebar{display:none;}
  body .app{display:block;min-height:100dvh;}
  body .main{width:100%;min-width:0;min-height:100dvh;margin:0;}
  body .topbar{position:sticky;top:0;z-index:8000;min-height:58px;padding:8px 12px;box-sizing:border-box;}
  body .topbar>div:nth-child(2){min-width:0;}
  body .topbar .eyebrow{display:none;}
  body .topbar h1{font-size:16px;line-height:1.2;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  body .mobile-brand{display:flex;align-items:center;gap:7px;font-size:10px;max-width:48%;overflow:hidden;white-space:nowrap;}
  body .mobile-brand .mobile-doosan{font-weight:900;letter-spacing:.04em;}
  body .top-right .pill{display:none;}
  body .menu-btn{display:none;}
  body .content{padding:10px 10px 18px;}

  /* Native-looking bottom navigation */
  .mobile-bottom-nav{left:7px;right:7px;bottom:calc(7px + env(safe-area-inset-bottom));height:var(--mobile-nav-h);grid-template-columns:repeat(5,1fr);padding:5px;border-radius:20px;}
  .mobile-bottom-nav a,.mobile-bottom-nav button{min-height:54px;border:0;background:transparent;font:inherit;color:#64748b;}
  .mobile-bottom-nav a b,.mobile-bottom-nav button b{font-size:19px;line-height:20px;}
  .mobile-bottom-nav a span,.mobile-bottom-nav button span{font-size:9px;}
  .mobile-bottom-nav a.active{background:#eaf2ff;color:#2563eb;}
  .mobile-more-btn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border-radius:13px;}
  .mobile-more-btn:active{transform:scale(.96);background:#f1f5f9;}

  /* More sheet */
  .mobile-more-sheet{position:fixed;inset:0;z-index:9500;}
  .mobile-sheet-panel{padding-bottom:calc(16px + env(safe-area-inset-bottom));}
  .mobile-sheet-grid a{min-height:58px;}

  /* Cards / forms */
  .card,.dc-card{border-radius:16px;box-shadow:0 2px 12px rgba(15,23,42,.05);}
  button,.btn,input,select{min-height:var(--touch-min);}
  select{font-size:16px!important;}
  .page-head,.hero{margin:0 0 10px;border-radius:16px;}

  /* Month is NOT a spreadsheet on a phone. Reuse the touch editor. */
  body.month #weeklyAttendanceEditor{display:block;visibility:visible;height:auto;min-height:0;margin:0;padding:0;overflow:visible;}
  body.month .attendance-preview-card{display:none;}
  body.month .month-mobile-selector{display:none;}
  body.month #weeklyAttendanceEditor .mobile-editor-head{position:sticky;top:58px;z-index:20;border-radius:16px 16px 0 0;}
  body.month #weeklyAttendanceEditor .mobile-selectors{position:sticky;top:122px;z-index:19;box-shadow:0 3px 10px rgba(15,23,42,.05);}
  body.month #weeklyAttendanceEditor .mobile-week-section{display:block;}

  /* Day cells become clear touch cards */
  .mobile-days{gap:7px!important;}
  .mobile-day{min-height:70px;border-radius:14px!important;}
  .mobile-day-label{min-width:48px;}
  .mobile-day-label b{font-size:17px!important;}
  .mobile-day-label span{font-size:10px!important;}
  .mobile-day .att{min-height:52px!important;font-size:20px!important;font-weight:800;}
  .mobile-selectors{gap:8px!important;}
  .mobile-selectors label{font-size:10px!important;}

  /* Hide duplicate desktop-only explanations/actions on the phone */
  .wp-note,.approval-grid,.attendance-preview-tip,.attendance-preview-actions{display:none;}

  /* Employee summary becomes compact app card */
  .mobile-employee-summary{margin-top:10px;border-radius:16px;}
  .mobile-employee-main b{font-size:15px!important;}
  .mobile-totals{max-width:none!important;}
  .mobile-totals-month{grid-template-columns:repeat(2,minmax(0,1fr));}

  /* Leave history */
  .leave-history-dialog{width:calc(100vw - 20px);max-height:82dvh;border-radius:22px;}
}

@media (min-width:701px){
  .mobile-bottom-nav,.mobile-more-sheet{display:none!important;}
}
