 :root {
      --bg: #f4f6fb;
      --panel: #ffffff;
      --sidebar: #eef2f7;
      --text: #111827;
      --muted: #6b7280;
      --border: #e5e7eb;
      --user: #2563eb;
      --bot: #10b981;
      --input: #ffffff;
      --danger: #ef4444;
    }

    body.dark {
      --bg: #0f172a;
      --panel: #111827;
      --sidebar: #0b1220;
      --text: #f9fafb;
      --muted: #9ca3af;
      --border: #263244;
      --user: #60a5fa;
      --bot: #34d399;
      --input: #1f2937;
      --danger: #f87171;
    }

    * { box-sizing: border-box; }

    html, body {
      width: 100%;
      overflow-x: hidden;
    }

    body {
      margin: 0;
      font-family: "Segoe UI", Arial, sans-serif;
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
      display: flex;
      justify-content: center;
      padding: 30px;
    }

    .app {
      width: 100%;
      max-width: 1800px;
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: 22px;
      overflow: hidden;
      box-shadow: 0 20px 60px rgba(0,0,0,0.15);
      display: flex;
      height: 93vh;
    }

    .sidebar {
      width: 250px;
      background: var(--sidebar);
      border-right: 1px solid var(--border);
      padding: 16px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .new-chat {
      border: none;
      background: var(--user);
      color: white;
      border-radius: 12px;
      padding: 12px;
      cursor: pointer;
      font-weight: bold;
    }

    .conversation-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
      overflow-y: auto;
    }

    .conversation-item {
      border: 1px solid var(--border);
      background: var(--input);
      color: var(--text);
      border-radius: 12px;
      padding: 10px;
      cursor: pointer;
      display: flex;
      justify-content: space-between;
      gap: 8px;
      align-items: center;
    }

    .conversation-item.active { border-color: var(--user); }

    .conversation-title {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 14px;
    }

    .delete-chat {
      border: none;
      background: transparent;
      color: var(--danger);
      cursor: pointer;
      font-size: 14px;
    }

    .main {
      flex: 1;
      display: flex;
      flex-direction: column;
      min-width: 0;
    }

    header {
      padding: 20px 24px;
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .title h1 {
      margin: 0;
      font-size: 22px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .title h1 img {
      height: 48px;
      width: auto;
    }

    .title p {
      margin: 4px 0 0;
      color: var(--muted);
      font-size: 14px;
    }

    .theme-btn {
      border: 1px solid var(--border);
      background: var(--input);
      color: var(--text);
      border-radius: 999px;
      padding: 10px 14px;
      cursor: pointer;
      font-size: 14px;
    }

    #chat {
      flex: 1;
      padding: 24px;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .message {
      max-width: 90%;
      padding: 10px 14px;
      border-radius: 16px;
      line-height: 1.5;
      white-space: normal;
      overflow-wrap: break-word;
      word-break: break-word;
      animation: fadeIn 0.2s ease-in-out;
    }

    .user {
      align-self: flex-end;
      background: var(--user);
      color: white;
      border-bottom-right-radius: 4px;
    }

    .bot {
      align-self: flex-start;
      background: var(--input);
      border: 1px solid var(--border);
      color: var(--text);
      border-bottom-left-radius: 4px;
    }

    .sender {
      display: block;
      font-size: 10px;
      opacity: 0.5;
      margin-bottom: 1px;
      font-weight: 600;
    }

    .composer {
      padding: 18px;
      border-top: 1px solid var(--border);
      display: flex;
      gap: 12px;
      background: var(--panel);
      flex-wrap: wrap;
      align-items: flex-end;
    }

    #message {
      flex: 1;
      min-width: 180px;
      min-height: 46px;
      max-height: 250px;
      resize: none;
      overflow-y: auto;
      border: 1px solid var(--border);
      background: var(--input);
      color: var(--text);
      border-radius: 18px;
      padding: 13px 18px;
      font-size: 15px;
      font-family: inherit;
      line-height: 1.4;
      outline: none;
    }

    #file {
      max-width: 100%;
      color: var(--text);
    }

    button.send {
      border: none;
      background: var(--user);
      color: white;
      border-radius: 999px;
      padding: 0 18px;
      min-height: 46px;
      font-size: 15px;
      cursor: pointer;
      font-weight: bold;
    }

    button.image-btn img {
      height: 26px;
      width: 26px;
      display: block;
    }

    .composer-tools {
      width: 100%;
      display: flex;
      align-items: stretch;
      gap: 10px;
      flex-wrap: wrap;
    }

    .workflow-cards {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      flex: 1;
      min-width: 320px;
    }

    .workflow-card {
      border: 1px solid var(--border);
      background: var(--input);
      color: var(--text);
      border-radius: 14px;
      padding: 8px 10px;
      cursor: pointer;
      min-width: 110px;
      text-align: left;
    }

    .workflow-card.active {
      border-color: var(--user);
      box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.25);
    }

    .workflow-icon {
      display: block;
      font-size: 18px;
    }

    .workflow-name {
      display: block;
      font-size: 12px;
      font-weight: 700;
    }

    .workflow-desc {
      display: block;
      font-size: 11px;
      color: var(--muted);
    }

    .mode-selector {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-top: 10px;
    }

    .mode-card {
      border: 1px solid var(--border);
      background: var(--input);
      color: var(--text);
      border-radius: 999px;
      padding: 8px 12px;
      cursor: pointer;
      font-weight: 600;
    }

    .mode-card.active {
      border-color: var(--user);
      box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.25);
    }

    .generation-actions {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      align-items: stretch;
    }

    .action-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      border: none;
      background: var(--user);
      color: white;
      border-radius: 999px;
      padding: 12px 18px;
      min-height: 52px;
      font-size: 15px;
      font-weight: 700;
      cursor: pointer;
      white-space: nowrap;
      line-height: 1;
    }

    .action-btn img {
      height: 24px;
      width: 24px;
      display: block;
      flex: 0 0 auto;
    }

    .action-btn span {
      display: inline-block;
      white-space: nowrap;
    }

    .action-btn:hover,
    .new-chat:hover,
    .theme-btn:hover,
    button.send:hover {
      opacity: 0.92;
    }

    .message-content { line-height: 1.7; }

    .message-content h1,
    .message-content h2,
    .message-content h3 {
      margin-top: 12px;
      margin-bottom: 8px;
    }

    .message-content p { margin: 8px 0; }

    .message-content ul,
    .message-content ol { padding-left: 24px; }

    .message-content li { margin-bottom: 6px; }

    .message-content strong { font-weight: 700; }

    .message-content code {
      background: rgba(0,0,0,0.1);
      padding: 2px 6px;
      border-radius: 6px;
      font-family: Consolas, monospace;
    }

    .message-content pre {
      overflow-x: auto;
      padding: 12px;
      border-radius: 10px;
      background: rgba(0,0,0,0.08);
    }

    .generated-image {
      max-width: 100%;
      border-radius: 14px;
      margin-top: 12px;
      border: 1px solid var(--border);
      display: block;
    }

    .typing {
      color: var(--muted);
      font-style: italic;
      font-size: 14px;
      margin-left: 4px;
    }

    .loading-message {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .loading-logo {
      width: 36px;
      height: 36px;
      object-fit: contain;
      animation: adriasPulse 1.4s ease-in-out infinite;
    }

    .loading-text {
      display: inline-block;
      line-height: 1.5;
    }

    .loading-dots::after {
      content: "";
      animation: loadingDots 1.5s infinite;
    }

    .generated-video {
      max-width: 100%;
      border-radius: 14px;
      margin-top: 12px;
      border: 1px solid var(--border);
      display: block;
    }
    @keyframes adriasPulse {
      0% {
        transform: scale(1);
        opacity: 0.65;
      }
      50% {
        transform: scale(1.12);
        opacity: 1;
      }
      100% {
        transform: scale(1);
        opacity: 0.65;
      }
    }

    @keyframes loadingDots {
      0% { content: ""; }
      25% { content: "."; }
      50% { content: ".."; }
      75% { content: "..."; }
      100% { content: ""; }
    }
    
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(4px); }
      to { opacity: 1; transform: translateY(0); }
    }

    @media (max-width: 750px) {
      body {
        padding: 0;
        margin: 0;
      }

      .app {
        width: 100vw;
        height: 100dvh;
        min-height: 100dvh;
        max-width: none;
        border-radius: 0;
        border: none;
        flex-direction: column;
      }

      #chat {
        flex: 1;
        min-height: 35vh;
        max-height: none;
        overflow-y: auto;
        padding: 10px;
      }
      
      .sidebar {
        width: 100%;
        max-height: 170px;
        border-right: none;
        border-bottom: 1px solid var(--border);
      }

      .conversation-list {
        flex-direction: row;
        overflow-x: auto;
      }

      .conversation-item { min-width: 180px; }

      header { padding: 14px; }

      .title h1 { font-size: 18px; }

      .title h1 img { height: 40px; }

      .title p { font-size: 12px; }

      #chat { padding: 14px; }

      .message {
        max-width: 95%;
        font-size: 14px;
      }

      .composer {
        max-height: 45vh;
        overflow-y: auto;
      }

      #file,
      #message,
      button.send {
        width: 100%;
      }

      #message { border-radius: 14px; }

      button.send { height: 44px; }

      .composer-tools {
        width: 100%;
        flex-direction: column;
      }

      .workflow-cards {
        width: 100%;
        min-width: 0;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

      .workflow-card {
        min-width: 0;
        padding: 8px;
      }

      .workflow-name,
      .workflow-desc {
        white-space: normal;
      }

      .generation-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
      }

      .media-actions {
    display: flex;
    width: 100%;
    gap: 10px;
  }

  .action-btn {
    flex: 1;
    min-width: 0;
    min-height: 56px;
    justify-content: center;
    padding: 10px 8px;
    font-size: 13px;
    white-space: nowrap;
  }

  .action-btn img {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
  }
        .main {
          min-height: 0;
        }

        #chat {
          min-height: 0;
        }

        .composer {
          padding-bottom: calc(10px + env(safe-area-inset-bottom));
      }
    }
    @supports (-webkit-touch-callout: none) {
      .app {
        height: -webkit-fill-available;
      }

      html,
      body {
        height: -webkit-fill-available;
      }
    }

    /* Correctifs layout composer / boutons génération */
    .composer {
      align-items: stretch;
    }

    .input-row {
      width: 100%;
      display: flex;
      align-items: stretch;
      gap: 12px;
    }

    .input-row #message {
      flex: 1 1 auto;
      width: auto;
    }

    .send-message-btn {
      width: 60px;
      min-width: 60px;
      flex: 0 0 60px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .composer-tools {
      width: 100%;
      display: grid;
      grid-template-columns: minmax(320px, 1fr) auto;
      align-items: stretch;
      gap: 12px;
    }

    .workflow-cards {
      min-width: 0;
    }

    .generation-actions {
      display: flex;
      align-items: stretch;
      gap: 10px;
      flex-wrap: nowrap;
    }

    .action-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 9px;
      border: none;
      background: var(--user);
      color: white;
      border-radius: 999px;
      padding: 12px 18px;
      min-height: 52px;
      min-width: 190px;
      font-size: 15px;
      font-weight: 700;
      cursor: pointer;
      white-space: nowrap;
      line-height: 1;
      overflow: visible;
    }

    .action-btn img {
      width: 26px;
      height: 26px;
      display: block;
      flex: 0 0 26px;
    }

    .action-btn span {
      display: inline-block;
      white-space: nowrap;
      overflow: visible;
    }

    @media (max-width: 750px) {
      .input-row {
        width: 100%;
        display: flex;
        gap: 8px;
      }

      .input-row #message {
        width: auto;
        flex: 1 1 auto;
      }

      .send-message-btn {
        width: 54px !important;
        min-width: 54px;
        flex: 0 0 54px;
        height: auto;
      }

      .composer-tools {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 10px;
      }

      .workflow-cards {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
      }

      .workflow-card {
        min-width: 0;
        width: 100%;
      }

      .generation-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 10px;
      }

      .action-btn {
        width: 100%;
        min-width: 0;
        min-height: 54px;
        padding: 12px 16px;
        font-size: 15px;
        border-radius: 18px;
      }

      .action-btn img {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
      }
    }

  

    /* Zone de dépôt / collage de fichiers */
    .document-zone {
      width: 100%;
      border: 2px dashed var(--border);
      background: var(--input);
      color: var(--text);
      border-radius: 16px;
      padding: 10px;
      display: flex;
      flex-direction: column;
      gap: 4px;
      cursor: pointer;
      transition: 0.2s;
    }

    .document-zone.dragover,
    .document-zone:focus {
      border-color: var(--user);
      box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.22);
      outline: none;
    }

    .document-zone-title {
      font-weight: 700;
    }

    .document-zone-help,
    .document-zone-limit {
      color: var(--muted);
      font-size: 13px;
    }

    .attached-files {
      width: 100%;
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .file-chip {
      border: 1px solid var(--border);
      background: var(--input);
      color: var(--text);
      border-radius: 999px;
      padding: 7px 10px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      max-width: 100%;
      font-size: 13px;
    }

    .file-chip span {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .file-chip button {
      border: none;
      background: transparent;
      color: var(--danger);
      cursor: pointer;
      font-weight: 700;
    }

    .file-toolbar {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-top: 4px;
    }

    .small-btn {
      border: 1px solid var(--border);
      background: var(--panel);
      color: var(--text);
      border-radius: 999px;
      padding: 8px 12px;
      cursor: pointer;
      width: fit-content;
    }

    .input-row {
      width: 100%;
      display: flex;
      align-items: stretch;
      gap: 12px;
    }

    .input-row #message {
      flex: 1 1 auto;
      width: auto;
    }

    .send-message-btn {
      width: 60px;
      min-width: 60px;
      flex: 0 0 60px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .composer-tools {
      width: 100%;
      display: grid;
      grid-template-columns: minmax(320px, 1fr) auto;
      align-items: stretch;
      gap: 12px;
    }

    .generation-actions {
      display: flex;
      align-items: stretch;
      gap: 10px;
      flex-wrap: nowrap;
    }

    .action-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 9px;
      border: none;
      background: var(--user);
      color: white;
      border-radius: 999px;
      padding: 12px 18px;
      min-height: 52px;
      min-width: 190px;
      font-size: 15px;
      font-weight: 700;
      cursor: pointer;
      white-space: nowrap;
      line-height: 1;
      overflow: visible;
    }

    .action-btn img {
      width: 26px;
      height: 26px;
      display: block;
      flex: 0 0 26px;
    }

    .action-btn span {
      display: inline-block;
      white-space: nowrap;
    }

    @media (max-width: 750px) {
      .input-row {
        width: 100%;
        display: flex;
        gap: 8px;
      }

      .send-message-btn {
        width: 54px !important;
        min-width: 54px;
        flex: 0 0 54px;
      }

      .composer-tools {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 10px;
      }

      .workflow-cards {
        width: 100%;
        min-width: 0;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
      }

      .workflow-card {
        min-width: 0;
        width: 100%;
      }

      .generation-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 10px;
      }

      .action-btn {
        width: 100%;
        min-width: 0;
        min-height: 54px;
        padding: 12px 16px;
        font-size: 15px;
        border-radius: 18px;
      }

      .action-btn img {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
      }
    }

