:root{
  --bg:#f7f3ea;
  --bg-soft:#fffaf1;
  --panel:#ffffff;
  --panel-soft:#fffdf8;
  --line:#eadfce;
  --line-2:#d8c8af;
  --text:#2d2418;
  --muted:#7a6a56;
  --primary:#d97a2b;
  --primary-2:#ffb347;
  --green:#4f8b4a;
  --red:#d15241;
  --blue:#2a79c5;
  --shadow:0 10px 28px rgba(106,79,43,.12);
  --radius:22px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:"Microsoft JhengHei","Noto Sans TC",sans-serif;
  background:
    radial-gradient(circle at top right, #fff4d8 0%, rgba(255,244,216,0) 26%),
    radial-gradient(circle at top left, #fce8cc 0%, rgba(252,232,204,0) 24%),
    var(--bg);
  color:var(--text);
}

a{text-decoration:none}
img{max-width:100%;display:block}

.input, select, textarea{
  width:100%;
  border:1px solid var(--line-2);
  border-radius:16px;
  padding:14px 16px;
  background:#fff;
  color:var(--text);
  font-size:16px;
  outline:none;
}
.input:focus, select:focus, textarea:focus{
  border-color:var(--primary);
  box-shadow:0 0 0 4px rgba(217,122,43,.12);
}

label{
  display:block;
  margin:14px 0 8px;
  font-weight:700;
  color:#463724;
}

.btn{
  border:none;
  border-radius:16px;
  background:linear-gradient(135deg,var(--primary),var(--primary-2));
  color:#fff;
  padding:13px 20px;
  font-size:16px;
  font-weight:800;
  cursor:pointer;
  box-shadow:var(--shadow);
}
.btn:hover{transform:translateY(-1px)}
.btn-secondary{
  background:#fff;
  color:var(--text);
  border:1px solid var(--line-2);
  box-shadow:none;
}
.btn-danger{
  background:linear-gradient(135deg,#d84f3f,#f08a74);
}

.flash{
  margin-top:14px;
  padding:14px 16px;
  border-radius:14px;
  font-weight:700;
}
.flash.error{
  background:#fff0ed;
  border:1px solid #f4c4bb;
  color:#a43c2d;
}
.flash.ok{
  background:#effaf1;
  border:1px solid #b9e3c0;
  color:#25703b;
}

.login-page{
  min-height:100vh;
}
.login-shell{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:32px;
}
.login-card-v5{
  width:min(1120px,100%);
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:30px;
  box-shadow:var(--shadow);
  overflow:hidden;
  display:grid;
  grid-template-columns: 1.1fr .9fr;
}
.login-hero-v5{
  padding:42px;
  background:
    linear-gradient(135deg, rgba(255,183,71,.18), rgba(255,255,255,.08)),
    linear-gradient(135deg,#fff5df,#fff9ef);
}
.login-brand{
  display:flex;
  align-items:center;
  gap:18px;
}
.login-brand-logo{
  width:84px;height:84px;object-fit:contain;
  border-radius:20px;
  background:#fff;
  padding:8px;
  border:1px solid var(--line);
}
.login-brand-title{
  font-size:40px;
  font-weight:900;
  color:#47331c;
}
.login-brand-sub{
  font-size:20px;
  color:var(--muted);
  margin-top:4px;
}
.login-hero-title{
  margin-top:34px;
  font-size:34px;
  font-weight:900;
  color:#8a4d14;
}
.login-hero-desc{
  margin-top:12px;
  color:#6f5b44;
  font-size:18px;
  line-height:1.8;
}
.hero-badges{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:24px;
}
.hero-badges span{
  padding:10px 14px;
  border-radius:999px;
  background:#fff;
  border:1px solid var(--line);
  font-weight:800;
  color:#6e532d;
}

.login-form-v5{
  padding:42px;
  background:#fff;
}
.login-form-v5 h2{
  margin:0;
  font-size:34px;
  color:#2f2417;
}
.muted{
  color:var(--muted);
}

.breakfast-home{
  max-width:1480px;
  margin:0 auto;
  padding:22px;
}
.home-hero{
  background:
    linear-gradient(135deg, rgba(255,183,71,.14), rgba(255,255,255,.6)),
    var(--panel);
  border:1px solid var(--line);
  border-radius:30px;
  box-shadow:var(--shadow);
  padding:24px;
  display:grid;
  grid-template-columns: 320px 1fr;
  gap:24px;
  align-items:center;
}
.home-brand-box{
  display:flex;
  align-items:center;
  gap:18px;
}
.home-brand-box img{
  width:96px;height:96px;object-fit:contain;
  background:#fff;
  border-radius:22px;
  border:1px solid var(--line);
  padding:8px;
}
.home-brand-title{
  font-size:32px;
  font-weight:900;
}
.home-brand-sub{
  font-size:18px;
  color:var(--muted);
  margin-top:6px;
}
.home-links{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:18px;
}
.home-link-btn{
  padding:14px 18px;
  border-radius:16px;
  background:#fff;
  border:1px solid var(--line-2);
  color:var(--text);
  font-weight:800;
}
.home-status{
  display:grid;
  grid-template-columns: repeat(3,1fr);
  gap:16px;
}
.home-status-card{
  background:#fffefb;
  border:1px solid var(--line);
  border-radius:22px;
  padding:18px;
}
.home-status-card .t{
  color:var(--muted);
  font-size:14px;
}
.home-status-card .v{
  margin-top:8px;
  font-size:28px;
  font-weight:900;
  color:#0f274f;
}

.breakfast-pos-shell{
  max-width:1680px;
  margin:0 auto;
  padding:18px;
}
.pos-v5-layout{
  display:grid;
  grid-template-columns: 1.6fr .95fr;
  gap:18px;
}
.pos-header-v5{
  background:
    linear-gradient(135deg,#fff4d8,#fffdf4);
  border:1px solid var(--line);
  border-radius:28px;
  padding:18px 22px;
  margin-bottom:18px;
  box-shadow:var(--shadow);
}
.pos-header-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  flex-wrap:wrap;
}
.pos-title-wrap{
  display:flex;
  align-items:center;
  gap:16px;
}
.pos-title-wrap img{
  width:76px;height:76px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  padding:6px;
}
.pos-title{
  font-size:34px;
  font-weight:900;
  color:#47331c;
}
.pos-sub{
  color:var(--muted);
  margin-top:4px;
}

.category-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:18px;
}
.category-tab{
  padding:12px 16px;
  border-radius:999px;
  background:#fff;
  border:1px solid var(--line-2);
  color:#5a462d;
  font-weight:900;
  cursor:pointer;
}
.category-tab.active{
  background:linear-gradient(135deg,var(--primary),var(--primary-2));
  border-color:transparent;
  color:#fff;
}

.pos-products-wrap{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:28px;
  padding:20px;
  box-shadow:var(--shadow);
}
.pos-products-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  margin-bottom:16px;
  flex-wrap:wrap;
}
.pos-products-head h2{
  margin:0;
  font-size:30px;
  color:#3a2a18;
}
.pos-products-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(170px,1fr));
  gap:14px;
}
.product-card-v5{
  background:
    linear-gradient(180deg,#fffdf8,#fff8ee);
  border:1px solid #eadcc8;
  border-radius:22px;
  padding:14px;
  min-height:148px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  cursor:pointer;
  transition:.15s ease;
}
.product-card-v5:hover{
  transform:translateY(-2px);
  box-shadow:0 12px 24px rgba(111,73,30,.12);
}
.product-station{
  font-size:13px;
  font-weight:800;
  color:#8b6b45;
}
.product-name{
  font-size:28px;
  font-weight:900;
  color:#1e2b3d;
  line-height:1.25;
  margin-top:6px;
}
.product-price{
  font-size:22px;
  font-weight:900;
  color:var(--red);
  margin-top:10px;
}

.order-panel-v5{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:28px;
  padding:18px;
  box-shadow:var(--shadow);
  position:sticky;
  top:16px;
  height:fit-content;
}
.order-panel-v5 h2{
  margin:0 0 12px;
  font-size:32px;
}
.order-meta-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}
.meta-box{
  background:#fffaf3;
  border:1px solid var(--line);
  border-radius:18px;
  padding:14px;
}
.meta-box .label{
  font-size:14px;
  color:var(--muted);
  margin-bottom:8px;
}
.order-items-list{
  margin-top:16px;
  display:grid;
  gap:10px;
  max-height:420px;
  overflow:auto;
}
.order-item-card{
  background:#fffefb;
  border:1px solid var(--line);
  border-radius:18px;
  padding:12px;
}
.order-item-top{
  display:flex;
  justify-content:space-between;
  gap:12px;
}
.order-item-name{
  font-weight:900;
  font-size:20px;
}
.order-item-options{
  color:#735d43;
  margin-top:6px;
  line-height:1.6;
  font-size:14px;
}
.order-total-box{
  margin-top:16px;
  background:#fff4e1;
  border:1px solid #efd2ab;
  border-radius:18px;
  padding:16px;
}
.order-total-line{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:18px;
  font-weight:900;
}
.order-total-line strong{
  font-size:34px;
  color:#b14619;
}

