/* =============================================================
   Yimyam Photo Booth — Admin / POS
   ============================================================= */
:root {
  --yy-pink: #e0287a;
  --yy-pink-soft: #fde7f1;
  --yy-teal: #0e9aa7;
  --yy-teal-soft: #dff4f5;
  --yy-orange: #f26522;
  --yy-orange-soft: #feeadf;
  --yy-yellow: #ffc83d;
  --yy-yellow-soft: #fff5d9;
  --yy-purple: #6c4ab6;
  --yy-purple-soft: #ece6f8;
  --yy-navy: #241b3d;
  --yy-text: #2b2440;
  --yy-muted: #7a7490;
  --yy-bg: #f7f5fb;
  --yy-surface: #ffffff;
  --yy-border: #ebe7f3;
  --yy-radius: 18px;
  --yy-radius-sm: 12px;
  --yy-shadow: 0 6px 24px rgba(36, 27, 61, .07);
  --yy-shadow-hover: 0 12px 32px rgba(36, 27, 61, .12);
  --yy-gradient: linear-gradient(135deg, var(--yy-pink) 0%, var(--yy-orange) 100%);
  --sidebar-w: 264px;

  --bs-primary: var(--yy-pink);
  --bs-primary-rgb: 224, 40, 122;
  --bs-body-font-family: "Noto Sans Thai", system-ui, sans-serif;
  --bs-body-color: var(--yy-text);
  --bs-body-bg: var(--yy-bg);
  --bs-border-color: var(--yy-border);
  --bs-link-color: var(--yy-pink);
  --bs-link-hover-color: #b81e63;
}

body.admin { background: var(--yy-bg); min-height: 100vh; }
h1, h2, h3, h4, h5, h6, .btn, .nav-link-item, .topbar-title, .stat-value, .modal-title { font-family: "Prompt", sans-serif; }

