/* Bouton refresh admin consent (DA bleu) */
#refresh-admin-consent.styled-button {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background: #fff;
  font-weight: 600;
  border-radius: 8px;
  padding: 8px 22px;
  font-size: 1rem;
  transition: background 0.2s, color 0.2s, border 0.2s;
  box-shadow: 0 2px 8px rgba(0,113,229,0.06);
  outline: none;
  cursor: pointer;
}
#refresh-admin-consent.styled-button:hover, #refresh-admin-consent.styled-button:focus {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-dark);
}
/* Admin consent message */
.admin-consent-message {
  background: #fffbe6;
  border: 1px solid #ffe58f;
  color: #ad8b00;
  border-radius: 8px;
  padding: 18px 16px;
  margin: 24px auto;
  font-size: 1rem;
  text-align: center;
  max-width: 500px;
  display: block;
}
:root {
  --primary-color: #0071E5;
  --primary-light: #1a2332;
  --primary-dark: #0047b3;
  --secondary-color: rgba(255, 255, 255, 0.153);
  --secondary-light: #2a2a2a;
  --success-color: #07be9c;
  --success-light: #0a2f2a;
  --warning-color: #f59e0b;
  --warning-light: #2d1f0a;
  --danger-color: #ef4444;
  --danger-light: #2d1616;
  --ai-color: #0071E5;
  --human-color: #07be9c;
  --neutral-color: #f59e0b;
  --light-color: #fff;
  --dark-color: #111827;
  --surface-color: rgba(255, 255, 255, 0.153);
  --input-bg: rgba(255, 255, 255, 0.1);
  --input-border: rgba(255, 255, 255, 0.2);
  --input-focus: rgba(0, 113, 229, 0.3);
  --button-secondary: rgba(255, 255, 255, 0.15);
  --button-secondary-hover: rgba(255, 255, 255, 0.25);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --transition: all 0.3s ease;
  --light-gray: #b0b0b0;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  margin: 0;
  font-family: 'Inter', sans-serif;
  background-color: var(--light-color);
  color: var(--light-color);
  padding: 1.5rem;
  line-height: 1.5;
  background-color: #000;
}

header {
  width: 100%;
  max-width: 1000px;
  margin-bottom: 2rem;
  text-align: center;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.logo-icon {
  margin-right: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 20px;
}

h1 {
  color: var(--light-color);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

h1 span {
  color: var(--primary-color);
}

.subtitle {
  color: var(--light-color);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background-color: var(--secondary-color);
  color: var(--primary-color);
  border-radius: 30px;
  font-weight: 500;
  font-size: 0.9rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--primary-color);
  margin-right: 8px;
  animation: pulse-dot 1.5s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

@keyframes pulse-dot {
  0% {
    transform: scale(0.8);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.2);
    opacity: 1;
  }

  100% {
    transform: scale(0.8);
    opacity: 0.8;
  }
}

main {
  width: 100%;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.gauges-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 25px;
}

.gauge-container {
  position: relative;
  width: 45%;
  height: 240px;
  background-color: var(--secondary-color);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  overflow: hidden;
}

.gauge-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.gauge-title {
  display: flex;
  align-items: center;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--light-color);
  font-size: 1.1rem;
}

.gauge-title-icon {
  margin-right: 8px;
  width: 20px;
  height: 20px;
  background-color: rgba(0, 113, 229, 0.2);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gauge-title-icon svg {
  width: 14px;
  height: 14px;
  stroke: var(--ai-color);
}

.gauge {
  width: 100%;
  height: 140px;
  position: relative;
}

.gauge canvas {
  position: relative;
  z-index: 1;
}

.gauge-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -30%);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--light-color);
  z-index: 2;
  text-align: center;
}

.indicator-text {
  width: 100%;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  padding: 6px 12px;
  transition: var(--transition);
  position: absolute;
  bottom: 15px;
  left: 0;
  z-index: 2;
}

.notifications {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

#silence-notification {
  display: none;
  padding: 1rem 1.5rem;
  background-color: var(--danger-light);
  color: var(--danger-color);
  border-radius: 5px;
  text-align: left;
  font-weight: 600;
  box-shadow: var(--shadow);
  animation: pulse-notification 2s infinite;
  width: 100%;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

@keyframes pulse-notification {
  0% {
    opacity: 0.9;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.9;
  }
}

.notification-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  transform: translateY(3px);
}

