@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* --- OSIRNET BRAND COLOR PALETTE & THEME DEFINITIONS ---
 * Primary Osirnet Brand Colors:
 * - Navy Blue: #162152
 * - Yellow / Gold: #f9cf0c
 * - Green: #419935
 * - White: #ffffff
 */

:root, [data-osir-theme="light"] {
  --osir-bg-primary: #f2f5fb;
  --osir-bg-card: rgba(18, 28, 70, 0.92);
  --osir-border-gold: #f9cf0c;
  --osir-border-color: rgba(249, 207, 12, 0.5);
  --osir-border-glow: rgba(249, 207, 12, 0.45);

  --osir-text-main: #ffffff;
  --osir-text-muted: #b0bacf;
  --osir-text-dim: #7d8aa8;

  --osir-gold: #f9cf0c;
  --osir-green: #419935;
  --osir-blue: #162152;

  --osir-bg-toggle: rgba(255, 255, 255, 0.95);
  --osir-border-toggle: rgba(22, 33, 82, 0.25);
  --osir-toggle-track-bg: rgba(22, 33, 82, 0.15);

  --osir-card-shadow: 0 25px 60px -10px rgba(16, 25, 60, 0.45), 0 0 40px rgba(249, 207, 12, 0.35);
  --osir-title-gradient: linear-gradient(135deg, #ffffff 40%, #f9cf0c 100%);
  --osir-pill-bg: rgba(249, 207, 12, 0.14);
  --osir-pill-border: rgba(249, 207, 12, 0.55);
  --osir-pill-text: #f9cf0c;

  --osir-btn-bg: #ffffff;
  --osir-btn-text: #162152;
  --osir-btn-subtext: #5a6482;
  --osir-btn-border: 1.5px solid rgba(22, 33, 82, 0.15);
  --osir-btn-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  --osir-btn-hover-bg: #f8fafc;

  --osir-topbar-bg: #ffffff;
  --osir-topbar-text: #162152;
  --osir-topbar-border: rgba(22, 33, 82, 0.15);

  --osir-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-osir-theme="dark"] {
  --osir-bg-primary: #090e24;
  --osir-bg-card: rgba(22, 33, 82, 0.88);
  --osir-border-gold: #f9cf0c;
  --osir-border-color: hsla(220, 25%, 25%, 0.6);
  --osir-border-glow: rgba(249, 207, 12, 0.45);

  --osir-text-main: #ffffff;
  --osir-text-muted: #a3adc2;
  --osir-text-dim: #6e7a96;

  --osir-gold: #f9cf0c;
  --osir-green: #419935;
  --osir-blue: #4285f4;

  --osir-bg-toggle: rgba(22, 33, 82, 0.85);
  --osir-border-toggle: rgba(249, 207, 12, 0.4);
  --osir-toggle-track-bg: rgba(249, 207, 12, 0.2);

  --osir-card-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 38px rgba(249, 207, 12, 0.22);
  --osir-title-gradient: linear-gradient(135deg, #ffffff 40%, #f9cf0c 100%);
  --osir-pill-bg: rgba(249, 207, 12, 0.09);
  --osir-pill-border: rgba(249, 207, 12, 0.35);
  --osir-pill-text: #f9cf0c;

  --osir-btn-bg: #ffffff;
  --osir-btn-text: #1f1f1f;
  --osir-btn-subtext: #5f6368;
  --osir-btn-border: 1px solid rgba(255, 255, 255, 0.2);
  --osir-btn-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  --osir-btn-hover-bg: #f8f9fa;

  --osir-topbar-bg: hsl(222, 40%, 12%);
  --osir-topbar-text: #ffffff;
  --osir-topbar-border: hsla(220, 25%, 25%, 0.6);
}

/* Fullscreen Canvas Overlay */
#osirchannel-login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  background-color: var(--osir-bg-primary);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  font-family: var(--osir-font);
  color: var(--osir-text-main);
  box-sizing: border-box;
  transition: background-color 0.4s ease, color 0.4s ease, opacity 0.35s ease, visibility 0.35s ease;
}

#osirchannel-login-overlay.hidden,
html.osirchannel-is-authenticated #osirchannel-login-overlay {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#osirchannel-bg-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* --- ANIMATED DAY / NIGHT CELESTIAL TOGGLE SWITCH --- */
.osirchannel-theme-toggle-wrapper {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 30;
}

.osirchannel-daynight-toggle {
  position: relative;
  width: 84px;
  height: 44px;
  border-radius: 100px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 0;
  margin: 0;
  outline: none;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3), inset 0 2px 5px rgba(255, 255, 255, 0.4), inset 0 -3px 6px rgba(0, 0, 0, 0.4);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
  user-select: none;
}