/* ---------- Buttons ---------- */
.btn { border-radius: 12px; font-weight: 500; transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { --bs-btn-bg: var(--yy-pink); --bs-btn-border-color: var(--yy-pink); --bs-btn-hover-bg: #c81f6b; --bs-btn-hover-border-color: #c81f6b; --bs-btn-active-bg: #b31b60; --bs-btn-disabled-bg: var(--yy-pink); --bs-btn-disabled-border-color: var(--yy-pink); }
.btn-primary:hover { box-shadow: 0 8px 20px rgba(224, 40, 122, .3); }
.btn-gradient { background: var(--yy-gradient); color: #fff; border: 0; }
.btn-gradient:hover { color: #fff; box-shadow: 0 10px 24px rgba(242, 101, 34, .35); }
.btn-soft { background: var(--yy-pink-soft); color: var(--yy-pink); border: 0; }
.btn-soft:hover { background: var(--yy-pink); color: #fff; }
.btn-icon { width: 38px; height: 38px; display: inline-grid; place-items: center; padding: 0; border-radius: 11px; border: 0; background: transparent; color: var(--yy-text); font-size: 1.15rem; }
.btn-icon:hover { background: var(--yy-pink-soft); color: var(--yy-pink); }
.btn-action { width: 34px; height: 34px; padding: 0; display: inline-grid; place-items: center; border-radius: 10px; border: 0; font-size: 1rem; }
.btn-action.edit { background: var(--yy-teal-soft); color: var(--yy-teal); }
.btn-action.edit:hover { background: var(--yy-teal); color: #fff; }
.btn-action.del { background: #fde8e8; color: #dc3545; }
.btn-action.del:hover { background: #dc3545; color: #fff; }
.btn-action.view { background: var(--yy-purple-soft); color: var(--yy-purple); }
.btn-action.view:hover { background: var(--yy-purple); color: #fff; }
.btn-action.restore { background: var(--yy-yellow-soft); color: #b98300; }
.btn-action.restore:hover { background: var(--yy-yellow); color: var(--yy-navy); }
.form-control, .form-select { border-radius: 12px; border-color: var(--yy-border); padding: .55rem .85rem; }
.form-control:focus, .form-select:focus { border-color: var(--yy-pink); box-shadow: 0 0 0 .2rem rgba(224, 40, 122, .15); }
.form-label { font-weight: 500; font-size: .92rem; margin-bottom: .35rem; }
.form-check-input:checked { background-color: var(--yy-pink); border-color: var(--yy-pink); }
.form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(224, 40, 122, .15); border-color: var(--yy-pink); }
.required::after { content: " *"; color: #dc3545; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 1040;
  background: var(--yy-navy); color: #d9d3ea; display: flex; flex-direction: column;
  padding: 18px 14px; transition: transform .28s ease; overflow-y: auto;
}
.sidebar::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 0% 0%, rgba(224, 40, 122, .25), transparent 45%),
              radial-gradient(circle at 100% 100%, rgba(14, 154, 167, .22), transparent 45%);
}
.sidebar > * { position: relative; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 18px; color: #fff; text-decoration: none; }
.sidebar-brand img { border-radius: 50%; box-shadow: 0 0 0 3px rgba(255, 255, 255, .15); }
.sidebar-brand strong { display: block; font-family: "Prompt"; font-size: 1rem; line-height: 1.2; }
.sidebar-brand small { color: #a69fbd; font-size: .75rem; }
.sidebar-nav { flex: 1; }
.nav-section { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: #8b84a3; padding: 14px 12px 6px; }
.nav-link-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 2px 0;
  border-radius: 12px; color: #d9d3ea; text-decoration: none; font-size: .95rem;
  background: none; border: 0; transition: background .2s ease, color .2s ease, transform .2s ease;
}
.nav-link-item i { font-size: 1.1rem; width: 22px; text-align: center; }
.nav-link-item:hover { background: rgba(255, 255, 255, .08); color: #fff; transform: translateX(3px); }
.nav-link-item.active { background: var(--yy-gradient); color: #fff; box-shadow: 0 8px 20px rgba(224, 40, 122, .35); }
.sidebar-footer { border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 10px; margin-top: 10px; }
.sidebar-backdrop { display: none; }

/* ---------- Main ---------- */
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: 12px;
  padding: 14px 28px; background: rgba(247, 245, 251, .85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--yy-border);
}
.topbar-title { font-size: 1.3rem; font-weight: 600; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip { display: flex; align-items: center; gap: 10px; background: var(--yy-surface); border: 1px solid var(--yy-border); border-radius: 999px; padding: 5px 14px 5px 5px; color: var(--yy-text); }
.user-chip:hover { box-shadow: var(--yy-shadow); }
.user-chip small { color: var(--yy-muted); font-size: .72rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--yy-gradient); color: #fff; display: grid; place-items: center; font-weight: 600; font-family: "Prompt"; }
.content { padding: 24px 28px 32px; flex: 1; }
.admin-footer { padding: 16px 28px; color: var(--yy-muted); font-size: .82rem; }

@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  .sidebar-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(36, 27, 61, .45); z-index: 1035; }
  .main { margin-left: 0; }
  .topbar { padding: 12px 16px; }
  .content { padding: 18px 16px 24px; }
  .admin-footer { padding: 14px 16px; }
}

/* ---------- Cards ---------- */
.card-yy { background: var(--yy-surface); border: 1px solid var(--yy-border); border-radius: var(--yy-radius); box-shadow: var(--yy-shadow); }
.card-yy .card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 22px 0; }
.card-yy .card-head h2, .card-yy .card-head h3 { font-size: 1.05rem; font-weight: 600; margin: 0; }
.card-yy .card-head .sub { color: var(--yy-muted); font-size: .85rem; }
.card-yy .card-body-yy { padding: 18px 22px 22px; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { color: var(--yy-muted); margin: 0; }

.stat-card {
  position: relative; overflow: hidden; background: var(--yy-surface); border-radius: var(--yy-radius);
  border: 1px solid var(--yy-border); box-shadow: var(--yy-shadow); padding: 20px; height: 100%;
  transition: transform .2s ease, box-shadow .2s ease;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--yy-shadow-hover); }
.stat-card .stat-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.35rem; margin-bottom: 14px; }
.stat-card .stat-label { color: var(--yy-muted); font-size: .88rem; }
.stat-card .stat-value { font-size: 1.65rem; font-weight: 700; line-height: 1.2; margin: 2px 0 4px; }
.stat-card .stat-foot { font-size: .8rem; color: var(--yy-muted); }
.stat-card::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; opacity: .12; }
.stat-pink .stat-icon { background: var(--yy-pink-soft); color: var(--yy-pink); }  .stat-pink::after { background: var(--yy-pink); }
.stat-teal .stat-icon { background: var(--yy-teal-soft); color: var(--yy-teal); }  .stat-teal::after { background: var(--yy-teal); }
.stat-orange .stat-icon { background: var(--yy-orange-soft); color: var(--yy-orange); } .stat-orange::after { background: var(--yy-orange); }
.stat-purple .stat-icon { background: var(--yy-purple-soft); color: var(--yy-purple); } .stat-purple::after { background: var(--yy-purple); }
/* การ์ดเด่น (ยอดขายวันนี้) — พื้นหลังไล่สีให้สะดุดตา */
.stat-card.stat-highlight { background: linear-gradient(135deg, var(--yy-purple) 0%, var(--yy-pink) 100%); border-color: transparent; color: #fff; box-shadow: 0 12px 30px rgba(108, 74, 182, .35); }
.stat-card.stat-highlight .stat-icon { background: rgba(255, 255, 255, .2); color: #fff; }
.stat-card.stat-highlight .stat-label, .stat-card.stat-highlight .stat-foot { color: rgba(255, 255, 255, .88); }
.stat-card.stat-highlight .stat-value { color: #fff; }
.stat-card.stat-highlight::after { background: #fff; opacity: .18; }
.trend-up { color: #12a150; font-weight: 600; }
.trend-down { color: #dc3545; font-weight: 600; }

.chart-box { position: relative; height: 300px; }
.chart-box.sm { height: 260px; }

/* ---------- Badges ---------- */
.badge-soft { display: inline-flex; align-items: center; gap: 4px; padding: .35em .75em; border-radius: 999px; font-weight: 500; font-size: .78rem; }
.badge-soft.success { background: #e2f7ea; color: #12a150; }
.badge-soft.muted { background: #eeedf2; color: #6f6a80; }
.badge-soft.danger { background: #fde8e8; color: #dc3545; }
.badge-soft.pink { background: var(--yy-pink-soft); color: var(--yy-pink); }
.badge-soft.teal { background: var(--yy-teal-soft); color: var(--yy-teal); }
.badge-soft.purple { background: var(--yy-purple-soft); color: var(--yy-purple); }
.badge-soft.orange { background: var(--yy-orange-soft); color: var(--yy-orange); }

/* ---------- DataTables ---------- */
.dt-container { padding: 4px 0 0; }
.dt-container .dt-search input, .dt-container .dt-length select { border-radius: 10px; border-color: var(--yy-border); }
.dt-container .dt-search input:focus { border-color: var(--yy-pink); box-shadow: 0 0 0 .2rem rgba(224, 40, 122, .15); }
table.dataTable { border-collapse: separate !important; border-spacing: 0; }
table.dataTable thead th { background: #faf8fd; color: var(--yy-muted); font-weight: 600; font-size: .82rem; border-bottom: 1px solid var(--yy-border) !important; white-space: nowrap; }
table.dataTable thead th:first-child { border-top-left-radius: 12px; }
table.dataTable thead th:last-child { border-top-right-radius: 12px; }
table.dataTable tbody td { vertical-align: middle; border-color: var(--yy-border); }
table.dataTable tbody tr { transition: background-color .15s ease; }
table.dataTable tbody tr:hover > * { background-color: #fdf6fa !important; }
.dt-paging .page-link { border-radius: 10px !important; margin: 0 2px; border: 0; color: var(--yy-text); }
.dt-paging .page-item.active .page-link { background: var(--yy-gradient); color: #fff; }
div.dt-processing { background: transparent !important; box-shadow: none !important; border: 0 !important; }
div.dt-processing > div:last-child { display: none; }
.dt-loading { display: inline-flex; align-items: center; gap: 10px; background: #fff; padding: 10px 18px; border-radius: 999px; box-shadow: var(--yy-shadow); font-size: .9rem; }
.row-deleted td { opacity: .55; }
.row-deleted td .tx-no { text-decoration: line-through; }
.cell-actions { white-space: nowrap; display: flex; gap: 6px; }

/* ---------- States ---------- */
.state-card { text-align: center; padding: 48px 20px; max-width: 520px; margin: 24px auto; }
.state-card h2, .state-card h3 { font-size: 1.2rem; font-weight: 600; margin: 12px 0 6px; }
.state-card p { color: var(--yy-muted); margin-bottom: 18px; }
.state-icon { width: 76px; height: 76px; border-radius: 24px; margin: 0 auto; display: grid; place-items: center; font-size: 2rem; animation: floaty 3s ease-in-out infinite; }
.state-empty { background: var(--yy-purple-soft); color: var(--yy-purple); }
.state-error { background: #fde8e8; color: #dc3545; }
.state-warning { background: var(--yy-yellow-soft); color: #c28a00; }
.state-inline { padding: 28px 12px; text-align: center; color: var(--yy-muted); }
.state-inline i { font-size: 2rem; display: block; margin-bottom: 6px; color: #c8c2d8; }
@keyframes floaty { 50% { transform: translateY(-6px); } }

.skeleton { background: linear-gradient(90deg, #eee9f5 25%, #f7f4fb 37%, #eee9f5 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 8px; color: transparent !important; }
.skeleton-text { display: inline-block; min-width: 90px; height: 1.2em; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- Page loader ---------- */
.page-loader { position: fixed; inset: 0; z-index: 2000; background: var(--yy-bg); display: flex; align-items: center; justify-content: center; gap: 8px; transition: opacity .3s ease, visibility .3s ease; }
.page-loader.hide { opacity: 0; visibility: hidden; }
.loader-dot { width: 14px; height: 14px; border-radius: 50%; animation: bounce .9s ease-in-out infinite; }
.loader-dot:nth-child(1) { background: var(--yy-pink); }
.loader-dot:nth-child(2) { background: var(--yy-yellow); animation-delay: .12s; }
.loader-dot:nth-child(3) { background: var(--yy-teal); animation-delay: .24s; }
@keyframes bounce { 0%, 100% { transform: translateY(0); opacity: .6; } 50% { transform: translateY(-12px); opacity: 1; } }

/* ---------- Modals ---------- */
.modal-content { border: 0; border-radius: 22px; box-shadow: 0 24px 60px rgba(36, 27, 61, .25); }
.modal-header { border-bottom: 1px solid var(--yy-border); padding: 18px 24px; }
.modal-header .modal-title { font-weight: 600; font-size: 1.1rem; display: flex; align-items: center; gap: 10px; }
.modal-header .modal-title i { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: var(--yy-pink-soft); color: var(--yy-pink); font-size: 1.05rem; }
.modal-body { padding: 20px 24px; }
.modal-footer { border-top: 1px solid var(--yy-border); padding: 14px 24px; }

/* SweetAlert2 */
.swal2-popup { border-radius: 22px !important; font-family: "Noto Sans Thai", sans-serif !important; }
.swal2-title { font-family: "Prompt", sans-serif !important; font-size: 1.35rem !important; }
.swal2-styled { border-radius: 12px !important; font-family: "Prompt", sans-serif !important; }
.swal2-input, .swal2-textarea { border-radius: 12px !important; font-family: inherit !important; }

/* ---------- Filters ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.filter-bar .form-control, .filter-bar .form-select { min-width: 150px; }
.chip-group { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--yy-border); background: #fff; border-radius: 999px; padding: 6px 14px; font-size: .85rem; color: var(--yy-text); transition: all .2s ease; }
.chip:hover { border-color: var(--yy-pink); color: var(--yy-pink); }
.chip.active { background: var(--yy-gradient); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(224, 40, 122, .25); }

/* ---------- POS ---------- */
.pos-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
@media (max-width: 1199.98px) { .pos-grid { grid-template-columns: minmax(0, 1fr) 340px; } }
@media (max-width: 991.98px) { .pos-grid { grid-template-columns: 1fr; } }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.product-tile {
  position: relative; text-align: left; background: #fff; border: 1px solid var(--yy-border); border-radius: 18px;
  padding: 16px; transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease; min-height: 128px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.product-tile:hover { transform: translateY(-3px); box-shadow: var(--yy-shadow-hover); border-color: transparent; }
.product-tile:active { transform: scale(.98); }
.product-tile .tile-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; margin-bottom: 10px; }
.product-tile .tile-name { font-family: "Prompt"; font-weight: 500; line-height: 1.3; }
.product-tile .tile-price { font-family: "Prompt"; font-weight: 700; font-size: 1.1rem; color: var(--yy-pink); }
.product-tile .tile-unit { font-size: .78rem; color: var(--yy-muted); }
.product-tile .tile-qty { position: absolute; top: 10px; right: 10px; min-width: 26px; height: 26px; border-radius: 999px; background: var(--yy-gradient); color: #fff; font-size: .8rem; font-weight: 600; display: grid; place-items: center; padding: 0 7px; animation: pop .25s ease; }
@keyframes pop { 0% { transform: scale(.4); } 80% { transform: scale(1.15); } 100% { transform: scale(1); } }
.tone-0 .tile-icon { background: var(--yy-pink-soft); color: var(--yy-pink); }
.tone-1 .tile-icon { background: var(--yy-teal-soft); color: var(--yy-teal); }
.tone-2 .tile-icon { background: var(--yy-orange-soft); color: var(--yy-orange); }
.tone-3 .tile-icon { background: var(--yy-purple-soft); color: var(--yy-purple); }
.tone-4 .tile-icon { background: var(--yy-yellow-soft); color: #c28a00; }

.cart { position: sticky; top: 86px; }
.cart-items { max-height: 42vh; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 12px 0; border-bottom: 1px dashed var(--yy-border); animation: slideIn .25s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.cart-line .name { font-weight: 500; }
.cart-line .meta { font-size: .8rem; color: var(--yy-muted); }
.cart-line .line-total { font-family: "Prompt"; font-weight: 600; text-align: right; }
.qty-stepper { display: inline-flex; align-items: center; background: var(--yy-bg); border-radius: 999px; padding: 2px; }
.qty-stepper button { width: 28px; height: 28px; border-radius: 50%; border: 0; background: #fff; color: var(--yy-text); display: grid; place-items: center; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.qty-stepper button:hover { background: var(--yy-pink); color: #fff; }
.qty-stepper span { min-width: 30px; text-align: center; font-weight: 600; }
.cart-summary { background: var(--yy-bg); border-radius: 14px; padding: 14px 16px; }
.cart-summary .row-sum { display: flex; justify-content: space-between; font-size: .92rem; margin: 3px 0; }
.cart-summary .grand { font-family: "Prompt"; font-size: 1.5rem; font-weight: 700; color: var(--yy-pink); }
.pay-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.pay-option input { display: none; }
.pay-option label { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; border: 1.5px solid var(--yy-border); border-radius: 12px; cursor: pointer; transition: all .2s ease; font-weight: 500; }
.pay-option label:hover { border-color: var(--yy-pink); }
.pay-option input:checked + label { border-color: var(--yy-pink); background: var(--yy-pink-soft); color: var(--yy-pink); }
.split-box { background: var(--yy-bg); border-radius: 14px; padding: 12px 14px; margin-top: 10px; animation: slideIn .25s ease; }
.split-row { display: grid; grid-template-columns: 1fr 140px; gap: 10px; align-items: center; margin-bottom: 8px; }
.split-row label { display: flex; align-items: center; gap: 6px; font-weight: 500; margin: 0; }
.split-row .form-control { text-align: right; font-weight: 600; }
.split-status { font-size: .85rem; font-weight: 600; display: flex; align-items: center; gap: 6px; padding-top: 4px; }
.split-status.ok { color: #12a150; }
.split-status.short { color: #c28a00; }
.split-status.over { color: #dc3545; }
.pay-split { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.pos-mobile-bar { display: none; }
@media (max-width: 991.98px) {
  .pos-mobile-bar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 1030; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 18px; border-radius: 18px; background: var(--yy-navy); color: #fff; box-shadow: 0 16px 40px rgba(36, 27, 61, .35); transform: translateY(140%); transition: transform .3s ease; }
  .pos-mobile-bar.show { transform: none; }
  .pos-mobile-bar strong { font-family: "Prompt"; font-size: 1.25rem; }
  .pos-mobile-bar small { display: block; color: #bdb5d6; font-size: .75rem; }
  body.has-pos-bar .content { padding-bottom: 96px; }
}
.today-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 8px; }
.today-stat { border-radius: 14px; padding: 10px 14px; background: var(--yy-teal-soft); }
.today-stat.money { background: var(--yy-pink-soft); }
.today-stat small { display: block; color: var(--yy-muted); font-size: .78rem; }
.today-stat strong { font-family: "Prompt"; font-size: 1.25rem; color: var(--yy-text); }
.today-stat.money strong { color: var(--yy-pink); }
.recent-list { list-style: none; padding: 0; margin: 0; }
.recent-list li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--yy-border); font-size: .9rem; }
.recent-list li:last-child { border-bottom: 0; }


/* ---------- งานนอกสถานที่ (ปฏิทิน) ---------- */
:root { --ev-confirmed: #e0287a; --ev-tentative: #d9771e; --ev-done: #008aa0; --ev-cancelled: #9a94ad; }
.event-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; color: var(--yy-muted); }
.event-legend span { display: inline-flex; align-items: center; gap: 6px; }
.event-legend .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); display: inline-block; }
.event-list { display: flex; flex-direction: column; gap: 10px; }
.event-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left;
  padding: 12px 14px; border: 1px solid var(--yy-border); border-left: 4px solid var(--c, var(--ev-confirmed));
  border-radius: 12px; background: var(--yy-surface); color: var(--yy-text); transition: box-shadow .15s, transform .15s;
}
.event-item:hover, .event-item:focus-visible { box-shadow: var(--yy-shadow-hover); transform: translateY(-1px); }
.event-item strong { font-weight: 600; }
.event-time { font-size: .78rem; font-weight: 600; color: var(--yy-muted); }
.event-meta { display: flex; gap: 6px; font-size: .85rem; color: var(--yy-muted); }
.event-meta i { flex: none; }
.ev-confirmed { --c: var(--ev-confirmed); }
.ev-tentative { --c: var(--ev-tentative); }
.ev-done { --c: var(--ev-done); }
.ev-cancelled { --c: var(--ev-cancelled); }
.event-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 10px; color: var(--yy-muted); text-align: center; font-size: .9rem; }
.event-empty i { font-size: 1.6rem; }
.event-skeleton { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; }
.event-skeleton .skeleton-text { width: 100%; }
.today-events-card { border-top: 4px solid var(--yy-pink); }
.detail-row { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--yy-border); }
.detail-row:last-child { border-bottom: 0; }
.detail-row > i { color: var(--yy-pink); font-size: 1.1rem; margin-top: 2px; }
.detail-row small { color: var(--yy-muted); font-size: .78rem; }

.yy-calendar { --fc-border-color: var(--yy-border); --fc-today-bg-color: var(--yy-pink-soft); --fc-page-bg-color: var(--yy-surface);
  --fc-neutral-bg-color: var(--yy-bg); --fc-list-event-hover-bg-color: var(--yy-bg); font-size: .9rem; transition: opacity .2s; }
.yy-calendar.is-loading { opacity: .55; }
.yy-calendar .fc-toolbar-title { font-family: "Prompt"; font-size: 1.2rem; font-weight: 600; }
.yy-calendar .fc-button { background: var(--yy-surface); border: 1px solid var(--yy-border); color: var(--yy-text); border-radius: 10px; text-transform: none; box-shadow: none !important; }
.yy-calendar .fc-button:hover { background: var(--yy-pink-soft); color: var(--yy-pink); border-color: var(--yy-pink-soft); }
.yy-calendar .fc-button-primary:not(:disabled).fc-button-active, .yy-calendar .fc-button-primary:not(:disabled):active { background: var(--yy-pink); border-color: var(--yy-pink); color: #fff; }
.yy-calendar .fc-button:disabled { opacity: .5; background: var(--yy-surface); color: var(--yy-muted); border-color: var(--yy-border); }
.yy-calendar .fc-list-day-cushion { background: var(--yy-bg); }
.yy-calendar .fc-list-day-cushion a { color: var(--yy-text); text-decoration: none; font-weight: 600; }
.yy-calendar .fc-list-event { cursor: pointer; }
.yy-calendar .fc-daygrid-event.ev .fc-event-time { font-weight: 600; margin-right: 3px; }
.yy-calendar .fc-daygrid-event.ev .fc-event-main-frame { flex-wrap: wrap; }
.yy-calendar .fc-daygrid-event.ev .fc-event-title { white-space: normal; overflow-wrap: anywhere; }
.yy-calendar .fc-col-header-cell-cushion, .yy-calendar .fc-daygrid-day-number { color: var(--yy-text); text-decoration: none; }
.yy-calendar .fc-col-header-cell { background: var(--yy-bg); font-weight: 600; }
.yy-calendar .fc-day-today .fc-daygrid-day-number { background: var(--yy-pink); color: #fff; border-radius: 999px; min-width: 26px; text-align: center; margin: 4px; }
.yy-calendar .fc-event.ev { background: color-mix(in srgb, var(--c) 14%, #fff); border: 0; border-left: 3px solid var(--c); border-radius: 6px; color: var(--yy-text); padding: 1px 4px; cursor: pointer; }
.yy-calendar .fc-event.ev .fc-event-main, .yy-calendar .fc-event.ev .fc-event-time, .yy-calendar .fc-event.ev .fc-event-title { color: var(--yy-text); }
.yy-calendar .fc-daygrid-dot-event.ev .fc-daygrid-event-dot { border-color: var(--c); }
.yy-calendar .fc-list-event.ev .fc-list-event-dot { border-color: var(--c); }
.yy-calendar .fc-list-event.ev { background: transparent; border-left: 0; }
.yy-calendar .ev-cancelled .fc-event-title, .yy-calendar .ev-cancelled .fc-list-event-title { text-decoration: line-through; color: var(--yy-muted); }
.yy-calendar .fc-daygrid-day.fc-day-past { background: #fcfbfe; }
@media (max-width: 767.98px) {
  .yy-calendar .fc-toolbar-title { font-size: 1rem; }
  .yy-calendar .fc-header-toolbar { gap: 8px; }
}

/* ---------- Login ---------- */
body.login-page {
  min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(circle at 10% 10%, rgba(224, 40, 122, .25), transparent 40%),
              radial-gradient(circle at 90% 20%, rgba(255, 200, 61, .3), transparent 35%),
              radial-gradient(circle at 80% 90%, rgba(14, 154, 167, .25), transparent 40%), #fff9f2;
}
.login-card { width: 100%; max-width: 420px; background: #fff; border-radius: 28px; padding: 36px 32px; box-shadow: 0 30px 80px rgba(36, 27, 61, .15); animation: rise .5s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.login-card .logo { width: 96px; height: 96px; border-radius: 50%; display: block; margin: -84px auto 14px; box-shadow: 0 10px 30px rgba(36, 27, 61, .2); border: 4px solid #fff; background: #fff; }
.login-card h1 { font-size: 1.45rem; font-weight: 700; text-align: center; margin-bottom: 4px; }
.login-card .sub { text-align: center; color: var(--yy-muted); margin-bottom: 24px; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--yy-muted); }
.input-icon .form-control { padding-left: 42px; height: 48px; }
.input-icon .toggle-pass { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