.mobile-v5{
  max-width:760px;
  margin:0 auto;
  padding:14px;
}
.mobile-hero{
  background:linear-gradient(135deg,#fff3d3,#fffdf6);
  border:1px solid var(--line);
  border-radius:24px;
  padding:16px;
  box-shadow:var(--shadow);
}
.mobile-hero-top{
  display:flex;
  gap:12px;
  align-items:center;
}
.mobile-hero-top img{
  width:64px;height:64px;
  background:#fff;
  border-radius:16px;
  border:1px solid var(--line);
  padding:6px;
}
.mobile-brand-title{
  font-size:28px;
  font-weight:900;
}
.mobile-brand-sub{
  color:var(--muted);
  margin-top:4px;
}
.mobile-search{
  margin-top:14px;
}
.mobile-category-scroll{
  display:flex;
  gap:10px;
  overflow-x:auto;
  padding-bottom:4px;
  margin-top:14px;
}
.mobile-category-pill{
  white-space:nowrap;
  padding:10px 14px;
  background:#fff;
  border:1px solid var(--line-2);
  border-radius:999px;
  font-weight:800;
}
.mobile-products{
  margin-top:14px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.mobile-product-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:20px;
  padding:14px;
  box-shadow:0 6px 16px rgba(86,63,31,.08);
}
.mobile-product-name{
  font-size:20px;
  font-weight:900;
  line-height:1.35;
  color:#17314f;
}
.mobile-product-meta{
  font-size:13px;
  color:var(--muted);
  margin-top:4px;
}
.mobile-product-price{
  margin-top:12px;
  font-size:24px;
  font-weight:900;
  color:var(--red);
}
.mobile-bottom-cart{
  position:sticky;
  bottom:10px;
  margin-top:18px;
  background:linear-gradient(135deg,var(--primary),var(--primary-2));
  color:#fff;
  border-radius:20px;
  padding:16px 18px;
  box-shadow:0 12px 28px rgba(167,98,21,.2);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.mobile-bottom-cart .big{
  font-size:24px;
  font-weight:900;
}

@media (max-width: 1100px){
  .login-card-v5{grid-template-columns:1fr}
  .home-hero{grid-template-columns:1fr}
  .home-status{grid-template-columns:1fr}
  .pos-v5-layout{grid-template-columns:1fr}
  .order-panel-v5{position:static}
}
@media (max-width: 768px){
  .breakfast-home,
  .breakfast-pos-shell{padding:12px}
  .pos-products-grid{grid-template-columns: repeat(2, 1fr)}
  .product-name{font-size:22px}
}

/* =========================================================
   V5 後台骨架修正：防止 LOGO 爆大
   ========================================================= */

.app-shell {
    display: block;
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(255, 187, 97, .25), transparent 26%),
        linear-gradient(180deg, #fff9ec 0%, #f2eadc 100%);
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 286px;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    background: linear-gradient(180deg, #2b2117 0%, #4b2d16 100%);
    padding: 20px;
    border-right: 1px solid rgba(255,255,255,.12);
    box-sizing: border-box;
    z-index: 1000;
}

.main {
    margin-left: 286px;
    min-height: 100vh;
    padding: 24px;
    box-sizing: border-box;
}

.main.no-sidebar {
    margin-left: 0;
    width: 100%;
    max-width: none;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 24px;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.14);
    margin-bottom: 18px;
}

.brand-logo,
.sidebar .brand-logo,
img.brand-logo {
    width: 72px !important;
    height: 72px !important;
    max-width: 72px !important;
    max-height: 72px !important;
    min-width: 72px !important;
    object-fit: contain !important;
    display: block !important;
    border-radius: 18px;
    background: #fff;
    padding: 6px;
    box-sizing: border-box;
}

.brand-title {
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.3;
}

.brand-sub {
    color: #ffe2b9;
    font-size: 13px;
    margin-top: 4px;
    font-weight: 700;
}

.sidebar-nav,
.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-nav a,
.sidebar nav a {
    display: block;
    padding: 14px 16px;
    border-radius: 16px;
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.08);
}

.sidebar-nav a:hover,
.sidebar nav a:hover {
    background: rgba(255,255,255,.16);
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.topbar h1 {
    margin: 0;
    font-size: 46px;
    line-height: 1.1;
    color: #2d2418;
    font-weight: 900;
}

.eyebrow {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff0d7;
    color: #b14619;
    font-weight: 900;
    margin-bottom: 12px;
}

.subtle {
    color: #80674a;
    margin-top: 8px;
    font-weight: 700;
}

.alert-box {
    background: #fff;
    border: 1px solid #eadfce;
    border-radius: 20px;
    padding: 14px;
    max-width: 460px;
    box-shadow: 0 8px 20px rgba(107,79,35,.08);
}

.alert-chip {
    display: inline-flex;
    margin: 8px 6px 0 0;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff0ed;
    color: #a43c2d;
    font-weight: 800;
    font-size: 13px;
}

.panel {
    background: #fff;
    border: 1px solid #eadfce;
    border-radius: 28px;
    padding: 22px;
    box-shadow: 0 10px 28px rgba(107, 79, 35, .08);
}

.small {
    font-size: 14px;
    color: #80674a;
}

.flash {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 16px;
    font-weight: 800;
}

.flash.ok {
    background: #effaf1;
    border: 1px solid #b9e3c0;
    color: #25703b;
}

.flash.error {
    background: #fff0ed;
    border: 1px solid #f4c4bb;
    color: #a43c2d;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #d97a2b, #ffb347);
    color: #fff;
    padding: 12px 18px;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    text-decoration: none;
}

.btn-secondary {
    background: #fff;
    color: #3a2814;
    border: 1px solid #d8c8af;
}

.status-badge {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 900;
}

.status-ready {
    background: #e8fff1;
    color: #168047;
}

.status-warning {
    background: #fff2d8;
    color: #a65b00;
}

.status-cancel {
    background: #fff0ed;
    color: #a43c2d;
}

@media (max-width: 1100px) {
    .sidebar {
        display: none;
    }

    .main {
        margin-left: 0;
        padding: 14px;
    }

    .topbar h1 {
        font-size: 34px;
    }
}