/* ===================================================================
   1. APP HEADER
   =================================================================== */

.app-header {
  background: linear-gradient(135deg, #101726 0%, #131c30 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 22px;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.app-logo {
  font-size: 26px;
  line-height: 1;
}

.header-left h1 {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}

.header-highlight {
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.header-desc {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* TIME WIDGET */
.time-widget {
  background: var(--surface-input);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.time-clock-box {
  display: flex;
  flex-direction: column;
}

.clock-face {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 15px;
  font-weight: 800;
  color: var(--ocean-light);
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.clock-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.tz-btn-group {
  display: flex;
  gap: 4px;
}

.tz-toggle {
  background: #172235;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.tz-toggle:hover { color: #fff; background: #22314a; }
.tz-toggle.active { background: #0284c7; border-color: #38bdf8; color: #fff; }

/* LANGUAGE SWITCHER */
.lang-widget {
  display: inline-flex;
  background: #172235;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 3px;
  align-items: center;
}

.lang-toggle {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  user-select: none;
}

.lang-widget {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--border);
  gap: 2px;
}

.lang-toggle {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  user-select: none;
}

.lang-toggle:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.lang-toggle.active {
  background: #0284c7;
  border-color: #38bdf8;
  color: #fff;
  box-shadow: 0 1px 4px rgba(2, 132, 199, 0.4);
}

/* AUTH PANEL */
.auth-panel {
  display: flex;
  align-items: center;
}

.sign-in-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: #0f172a;
  border: none;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.sign-in-btn:hover { background: #f8fafc; transform: translateY(-1px); }

.user-info-bar {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 5px 14px 5px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.user-info-bar:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(139, 92, 246, 0.4);
}

.user-avatar-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(139, 92, 246, 0.35));
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
  flex-shrink: 0;
  user-select: none;
}

.user-avatar-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
  flex-shrink: 0;
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-name {
  color: #fff;
  font-weight: 800;
  font-size: 13.5px;
  line-height: 1.2;
}

.edit-nick-btn {
  background: transparent;
  border: none;
  font-size: 13px;
  cursor: pointer;
  opacity: 0.7;
  padding: 0 3px;
  transition: opacity 0.2s, transform 0.2s;
  line-height: 1;
}
.edit-nick-btn:hover {
  opacity: 1;
  transform: scale(1.2);
}

.admin-badge {
  display: inline-block;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  font-size: 9.5px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 800;
  width: fit-content;
}

.sign-out-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.sign-out-btn:hover { color: var(--rose-light); border-color: var(--rose); background: rgba(244, 63, 94, 0.15); }

