/* ============================================
   PANEL.CSS - Barretus Grill Operational Theme
   Shared by: Admin, Cozinha, Driver, Garçom, Totem, SuperAdmin
   ============================================ */

/* ---- DESIGN TOKENS (Extension) ---- */
:root {
  --panel-radius: 6px;
  --panel-shadow: 4px 4px 0px var(--ink-black);
  --panel-shadow-lg: 8px 8px 0px rgba(15, 15, 15, 0.3);
  --panel-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --panel-glass: rgba(245, 230, 202, 0.85);
  --panel-dark: #1a1a1a;
  --panel-card: #ffffff;
  --panel-muted: #6b7280;
  --panel-border: 3px solid var(--ink-black);
  --panel-border-light: 2px solid rgba(15, 15, 15, 0.15);
}

/* ---- BASE RESET FOR PANELS ---- */
.panel-body {
  background: var(--paper-bg);
  color: var(--ink-black);
  font-family: var(--font-body);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---- HEADERS ---- */
.panel-header {
  background: var(--ink-black);
  color: var(--paper-bg);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 4px solid var(--clay-red);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.panel-header h1,
.panel-header h2,
.panel-header h3 {
  font-family: var(--font-display);
  color: var(--sun-yellow);
  margin: 0;
  letter-spacing: 1px;
}

.panel-header .subtitle {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: rgba(245, 230, 202, 0.7);
  margin: 2px 0 0 0;
}

/* ---- CARDS ---- */
.panel-card {
  background: var(--panel-card);
  border: var(--panel-border);
  border-radius: var(--panel-radius);
  box-shadow: var(--panel-shadow);
  padding: 24px;
  margin-bottom: 20px;
  transition: var(--panel-transition);
}

.panel-card:hover {
  box-shadow: var(--panel-shadow-lg);
  transform: translateY(-1px);
}

.panel-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px dashed rgba(15, 15, 15, 0.15);
}

.panel-card-header h3 {
  font-family: var(--font-heading);
  margin: 0;
  font-size: 1.1rem;
}

/* ---- DARK CARDS (for contrast sections) ---- */
.panel-card-dark {
  background: var(--ink-black);
  color: var(--paper-bg);
  border: var(--panel-border);
  border-radius: var(--panel-radius);
  padding: 24px;
  margin-bottom: 20px;
}

.panel-card-dark h3 {
  color: var(--sun-yellow);
  font-family: var(--font-heading);
}

/* ---- BUTTONS ---- */
.panel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: bold;
  border: 3px solid var(--ink-black);
  border-radius: var(--panel-radius);
  cursor: pointer;
  transition: var(--panel-transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.panel-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity 0.2s;
}

.panel-btn:hover::after {
  opacity: 1;
}

.panel-btn:active {
  transform: translateY(2px);
  box-shadow: none;
}

.panel-btn-primary {
  background: var(--clay-red);
  color: white;
  box-shadow: 3px 3px 0px var(--ink-black);
}

.panel-btn-success {
  background: var(--cactus-green);
  color: white;
  box-shadow: 3px 3px 0px var(--ink-black);
}

.panel-btn-warning {
  background: var(--sun-yellow);
  color: var(--ink-black);
  box-shadow: 3px 3px 0px var(--ink-black);
}

.panel-btn-dark {
  background: var(--ink-black);
  color: var(--paper-bg);
  box-shadow: 3px 3px 0px var(--clay-red);
}

.panel-btn-ghost {
  background: transparent;
  color: var(--paper-bg);
  border-color: rgba(245, 230, 202, 0.3);
  box-shadow: none;
}

.panel-btn-ghost:hover {
  border-color: var(--sun-yellow);
  color: var(--sun-yellow);
}

.panel-btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.panel-btn-block {
  width: 100%;
}

/* ---- INPUTS ---- */
.panel-input {
  width: 100%;
  padding: 14px 16px;
  border: 3px solid var(--ink-black);
  border-radius: var(--panel-radius);
  font-family: var(--font-body);
  font-size: 1rem;
  background: white;
  color: var(--ink-black);
  box-sizing: border-box;
  transition: var(--panel-transition);
}

.panel-input:focus {
  outline: none;
  border-color: var(--clay-red);
  box-shadow: 0 0 0 3px rgba(200, 45, 0, 0.15);
}

.panel-input::placeholder {
  color: var(--panel-muted);
}

.panel-select {
  width: 100%;
  padding: 14px 16px;
  border: 3px solid var(--ink-black);
  border-radius: var(--panel-radius);
  font-family: var(--font-heading);
  font-size: 1rem;
  background: white;
  color: var(--ink-black);
  box-sizing: border-box;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%230F0F0F' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 5h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.panel-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: bold;
  margin-bottom: 6px;
  color: var(--ink-black);
}

/* ---- LOGIN SCREENS ---- */
.panel-login {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  padding: 20px;
}

.panel-login-box {
  background: white;
  border: 5px solid var(--ink-black);
  border-radius: var(--panel-radius);
  padding: 40px 36px;
  box-shadow: 10px 10px 0px var(--clay-red);
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.panel-login-box h2 {
  font-family: var(--font-display);
  color: var(--clay-red);
  font-size: 2.2rem;
  margin: 0 0 8px 0;
}

.panel-login-box p {
  font-family: var(--font-heading);
  color: var(--panel-muted);
  margin: 0 0 24px 0;
}

.panel-login-box .panel-input {
  margin-bottom: 16px;
}

.panel-login-icon {
  width: 80px;
  height: 80px;
  background: var(--ink-black);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
  border: 4px solid var(--clay-red);
}

.panel-login-icon i {
  font-size: 2.5rem;
  color: var(--sun-yellow);
}

/* ---- NAV (Bottom Mobile / Side Desktop) ---- */
.panel-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--ink-black);
  display: grid;
  border-top: 4px solid var(--clay-red);
  z-index: 999;
}

