/* Base overlay */
.ants-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, .45);

  display: flex;                 /* center modal */
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Dialog */
.ants-modal__dialog {
  background: #fff;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;                /* centered by flex parent */
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

/* Header */
.ants-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid #e5e5e5;
  background: #0079fc;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

.ants-modal__header strong {
  font-weight: 600;
}

.ants-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #e5f0ff;
  padding: 0 4px;
}

.ants-close:hover {
  color: #ffffff;
}

/* Tabs */
.ants-modal__tabs {
  display: flex;
  gap: 8px;
  padding: 8px 18px;
  border-bottom: 1px solid #eee;
  background: #f7f9fc;
}

.ants-modal__tabs .tab {
  background: #f0f4ff;
  border: 1px solid #ccd0d4;
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 13px;
  color: #334155;
}

.ants-modal__tabs .tab:hover {
  background: #e2ecff;
}

.ants-modal__tabs .tab.active {
  background: #0079fc;
  border-color: #0079fc;
  color: #ffffff;
}

/* Body */
.ants-modal__body {
  padding: 18px;
}

/* ----- FORM LAYOUT ----- */

#ants-mail-form {
  max-width: 640px;
  margin: 0 auto;           /* center form */
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ants-modal .row {
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.ants-modal .row label {
  width: 70px;
  min-width: 70px;
  font-size: 13px;
  font-weight: 500;
  color: #4b5563;
  padding-top: 8px;
  text-align: right;
}

#ants-mail-form input[type="text"],
#ants-mail-form textarea,
#ants-modele-mail {
  flex: 1;
  border-radius: 6px;
  border: 1px solid #ccd0d4;
  padding: 8px 10px;
  font-size: 14px;
  background: #f9fafb;
  color: #111827;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

#ants-mail-form input[type="text"]:focus,
#ants-mail-form textarea:focus,
#ants-modele-mail:focus {
  outline: none;
  border-color: #0079fc;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(0, 121, 252, 0.2);
}

#ants-body {
  min-height: 170px;
  resize: vertical;
}

/* "Actualisé" button next to À */
#ants-mail-form input[type="button"][name="Actualisé"] {
  border-radius: 6px;
  border: 1px solid #ccd0d4;
  padding: 8px 10px;
  font-size: 13px;
  background: #f3f4f6;
  cursor: pointer;
  white-space: nowrap;
}

#ants-mail-form input[type="button"][name="Actualisé"]:hover {
  background: #e5e7eb;
}

/* Buttons row: intuitive primary action on the right */
#ants-mail-form .row:last-of-type {
  justify-content: flex-end;
  align-items: center;
}

#ants-mail-form button[type="submit"] {
  background: #0079fc;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 121, 252, 0.35);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
}

#ants-mail-form button[type="submit"]:hover {
  background: #0063cf;
  box-shadow: 0 10px 22px rgba(0, 99, 207, 0.4);
  transform: translateY(-1px);
}

#ants-mail-form button[type="submit"]:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(0, 99, 207, 0.35);
}

/* Status text */
#ants-mail-status {
  margin-left: 10px;
  font-size: 13px;
  color: #6b7280;
}

/* Inbox table + mail view keep your base but a bit cleaner */
.mail-body {
  border: 1px solid #e5e5e5;
  padding: 10px;
  border-radius: 6px;
  background: #fcfcfc;
}

/* Simple responsive tweak */
@media (max-width: 640px) {
  .ants-modal__dialog {
    max-width: 100%;
  }
  .ants-modal .row {
    flex-direction: column;
  }
  .ants-modal .row label {
    text-align: left;
    padding-top: 0;
  }
}
.ants-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
  margin-bottom: 12px;
}
.ants-grid--3{
  grid-template-columns: 1fr 1fr auto;
}
.field{ display:flex; flex-direction:column; gap:6px; }
.field--btn{ min-width:140px; }
.field__head{ display:flex; justify-content:space-between; align-items:baseline; gap:10px; }
.help{ color:#6b7280; }
.hint{ color:#6b7280; }

/* Activity modal sizing */
.ants-modal__dialog--activity{
  max-width: 760px;
}

/* Thread area */
.ants-thread{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:12px;
  max-height: 520px;
  overflow:auto;
  background:#f3f4f6;
  border:1px solid #e5e7eb;
  border-radius:10px;
}

/* Bubble base */
.ants-bubble{
  max-width: 75%;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid #e5e7eb;
  background:#fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  position:relative;
  word-wrap:break-word;
}

.ants-bubble .meta{
  font-size:12px;
  opacity:.75;
  margin-top:6px;
  display:flex;
  gap:10px;
}

/* Left = received */
.ants-bubble--left{
  align-self:flex-start;
  border-top-left-radius:6px;
}

/* Right = our side */
.ants-bubble--right{
  align-self:flex-end;
  border-top-right-radius:6px;
}

/* Small status line under thread */
.ants-thread-status{
  margin-top:8px;
  font-size:12px;
  color:#6b7280;
}
.ants-bubble .title-act{
  font-weight:600;
  margin-bottom:4px;
}


.ants-bubble .to{
  font-size:13px;
  opacity:.85;
  margin-bottom:6px;
}

.ants-bubble .text{
  white-space:pre-wrap;
  line-height:1.4;
}
.ants-activity-input{
  display:flex;
  gap:10px;
  margin-top:12px;
  padding-top:10px;
  border-top:1px solid #e5e7eb;
}

.ants-activity-input textarea{
  flex: 1;
  border-radius: 6px;
  border: 1px solid #ccd0d4;
  padding: 8px 10px;
  font-size: 14px;
  background: #f9fafb;
  color: #111827;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}


.ants-activity-input button {
  background: #0079fc;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 121, 252, 0.35);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
}

.ants-activity-input button:hover {
  background: #0063cf;
  box-shadow: 0 10px 22px rgba(0, 99, 207, 0.4);
  transform: translateY(-1px);
}

.ants-activity-input button:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(0, 99, 207, 0.35);
}
.ants-bubble .actions{
  position:relative;
  top:0px;
  right:8px;
  display:flex;
  gap:6px;
}

.ants-bubble .actions button{
  border:none;
  background:transparent;
  cursor:pointer;
  font-size:13px;
}


@media (max-width: 900px){
  .ants-grid{ grid-template-columns: 1fr; }
  .ants-grid--3{ grid-template-columns: 1fr; }
  .field--btn{ min-width:unset; }
}

.notify {
    color: white;
    background: red;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    animation: flicker 1s infinite;
}

@keyframes flicker {
    0%   { opacity: 1; }
    50%  { opacity: 0; }
    100% { opacity: 1; }
}
.ants-agenda-banner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:10px 12px;
  border:1px solid #f59e0b;
  background:#fff7ed;
  border-radius:10px;
  
}

.ants-agenda-banner__left{
  display:flex;
  align-items:center;
  gap:10px;
}

.ants-agenda-banner__right{
  color:#374151;
}

.ants-row-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid #60a5fa;
  background:#eff6ff;
  color:#1f2937;
  margin-left:8px;
  white-space:nowrap;
}

.ants-row-badge--urgent{
  border-color:#ef4444;
  background:#fef2f2;
}