/* Bouton discret d'annulation */
.stop-btn {
  width: 44px;
  min-width: 44px;
  border: 1px solid var(--border);
  background: var(--input);
  color: var(--danger);
  border-radius: 999px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stop-btn:hover {
  background: rgba(239, 68, 68, 0.12);
}

.stop-btn[hidden] {
  display: none !important;
}

@media (max-width: 750px) {
  .stop-btn {
    width: 54px;
    min-width: 54px;
  }
}

/* Écran de connexion moderne */
[hidden] {
  display: none !important;
}

.login-screen {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.24), transparent 32%),
    radial-gradient(circle at bottom right, rgba(52, 211, 153, 0.18), transparent 30%),
    var(--bg);
}

.login-card {
  width: 100%;
  max-width: 430px;
  border: 1px solid var(--border);
  background: rgba(17, 24, 39, 0.82);
  color: var(--text);
  border-radius: 28px;
  padding: 34px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px);
}

body:not(.dark) .login-card {
  background: rgba(255, 255, 255, 0.86);
}

.login-logo-wrap {
  width: 76px;
  height: 76px;
  border: 1px solid var(--border);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--input);
  margin-bottom: 18px;
}

.login-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.login-card h1 {
  margin: 0;
  font-size: 28px;
}

.login-card p {
  margin: 8px 0 24px;
  color: var(--muted);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 650;
}