.panel-nav-item {
  color: rgba(245, 230, 202, 0.5);
  text-align: center;
  padding: 12px 0;
  cursor: pointer;
  transition: var(--panel-transition);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.panel-nav-item i {
  font-size: 1.4rem;
}

.panel-nav-item.active {
  color: var(--sun-yellow);
  background: rgba(255, 184, 0, 0.08);
  border-bottom: 3px solid var(--sun-yellow);
}

.panel-nav-item:hover {
  color: var(--paper-bg);
}

/* ---- BADGES ---- */
.panel-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: bold;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 4px;
}

.panel-badge-danger {
  background: rgba(200, 45, 0, 0.15);
  color: var(--clay-red);
  border: 1px solid var(--clay-red);
}

.panel-badge-success {
  background: rgba(27, 94, 32, 0.15);
  color: var(--cactus-green);
  border: 1px solid var(--cactus-green);
}

.panel-badge-warning {
  background: rgba(255, 184, 0, 0.15);
  color: #b57e00;
  border: 1px solid var(--sun-yellow);
}

.panel-badge-info {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border: 1px solid #3b82f6;
}

.panel-badge-dark {
  background: var(--ink-black);
  color: var(--sun-yellow);
}

/* ---- TOAST SYSTEM ---- */
.panel-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink-black);
  color: white;
  padding: 14px 28px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  z-index: 10000;
  display: none;
  border: 3px solid var(--sun-yellow);
  border-radius: var(--panel-radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
  animation: panelToastIn 0.3s ease;
}

@keyframes panelToastIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ---- MODAL BACKDROP ---- */
.panel-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 20px;
}

.panel-modal-content {
  background: var(--paper-bg);
  border: 5px solid var(--ink-black);
  border-radius: var(--panel-radius);
  padding: 32px;
  width: 100%;
  max-width: 450px;
  text-align: center;
  position: relative;
  box-shadow: 12px 12px 0px rgba(200, 45, 0, 0.3);
  animation: panelModalIn 0.3s ease;
}

@keyframes panelModalIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.panel-modal-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  background: var(--clay-red);
  color: white;
  border: 3px solid var(--ink-black);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: var(--panel-transition);
}

.panel-modal-close:hover {
  background: var(--ink-black);
  transform: rotate(90deg);
}

/* ---- GRID LAYOUTS ---- */
.panel-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.panel-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

.panel-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
}

/* ---- STAT CARDS ---- */
.panel-stat {
  background: white;
  border: var(--panel-border);
  border-radius: var(--panel-radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--panel-shadow);
}

.panel-stat-value {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--clay-red);
  margin: 0;
  line-height: 1;
}

.panel-stat-label {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--panel-muted);
  margin-top: 4px;
  text-transform: uppercase;
}

/* ---- PULSE ANIMATIONS ---- */
@keyframes panelPulse {
  0% { box-shadow: 0 0 0 0 rgba(200, 45, 0, 0.4); }
  70% { box-shadow: 0 0 0 12px rgba(200, 45, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(200, 45, 0, 0); }
}

@keyframes panelPulseYellow {
  0% { box-shadow: 0 0 0 0 rgba(255, 184, 0, 0.4); }
  70% { box-shadow: 0 0 0 12px rgba(255, 184, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 184, 0, 0); }
}

.panel-pulse-red {
  animation: panelPulse 2s infinite;
}

.panel-pulse-yellow {
  animation: panelPulseYellow 2s infinite;
}

/* ---- EMPTY STATE ---- */
.panel-empty {
  text-align: center;
  padding: 60px 20px;
  opacity: 0.5;
}

.panel-empty i {
  font-size: 3rem;
  display: block;
  margin-bottom: 12px;
}

.panel-empty p {
  font-family: var(--font-heading);
  font-size: 1.1rem;
}

/* ---- SCROLLBAR OVERRIDE ---- */
.panel-body::-webkit-scrollbar { width: 6px; }
.panel-body::-webkit-scrollbar-track { background: var(--paper-bg); }
.panel-body::-webkit-scrollbar-thumb { background: var(--ink-black); border-radius: 3px; }

/* ---- RESPONSIVE ---- */
@media (max-width: 640px) {
  .panel-card { padding: 16px; }
  .panel-login-box { padding: 28px 20px; }
  .panel-grid-2 { grid-template-columns: 1fr; }
  .panel-header { padding: 12px 16px; }
  .panel-header h1 { font-size: 1.4rem; }
}