#log-container {
  width: 100%;
  margin-top: 0.5rem;
}

#log {
  width: 100%;
  padding: 1.25rem;
  background: var(--surface-color);
  border-radius: 12px;
  min-height: 5rem;
  max-height: 10rem;
  overflow-y: auto;
  font-family: 'Menlo', 'Monaco', 'Consolas', monospace;
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  color: var(--light-color);
}

.highlight {
  color: var(--primary-color);
  font-weight: 600;
}

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

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--light-color);
  display: flex;
  align-items: center;
}

.card-title svg {
  margin-right: 8px;
}

footer {
  margin-top: 3rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--light-gray);
  padding: 1rem;
  width: 100%;
  max-width: 1000px;
  border-top: 1px solid var(--light-gray);
}

#loginForm {
  width: 90%;
  display: flex;
  flex-direction: column;
  align-self: center;
  margin-bottom: 20px;
}

.loginHeader {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
  text-align: center;
}

.loginHeader h2 {
  font-size: 1.3rem;
  color: var(--light-color);
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.loginHeader h2 span {
  color: var(--primary-color);
  font-weight: 700;
}

.loginFormFields {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.inputField {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 0.95rem;
  background-color: var(--input-bg);
  border: 1.5px solid var(--input-border);
  color: var(--light-color);
  border-radius: 8px;
  box-sizing: border-box;
  transition: var(--transition);
  font-family: inherit;
  backdrop-filter: blur(10px);
}

.inputField::placeholder {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
}

.inputField:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--input-focus);
  background-color: rgba(255, 255, 255, 0.15);
}

.inputField:hover:not(:focus) {
  border-color: rgba(255, 255, 255, 0.3);
  background-color: rgba(255, 255, 255, 0.12);
}

.loginButtons {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.75rem;
  color: var(--light-color);
  margin-bottom: 1rem;
}

.loginButtons #loginButton,
.loginButtons #registerButton,
#buy-credits-button, 
#refresh-page-button {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  height: 48px;
  padding: 0;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  transition: var(--transition);
  cursor: pointer;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.loginButtons #loginButton, 
#buy-credits-button {
  background: var(--primary-color);
  color: var(--light-color);
  box-shadow: 0 4px 12px rgba(0, 113, 229, 0.3);
}

.loginButtons #registerButton, 
#refresh-page-button {
  background-color: var(--button-secondary);
  color: var(--light-color);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.loginButtons #loginButton:hover:not(:disabled), 
#buy-credits-button:hover {
  background: linear-gradient(135deg, var(--primary-dark), #003d99);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 113, 229, 0.4);
}

.loginButtons #registerButton:hover, 
#refresh-page-button:hover {
  background-color: var(--button-secondary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.loginButtons #loginButton:active, 
#buy-credits-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 113, 229, 0.3);
}

.loginButtons #registerButton:active, 
#refresh-page-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

/* Button disabled state */
.loginButtons #loginButton:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: linear-gradient(135deg, #6b7280, #4b5563);
  box-shadow: none;
  transform: none;
}

.loginButtons #loginButton:disabled:hover {
  background: linear-gradient(135deg, #6b7280, #4b5563);
  transform: none;
  box-shadow: none;
}

.styled-button {
  width: 100%;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 8px;
  text-align: center;
  border: none;
  background: none;
  outline: none;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.styled-button:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Error message with modern styling */
.login-error-message {
  width: 100%;
  padding: 0.875rem 1rem;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.05));
  color: #ff6b6b;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  font-size: 0.875rem;
  text-align: center;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
  backdrop-filter: blur(10px);
}

/* Loading animations */
@keyframes button-loading {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

.loginButtons #loginButton:disabled {
  animation: button-loading 1.5s ease-in-out infinite;
}

.inputField:focus,
.styled-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--input-focus);
}

.app-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.app-loader.show {
  opacity: 1;
  visibility: visible;
}

.loader-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
}

.loader-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  max-width: 400px;
  padding: 3rem 2rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.loader-icon {
  margin-bottom: 2rem;
  animation: loader-float 3s ease-in-out infinite;
}