.osirchannel-daynight-toggle:hover {
  transform: scale(1.06) translateY(-2px);
  border-color: #f9cf0c;
  box-shadow: 0 14px 35px rgba(249, 207, 12, 0.45);
}

/* Sky Background States */
.osirchannel-daynight-sky {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: background 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-osir-theme="light"] .osirchannel-daynight-sky {
  background: linear-gradient(135deg, #5aadff 0%, #73abf1 50%, #86aae6 100%);
}

[data-osir-theme="dark"] .osirchannel-daynight-sky {
  background: linear-gradient(135deg, #090e24 0%, #101c52 50%, #00005b 100%);
}

/* Clouds (Light Mode) */
.osir-cloud {
  position: absolute;
  background: #ffffff;
  border-radius: 50px;
  opacity: 0.9;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

.osir-cloud::before, .osir-cloud::after {
  content: '';
  position: absolute;
  background: #ffffff;
  border-radius: 50%;
}

.cloud-1 {
  bottom: -4px;
  right: 6px;
  width: 32px;
  height: 14px;
}
.cloud-1::before { width: 14px; height: 14px; top: -7px; left: 5px; }
.cloud-1::after { width: 10px; height: 10px; top: -4px; right: 5px; }

.cloud-2 {
  top: 6px;
  right: 22px;
  width: 22px;
  height: 10px;
  opacity: 0.7;
}
.cloud-2::before { width: 10px; height: 10px; top: -5px; left: 4px; }

[data-osir-theme="dark"] .cloud-1,
[data-osir-theme="dark"] .cloud-2 {
  transform: translateY(30px) scale(0.5);
  opacity: 0;
}

/* Stars (Dark Mode) */
.osir-star {
  position: absolute;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

.star-1 { top: 10px; left: 14px; width: 3px; height: 3px; box-shadow: 0 0 4px #ffffff; }
.star-2 { top: 24px; left: 24px; width: 2px; height: 2px; }
.star-3 { top: 8px; left: 34px; width: 3px; height: 3px; box-shadow: 0 0 5px #ffffff; }
.star-4 { top: 28px; left: 44px; width: 2px; height: 2px; }
.star-5 { top: 16px; left: 28px; width: 2.5px; height: 2.5px; }

[data-osir-theme="light"] .osir-star {
  transform: translateY(-25px) scale(0.2);
  opacity: 0;
}

[data-osir-theme="dark"] .osir-star {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Sliding Knob (Sun / Moon) */
.osirchannel-daynight-knob {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.4s ease, box-shadow 0.4s ease;
}

/* Light Mode Knob: Radiant Golden Sun */
[data-osir-theme="light"] .osirchannel-daynight-knob {
  transform: translateX(0);
  background: radial-gradient(circle at 35% 35%, #fff7d6 0%, #f9cf0c 60%, #e6a100 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 18px rgba(249, 207, 12, 0.95);
}

/* Dark Mode Knob: Glowing Cratered Moon */
[data-osir-theme="dark"] .osirchannel-daynight-knob {
  transform: translateX(38px);
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #e2e8f0 65%, #cbd5e1 100%);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4), 0 0 16px rgba(255, 255, 255, 0.7);
}

/* Moon Craters */
.osir-moon-crater {
  position: absolute;
  background: #94a3b8;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.crater-1 { top: 6px; left: 14px; width: 7px; height: 7px; }
.crater-2 { top: 16px; left: 8px; width: 9px; height: 9px; }
.crater-3 { top: 20px; left: 20px; width: 5px; height: 5px; }

[data-osir-theme="dark"] .osir-moon-crater {
  opacity: 0.35;
}

/* Glassmorphic Brand Card */
.osirchannel-login-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  background: var(--osir-bg-card);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1.5px solid var(--osir-border-gold);
  border-radius: 28px;
  padding: 3rem 2.25rem 2.5rem 2.25rem;
  box-shadow: var(--osir-card-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: osirCardFadeIn 0.5s ease-out;
  box-sizing: border-box;
  transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

@keyframes osirCardFadeIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Osirnet Logo Container & Image */
.osirchannel-logo-container {
  margin-bottom: 1.75rem;
  display: flex;
  justify-content: center;
}

.osirchannel-logo-img {
  height: 76px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(22, 33, 82, 0.25));
  transition: transform 0.25s ease;
}

.osirchannel-logo-img:hover {
  transform: scale(1.04);
}

/* Title & Subtitle */
.osirchannel-title {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--osir-title-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 0.4rem 0;
  transition: background 0.4s ease;
}

.osirchannel-subtitle {
  font-size: 0.92rem;
  color: var(--osir-text-muted);
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 1.35rem 0;
  transition: color 0.4s ease;
}

/* Corporate Access Pill Badge */
.osirchannel-access-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 1.35rem;
  background: var(--osir-pill-bg);
  border: 1.5px solid var(--osir-pill-border);
  border-radius: 100px;
  color: var(--osir-pill-text);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 2.25rem;
  transition: all 0.4s ease;
}

.osirchannel-access-pill span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Google Login Button */
.osirchannel-google-section {
  width: 100%;
  margin-bottom: 0;
}

.osirchannel-google-btn {
  width: 100%;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.35rem;
  background: var(--osir-btn-bg);
  color: var(--osir-btn-text);
  border: var(--osir-btn-border);
  border-radius: 16px;
  font-family: var(--osir-font);
  cursor: pointer;
  box-shadow: var(--osir-btn-shadow);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  box-sizing: border-box;
}

.osirchannel-google-btn:hover {
  background: var(--osir-btn-hover-bg);
  transform: translateY(-2px);
  border-color: var(--osir-blue);
  box-shadow: 0 14px 35px rgba(22, 33, 82, 0.22);
}

.osirchannel-google-left {
  display: flex;
  align-items: center;
}

.osirchannel-google-icon {
  width: 24px;
  height: 24px;
}

.osirchannel-google-text {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.osirchannel-google-text-main {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--osir-btn-text);
  line-height: 1.25;
}

.osirchannel-google-text-sub {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--osir-btn-subtext);
  line-height: 1.2;
}

.osirchannel-google-arrow {
  color: var(--osir-btn-subtext);
  display: flex;
  align-items: center;
}

/* Persistent Top Bar when Logged In */
#osirchannel-top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: var(--osir-topbar-bg);
  border-bottom: 1px solid var(--osir-topbar-border);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  font-family: var(--osir-font);
  font-size: 0.82rem;
  color: var(--osir-topbar-text);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

body.osirchannel-logged-in {
  padding-top: 48px !important;
}

.osirchannel-bar-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.osirchannel-bar-badge {
  background: rgba(249, 207, 12, 0.18);
  color: #162152;
  border: 1px solid #f9cf0c;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.72rem;
}

[data-osir-theme="dark"] .osirchannel-bar-badge {
  color: #f9cf0c;
}

.osirchannel-logout-btn {
  background: hsla(350, 89%, 60%, 0.15);
  color: hsl(350, 89%, 60%);
  border: 1px solid hsla(350, 89%, 60%, 0.3);
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--osir-font);
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.25s ease;
}

.osirchannel-logout-btn:hover {
  background: hsla(350, 89%, 60%, 0.3);
}

/* Google OAuth Modal Styles */
#osirchannel-google-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100000;
  background: rgba(8, 12, 28, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
  animation: osirModalFadeIn 0.25s ease-out;
}

@keyframes osirModalFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.osirchannel-gmodal-card {
  background: #ffffff;
  color: #1f1f1f;
  width: 100%;
  max-width: 420px;
  border-radius: 24px;
  padding: 2rem 1.75rem 1.5rem 1.75rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.08);
  font-family: var(--osir-font);
  box-sizing: border-box;
  position: relative;
}

/* --- MULTI-VIEW SIMULATOR DASHBOARD STYLES --- */
#osirchannel-sim-container {
  width: 100%;
  min-height: calc(100vh - 48px);
  padding: 1.5rem;
  box-sizing: border-box;
  font-family: var(--osir-font);
  color: var(--osir-text-main);
  background: var(--osir-bg-primary);
  transition: background-color 0.4s ease, color 0.4s ease;
}

.osir-sim-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--osir-bg-card);
  border: 1.5px solid var(--osir-border-gold);
  border-radius: 20px;
  padding: 1rem 1.35rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--osir-card-shadow);
}

.osir-sim-role-pills {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.osir-role-btn {
  padding: 0.5rem 1rem;
  border-radius: 100px;
  border: 1.5px solid var(--osir-border-color);
  background: rgba(255, 255, 255, 0.08);
  color: var(--osir-text-main);
  font-family: var(--osir-font);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.osir-role-btn:hover {
  border-color: #f9cf0c;
  transform: translateY(-1.5px);
}

.osir-role-btn.active {
  background: #f9cf0c;
  color: #162152;
  border-color: #f9cf0c;
  box-shadow: 0 4px 15px rgba(249, 207, 12, 0.4);
}

/* Dashboard Cards Grid */
.osir-sim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.osir-sim-card {
  background: var(--osir-bg-card);
  border: 1.5px solid var(--osir-border-color);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.3s ease;
}

.osir-sim-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.osir-sim-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0;
}

.osir-sim-badge {
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(65, 153, 53, 0.18);
  color: #419935;
  border: 1px solid #419935;
}

.osir-kpi-value {
  font-size: 2.1rem;
  font-weight: 800;
  color: #f9cf0c;
  margin: 0.4rem 0;
}

.osir-kpi-subtitle {
  font-size: 0.8rem;
  color: var(--osir-text-muted);
}

/* Chat & Ticket List Items */
.osir-ticket-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.osir-ticket-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--osir-border-color);
  border-radius: 14px;
  transition: background-color 0.2s ease;
}

