/* STL Grillzz POS · application styles (classic desktop shopkeeper look) */

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Tahoma, Arial, sans-serif; font-size: 13px; background: #ECE9D8; color: #1A1A1A; height: 100vh; overflow: hidden; text-transform: uppercase; }

/* ===== TITLE BAR ===== */
#titleBar {
  background: linear-gradient(to bottom, #1B5CA5 0%, #2F7ED0 50%, #1B5CA5 100%);
  color: white; padding: 5px 12px; display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: bold; letter-spacing: .3px; user-select: none;
  border-bottom: 2px solid #0D3A70;
}
#titleBar .app-icon { font-size: 20px; }
#titleBar .app-title { flex: 1; }
#titleBar .user-info { font-size: 11px; font-weight: normal; opacity: .85; }

/* ===== NAVIGATION TOOLBAR ===== */
#navBar {
  background: #649CCC;
  display: flex; flex-wrap: nowrap; overflow-x: auto;
  border-bottom: 2px solid #3A6FA8; padding: 0 4px;
}
.nav-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; color: #E8F0FF; cursor: pointer;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  border: none; background: transparent; border-bottom: 3px solid transparent;
  transition: background .1s; user-select: none;
}
.nav-btn:hover { background: rgba(255,255,255,.2); }
.nav-btn.active { background: white; color: #1B5CA5; border-bottom: 3px solid white; }
.nav-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ===== MAIN CONTENT ===== */
#mainContent { height: calc(100vh - 72px - 22px); overflow-y: auto; background: #F0F0F0; padding: 10px 12px; }
#pageContent { }

/* ===== STATUS BAR ===== */
#statusBar {
  background: linear-gradient(to bottom, #E8E8E8, #D8D8D8);
  border-top: 1px solid #AAAAAA; padding: 3px 10px;
  display: flex; align-items: center; gap: 20px; font-size: 11px; color: #555;
}
.status-item { display: flex; align-items: center; gap: 4px; }
.status-item::after { content: '|'; margin-left: 20px; color: #AAA; }
.status-item:last-child::after { content: ''; }

/* ===== PANELS / CARDS ===== */
.panel { background: white; border: 1px solid #AAAAAA; margin-bottom: 8px; }
.panel-header {
  background: linear-gradient(to bottom, #649CCC, #4A7AAF);
  color: white; padding: 5px 10px; font-size: 13px; font-weight: bold;
  border-bottom: 1px solid #3A6090; display: flex; align-items: center; justify-content: space-between;
}
.panel-body { padding: 10px; }

/* ===== PAGE HEADER ===== */
.page-header {
  background: linear-gradient(to bottom, #649CCC, #4A7AAF);
  color: white; padding: 6px 12px; font-size: 15px; font-weight: bold;
  border-bottom: 2px solid #3A6090; margin-bottom: 8px;
  display: flex; align-items: center; justify-content: space-between;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px;
  font-size: 12px; font-weight: 600; cursor: pointer; border-radius: 2px;
  transition: all .1s; font-family: inherit; white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(to bottom, #5B9BD5, #3A7AC8);
  color: white; border: 1px solid #2A5A9A;
}
.btn-primary:hover { background: linear-gradient(to bottom, #70AADF, #4A8AD0); }
.btn-secondary {
  background: linear-gradient(to bottom, #F8F8F8, #DCDCDC);
  color: #333; border: 1px solid #999;
}
.btn-secondary:hover { background: linear-gradient(to bottom, #fff, #ECECEC); }
.btn-danger { background: linear-gradient(to bottom, #E05050, #C03030); color: white; border: 1px solid #902020; }
.btn-danger:hover { background: linear-gradient(to bottom, #EE6060, #D04040); }
.btn-green { background: linear-gradient(to bottom, #5AAB5A, #3A8A3A); color: white; border: 1px solid #2A6A2A; }
.btn-green:hover { background: linear-gradient(to bottom, #6ABB6A, #4A9A4A); }

/* ===== INPUTS ===== */
.inp {
  border: 1px solid #7F9DB9; background: white; padding: 3px 6px;
  font-size: 12px; font-family: inherit; color: #1A1A1A; width: 100%; outline: none;
  border-radius: 0;
}
.inp:focus { border-color: #3A7AC8; outline: 1px solid #3A7AC8; }
.inp::placeholder { color: #AAAAAA; }
select.inp option { background: white; color: #1A1A1A; }
textarea.inp { resize: vertical; }
.lbl { font-size: 12px; font-weight: 600; color: #333; margin-bottom: 2px; display: block; }

/* ===== TABLES ===== */
.vjs-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.vjs-table thead th {
  background: linear-gradient(to bottom, #649CCC, #4A7AAF);
  color: white; padding: 5px 8px; text-align: left; font-weight: bold;
  border-right: 1px solid #3A6090; border-bottom: 2px solid #3A6090; white-space: nowrap;
}
.vjs-table tbody tr { cursor: pointer; }
.vjs-table tbody tr:nth-child(even) { background: #EEF4FF; }
.vjs-table tbody tr:hover { background: #D0E4F8; }
.vjs-table tbody td { padding: 4px 8px; border-bottom: 1px solid #D8D8D8; border-right: 1px solid #E8E8E8; }

/* ===== STAT CARDS (Dashboard) ===== */
.stat-box {
  background: white; border: 1px solid #AAAAAA; padding: 10px 14px;
  display: flex; flex-direction: column;
}
.stat-box .stat-label { font-size: 11px; color: #666; font-weight: bold; text-transform: uppercase; margin-bottom: 4px; }
.stat-box .stat-value { font-size: 22px; font-weight: bold; color: #1B5CA5; }
.stat-box .stat-sub { font-size: 11px; color: #888; margin-top: 2px; }

/* ===== BADGES ===== */
.badge { display: inline-block; padding: 1px 7px; border-radius: 2px; font-size: 11px; font-weight: bold; border: 1px solid; }
.badge-green { background: #D4EFDA; color: #1A6A2A; border-color: #6ABB6A; }
.badge-yellow { background: #FFF3CC; color: #886600; border-color: #CCAA00; }
.badge-red { background: #FFE0E0; color: #A02020; border-color: #CC6060; }
.badge-blue { background: #D0E4F8; color: #1B5CA5; border-color: #5B9BD5; }

/* ===== GRID HELPERS ===== */
.row { display: flex; gap: 8px; margin-bottom: 6px; }
.col { flex: 1; }
.col-2 { flex: 2; }
.col-half { flex: 0 0 48%; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.form-field { display: flex; flex-direction: column; }
.full { grid-column: 1 / -1; }

/* ===== SEARCH DROPDOWN ===== */
.search-dropdown {
  position: absolute; background: white; border: 1px solid #7F9DB9;
  box-shadow: 2px 2px 6px rgba(0,0,0,.2); z-index: 100; min-width: 200px; max-width: 400px;
}
.search-dropdown .sdrop-item {
  padding: 4px 8px; cursor: pointer; font-size: 12px; border-bottom: 1px solid #EEE;
}
.search-dropdown .sdrop-item:hover { background: #D0E4F8; }
.search-wrap { position: relative; }

/* ===== MODAL (Windows Dialog Style) ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 200; }
.modal-win {
  background: #F0F0F0; border: 2px solid #3A7AC8;
  min-width: 420px; max-width: 640px; max-height: 90vh; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: 4px 4px 16px rgba(0,0,0,.4);
}

/* ===== POS LARGE WINDOW ===== */
#posOverlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); display: none;
  align-items: center; justify-content: center; z-index: 300;
}
#posOverlay.open { display: flex; }
.pos-win {
  background: #F0F0F0; border: 2px solid #3A7AC8;
  width: 92vw; max-width: 1100px; height: 88vh;
  display: flex; flex-direction: column; box-shadow: 6px 6px 24px rgba(0,0,0,.5);
}
.pos-win .modal-titlebar { font-size: 14px; padding: 7px 12px; }
.pos-win .pos-body { flex: 1; overflow-y: auto; padding: 10px 14px; }
.modal-titlebar {
  background: linear-gradient(to bottom, #1B5CA5, #2F7ED0);
  color: white; padding: 5px 10px; font-size: 13px; font-weight: bold;
  display: flex; align-items: center; justify-content: space-between;
}
.modal-titlebar .modal-close {
  background: linear-gradient(to bottom, #F8A0A0, #D06060); color: white;
  border: 1px solid #A02020; width: 18px; height: 18px; display: flex; align-items: center;
  justify-content: center; font-size: 11px; cursor: pointer; border-radius: 2px; font-weight: bold;
}
.modal-content { padding: 12px 14px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 8px 14px; background: #E4E4E4; border-top: 1px solid #CCCCCC; display: flex; gap: 6px; justify-content: flex-end; }

/* ===== POS SPECIFIC ===== */
.pos-item-row { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-bottom: 1px solid #E0E0E0; }
.pos-item-row:hover { background: #EEF4FF; }
.pos-total-area { background: #EEF4FF; border: 1px solid #AAAAAA; padding: 8px; }

/* ===== RESTRICTED MODE ===== */
body.restricted-mode .r-hide { display: none !important; }
/* ===== ENGRAVER MODE (Joe) — only the Engravings module exists ===== */
body.engraver-mode #navBar .nav-btn:not(#engravNavBtn) { display: none !important; }
body.engraver-mode #quickInvWrap, body.engraver-mode #smsBadgeBtn { display: none !important; }
body.engraver-mode #titleBar { background: linear-gradient(to bottom, #2B2B2B 0%, #444 50%, #2B2B2B 100%); border-bottom-color: #C9A227; }
body.engraver-mode #navBar { background: #5A5A5A; border-bottom-color: #C9A227; }
body.engraver-mode .nav-btn.active { color: #6B5300; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #E0E0E0; }
::-webkit-scrollbar-thumb { background: #999; border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: #777; }

/* ===== LOGIN ===== */
#loginScreen {
  position: fixed; inset: 0; background: #ECE9D8; display: flex; align-items: center; justify-content: center;
}
.login-dialog {
  background: #F0F0F0; border: 2px solid #3A7AC8;
  width: 340px; box-shadow: 4px 4px 16px rgba(0,0,0,.35);
}
.login-title {
  background: linear-gradient(to bottom, #1B5CA5, #2F7ED0);
  color: white; padding: 8px 14px; font-size: 14px; font-weight: bold;
  display: flex; align-items: center; gap: 8px;
}
.login-body { padding: 20px; }
.login-body .logo-area { text-align: center; margin-bottom: 16px; }
.login-body .logo-text { font-size: 22px; font-weight: 900; color: #1B5CA5; letter-spacing: 1px; }
.login-body .logo-sub { font-size: 11px; color: #666; }
.login-field { margin-bottom: 12px; }
.login-footer { background: #E4E4E4; border-top: 1px solid #CCC; padding: 10px 14px; display: flex; justify-content: flex-end; gap: 6px; }