.loader-icon svg {
  width: 60px;
  height: 60px;
  stroke: var(--ai-color);
  filter: drop-shadow(0 0 20px rgba(0, 113, 229, 0.5));
}

.loader-bot .loader-icon svg {
  stroke: var(--human-color);
  filter: drop-shadow(0 0 20px rgba(7, 190, 156, 0.5));
}

.loader-initialization .loader-icon svg {
  stroke: var(--warning-color);
  filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.5));
}

@keyframes loader-float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

.loader-message {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 2rem;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.loader-spinner {
  display: flex;
  justify-content: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--ai-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loader-bot .spinner {
  border-top-color: var(--human-color);
}

.loader-initialization .spinner {
  border-top-color: var(--warning-color);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .gauges-row {
    gap: 20px;
  }

  .gauge-container {
    width: 100%;
    max-width: 400px;
  }
}

@media (max-width: 768px) {
  .gauges-row {
    flex-direction: column;
    align-items: center;
  }

  .gauge-container {
    width: 100%;
    max-width: 350px;
  }

  h1 {
    font-size: 2rem;
  }

  #loginForm {
    max-width: 100%;
  }

  .loginButtons #loginButton,
  .loginButtons #registerButton,
  #buy-credits-button, 
  #refresh-page-button {
    height: 44px;
  }

  .loader-content {
    max-width: 90%;
    padding: 2rem 1.5rem;
  }

  .loader-icon svg {
    width: 50px;
    height: 50px;
  }

  .loader-message {
    font-size: 1.1rem;
  }

  .spinner {
    width: 35px;
    height: 35px;
  }
}

#pasteJoinUrl {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem;
  background-color: var(--secondary-color);
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  text-align: center;
}

#pasteJoinUrl:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

#pasteJoinUrl h3 {
  color: var(--light-color);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
}

#pasteJoinUrl h3 span {
  color: var(--primary-color);
}

#pasteJoinUrl p {
  color: var(--light-color);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0.8rem;
  opacity: 0.9;
}

#pasteJoinUrl p:last-of-type {
  margin-bottom: 1.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--primary-color);
}

#join-url-input {
  width: 100%;
  min-height: 120px;
  padding: 1rem;
  font-size: 0.95rem;
  background-color: var(--input-bg);
  border: 1.5px solid var(--input-border);
  color: var(--light-color);
  border-radius: 12px;
  box-sizing: border-box;
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
  backdrop-filter: blur(10px);
  resize: vertical;
  margin-bottom: 1.5rem;
  
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#join-url-input::-webkit-scrollbar {
  display: none;
}

#join-url-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
}

#join-url-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--input-focus);
  background-color: rgba(255, 255, 255, 0.15);
}

#join-url-input:hover:not(:focus) {
  border-color: rgba(255, 255, 255, 0.3);
  background-color: rgba(255, 255, 255, 0.12);
}

#join-meeting-button {
  width: 100%;
  height: 48px;
  padding: 0 2rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  background: var(--primary-color);
  color: var(--light-color);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

#join-meeting-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #4f46e5, #3b82f6);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 113, 229, 0.4);
}

#pasteJoinUrlError {
  width: 100%;
  padding: 0.875rem 1rem;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.05));
  color: #ff6b6b;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  font-size: 0.875rem;
  text-align: center;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
  backdrop-filter: blur(10px);
  margin-top: 1rem;
}


.logout-button {
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  font-family: inherit;
}

.logout-button:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  transform: translateY(-1px);
}

.logout-button:active {
  transform: translateY(0);
}

.logout-button.visible {
  display: flex;
}

.logout-icon {
  width: 16px;
  height: 16px;
  transform: translateY(2px);
}

@keyframes button-loading {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

#join-meeting-button:disabled {
  animation: button-loading 1.5s ease-in-out infinite;
}

@media (max-width: 768px) {
  #pasteJoinUrl {
    padding: 1.5rem;
    margin: 0 1rem;
  }
  
  #pasteJoinUrl h3 {
    font-size: 1.3rem;
  }
  
  #join-url-input {
    min-height: 80px;
  }
  
  #join-meeting-button {
    height: 44px;
  }
}