.osir-ticket-item:hover {
  background: rgba(249, 207, 12, 0.08);
}

/* ==========================================================================
   OSIRCHANNEL TRANSITION SMILE LOADER OVERLAY
   ========================================================================== */
.osirchannel-loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100000;
  background-color: #090e24;
  background-image: radial-gradient(circle at 50% 45%, rgba(22, 33, 82, 0.8) 0%, #090e24 75%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s ease;
  font-family: var(--osir-font);
}

.osirchannel-loader-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.osirchannel-loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  text-align: center;
}

.osirchannel-smile-container {
  position: relative;
  width: 340px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.osirchannel-smile-svg {
  width: 340px;
  height: 180px;
  overflow: visible;
  filter: drop-shadow(0 0 35px rgba(249, 207, 12, 0.55));
}

/* Animated Smile Path Drawing (Matching icon-mono.png Osirnet U-Arc - 1.5s Load Progress) */
.osir-smile-path {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
}

.osirchannel-loader-overlay.active .osir-smile-path {
  animation: drawOsirSmile 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards 0s;
}

@keyframes drawOsirSmile {
  0% {
    stroke-dashoffset: 300;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

/* Project Authors / Development Credits (Discreet & Elegant) */
.osirchannel-loader-credits {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1.25rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease 0.6s, transform 0.5s ease 0.6s;
  text-align: center;
}

.osirchannel-loader-overlay.active .osirchannel-loader-credits {
  opacity: 0.85;
  transform: translateY(0);
}

.credits-names {
  font-size: 0.85rem;
  color: #b0bacf;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.credits-names strong {
  color: #f9cf0c;
  font-weight: 600;
}

.credits-sub {
  font-size: 0.74rem;
  color: #7d8aa8;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
}