.login-form input {
  border: 1px solid var(--border);
  background: var(--input);
  color: var(--text);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 15px;
  outline: none;
}

.login-form input:focus {
  border-color: var(--user);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.22);
}

.login-form button {
  margin-top: 6px;
  border: none;
  background: var(--user);
  color: white;
  border-radius: 999px;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.login-error {
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 14px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.logout-btn {
  border: 1px solid var(--border);
  background: var(--input);
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
}

.logout-btn:hover {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.45);
}

@media (max-width: 750px) {
  .login-screen {
    padding: 16px;
  }

  .login-card {
    padding: 24px;
    border-radius: 22px;
  }

  .login-card h1 {
    font-size: 23px;
  }

  .header-actions {
    gap: 6px;
  }

  .logout-btn,
  .theme-btn {
    padding: 8px 10px;
    font-size: 12px;
  }
}

/* Gestion compte / utilisateurs */
.account-btn,
.admin-btn {
  border: 1px solid var(--border);
  background: var(--input);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
}

.account-btn:hover,
.admin-btn:hover {
  border-color: var(--user);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: min(920px, 100%);
  max-height: min(86vh, 820px);
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
  padding: 22px;
}

.small-modal {
  width: min(460px, 100%);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.modal-header h2 {
  margin: 0;
  font-size: 22px;
}

.modal-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.modal-close {
  border: 1px solid var(--border);
  background: var(--input);
  color: var(--text);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  cursor: pointer;
}

.settings-form,
.user-create-form {
  display: grid;
  gap: 12px;
}

.settings-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-weight: 650;
}

.settings-form input,
.user-create-form input,
.user-create-form select,
.user-role-select,
.user-password-input,
.user-display-input {
  border: 1px solid var(--border);
  background: var(--input);
  color: var(--text);
  border-radius: 14px;
  padding: 11px 12px;
  font-size: 14px;
  outline: none;
}

.user-create-form {
  grid-template-columns: 1fr 1fr 150px 1fr auto;
  align-items: end;
  margin-bottom: 18px;
}

.primary-btn,
.secondary-btn,
.danger-btn,
.icon-btn {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}

.primary-btn {
  background: var(--user);
  color: white;
  border-color: var(--user);
}

.secondary-btn {
  background: var(--input);
  color: var(--text);
}

.danger-btn {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: var(--danger);
}

.icon-btn {
  background: var(--input);
  color: var(--text);
  padding: 8px 10px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.form-message {
  border: 1px solid var(--border);
  background: var(--input);
  color: var(--text);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 14px;
  margin-bottom: 10px;
}

.form-message.success {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.12);
}

.form-message.error {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

.users-list {
  display: grid;
  gap: 10px;
}

.user-row {
  border: 1px solid var(--border);
  background: var(--input);
  border-radius: 18px;
  padding: 12px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 150px 110px auto;
  gap: 10px;
  align-items: center;
}

.user-main {
  min-width: 0;
}

.user-main strong,
.user-main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-main span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.user-status {
  font-size: 12px;
  color: var(--muted);
}

.user-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .user-create-form,
  .user-row {
    grid-template-columns: 1fr;
  }

  .user-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 750px) {
  .account-btn,
  .admin-btn {
    padding: 8px 10px;
    font-size: 12px;
  }

  .modal-card {
    padding: 16px;
    border-radius: 20px;
  }
}
