/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* ═══════════════════════════════════════════════════════════════════════════ */
/* BROADCAST FORM STYLES (Glass Theme)                                         */
/* ═══════════════════════════════════════════════════════════════════════════ */

.broadcast-form {
  max-width: 600px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  padding: 30px;
  box-shadow:
    0 10px 25px rgba(163, 196, 226, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.broadcast-form__field {
  margin-bottom: 20px;
}

.broadcast-form__label {
  display: block;
  color: #2d3748;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.broadcast-form__textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  color: #4a5568;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
}

.broadcast-form__textarea:focus {
  outline: none;
  background: white;
  border-color: #4facfe;
  box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.2);
}

.broadcast-form__textarea--recipients {
  min-height: 80px;
  font-family: monospace;
}

.broadcast-form__hint {
  display: block;
  font-size: 0.85rem;
  color: #718096;
  margin-top: 6px;
}

.broadcast-form__checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.broadcast-form__checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  transition: all 0.2s ease;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.04);
}

.broadcast-form__checkbox-label:hover {
  background: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(163, 196, 226, 0.2);
}

.broadcast-form__checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #4facfe;
}

.broadcast-form__file-input {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: 2px dashed rgba(79, 172, 254, 0.4);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.2s ease;
  color: #4a5568;
}

.broadcast-form__file-input:hover {
  border-color: #4facfe;
  background: rgba(255, 255, 255, 0.8);
}

.broadcast-form__submit {
  display: inline-block;
  padding: 12px 30px;
  margin-top: 10px;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
}

.broadcast-form__submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* BROADCAST PREVIEW STYLES (Glass Theme)                                      */
/* ═══════════════════════════════════════════════════════════════════════════ */

.broadcast-preview {
  max-width: 700px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  padding: 30px;
  box-shadow:
    0 10px 25px rgba(163, 196, 226, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.broadcast-preview__section {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.broadcast-preview__section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.broadcast-preview__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2b6cb0;
  margin-bottom: 12px;
}

.broadcast-preview__body {
  background: rgba(255, 255, 255, 0.8);
  padding: 16px;
  border-radius: 12px;
  border-left: 4px solid #4facfe;
  white-space: pre-wrap;
  color: #4a5568;
  line-height: 1.6;
}

.broadcast-preview__recipients {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.broadcast-preview__recipient {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-family: monospace;
  font-size: 0.9rem;
  box-shadow: 0 2px 5px rgba(79, 172, 254, 0.3);
}

.broadcast-preview__count {
  color: #718096;
  font-size: 0.9rem;
  margin-top: 12px;
}

.broadcast-preview__files {
  list-style: none;
  padding: 0;
  margin: 0;
}

.broadcast-preview__file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  margin-bottom: 8px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.04);
}

.broadcast-preview__file-icon {
  font-size: 1.5rem;
}

.broadcast-preview__file-info {
  flex: 1;
}

.broadcast-preview__file-name {
  font-weight: 600;
  color: #2d3748;
}

.broadcast-preview__file-meta {
  font-size: 0.85rem;
  color: #718096;
}

.broadcast-preview__instance {
  background: rgba(255, 255, 255, 0.8);
  padding: 10px 16px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: 8px;
  margin-bottom: 8px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.04);
}

.broadcast-preview__instance-badge {
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  border-radius: 50%;
}

.broadcast-preview__no-files {
  color: #a0aec0;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* BROADCAST CARD STYLES (Index Page)                                          */
/* ═══════════════════════════════════════════════════════════════════════════ */

.broadcast-card {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  padding: 20px;
  box-shadow:
    0 10px 25px rgba(163, 196, 226, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.broadcast-card:hover {
  transform: translateY(-5px);
  box-shadow:
    0 15px 35px rgba(163, 196, 226, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.8);
}

.broadcast-card__header {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.broadcast-card__thumbnail {
  position: relative;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(79, 172, 254, 0.1);
}

.broadcast-card__thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.broadcast-card__thumbnail-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
}

.broadcast-card__thumbnail-icon--audio {
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
}

.broadcast-card__thumbnail-icon--document {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

.broadcast-card__file-count {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 8px;
}

.broadcast-card__body-preview {
  flex: 1;
  color: #4a5568;
  font-size: 14px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.broadcast-card__stats {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.broadcast-card__stat {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
}

.broadcast-card__stat-value {
  display: block;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 2px;
}

.broadcast-card__stat-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #718096;
}

.broadcast-card__stat--total .broadcast-card__stat-value {
  color: #2b6cb0;
}

.broadcast-card__stat--success .broadcast-card__stat-value {
  color: #38a169;
}

.broadcast-card__stat--failed .broadcast-card__stat-value {
  color: #e53e3e;
}

.broadcast-card__stat--pending .broadcast-card__stat-value {
  color: #d69e2e;
}

.broadcast-card__progress {
  text-align: center;
}

.broadcast-card__progress-bar {
  height: 8px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  margin-bottom: 6px;
}

.broadcast-card__progress-sent {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  transition: width 0.3s ease;
}

.broadcast-card__progress-failed {
  background: linear-gradient(135deg, #fc8181 0%, #e53e3e 100%);
  transition: width 0.3s ease;
}

.broadcast-card__progress-text {
  font-size: 12px;
  color: #718096;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* BROADCAST SHOW PAGE STYLES                                                   */
/* ═══════════════════════════════════════════════════════════════════════════ */

.broadcast-show {
  max-width: 900px;
}

.broadcast-show__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.broadcast-show__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2d3748;
  margin: 0;
}

.broadcast-show__summary {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow:
    0 10px 25px rgba(163, 196, 226, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.broadcast-show__message {
  margin-bottom: 20px;
}

.broadcast-show__message h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #2b6cb0;
  margin: 0 0 10px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.broadcast-show__body {
  background: rgba(255, 255, 255, 0.8);
  padding: 16px;
  border-radius: 12px;
  border-left: 4px solid #4facfe;
  white-space: pre-wrap;
  color: #4a5568;
  line-height: 1.6;
}

.broadcast-show__files {
  margin-bottom: 20px;
}

.broadcast-show__files h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #2b6cb0;
  margin: 0 0 10px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.broadcast-show__files-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.broadcast-show__file {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  width: 100px;
}

.broadcast-show__file-preview {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
}

.broadcast-show__file-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  border-radius: 8px;
  margin: 0 auto;
}

.broadcast-show__file-name {
  display: block;
  font-size: 11px;
  color: #718096;
  margin-top: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.broadcast-show__stats-container {
  padding-top: 15px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.broadcast-show__stats {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.broadcast-show__stat {
  flex: 1;
  text-align: center;
  padding: 15px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
}

.broadcast-show__stat-value {
  display: block;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.broadcast-show__stat-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #718096;
}

.broadcast-show__stat--total .broadcast-show__stat-value {
  color: #2b6cb0;
}

.broadcast-show__stat--success {
  background: rgba(72, 187, 120, 0.15);
}

.broadcast-show__stat--success .broadcast-show__stat-value {
  color: #38a169;
}

.broadcast-show__stat--failed {
  background: rgba(229, 62, 62, 0.1);
}

.broadcast-show__stat--failed .broadcast-show__stat-value {
  color: #e53e3e;
}

.broadcast-show__stat--pending {
  background: rgba(214, 158, 46, 0.1);
}

.broadcast-show__stat--pending .broadcast-show__stat-value {
  color: #d69e2e;
}

.broadcast-show__progress {
  text-align: center;
}

.broadcast-show__progress-bar {
  height: 12px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  margin-bottom: 8px;
}

.broadcast-show__progress-sent {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  transition: width 0.5s ease;
}

.broadcast-show__progress-failed {
  background: linear-gradient(135deg, #fc8181 0%, #e53e3e 100%);
  transition: width 0.5s ease;
}

.broadcast-show__progress-text {
  font-size: 14px;
  color: #718096;
  font-weight: 500;
}

.broadcast-show__envelopes {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  padding: 25px;
  box-shadow:
    0 10px 25px rgba(163, 196, 226, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.broadcast-show__section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2d3748;
  margin: 0 0 15px 0;
}

.broadcast-show__envelopes-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.broadcast-show__filter {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.6);
  color: #718096;
  transition: all 0.2s ease;
}

.broadcast-show__filter:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #2d3748;
}

.broadcast-show__filter.active {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
}

.broadcast-show__envelopes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 500px;
  overflow-y: auto;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* ENVELOPE CARD STYLES                                                         */
/* ═══════════════════════════════════════════════════════════════════════════ */

.envelope-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  border-left: 4px solid #cbd5e0;
  transition: all 0.3s ease;
}

.envelope-card--pending {
  border-left-color: #d69e2e;
  background: rgba(255, 251, 235, 0.7);
}

.envelope-card--sent {
  border-left-color: #38a169;
  background: rgba(240, 255, 244, 0.8);
}

.envelope-card--failed {
  border-left-color: #e53e3e;
  background: rgba(255, 245, 245, 0.8);
}

.envelope-card__recipient {
  display: flex;
  align-items: center;
  gap: 12px;
}

.envelope-card__phone {
  font-family: monospace;
  font-size: 14px;
  font-weight: 600;
  color: #2d3748;
}

.envelope-card__status-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.envelope-card__status-badge--pending {
  background: rgba(214, 158, 46, 0.2);
  color: #b7791f;
}

.envelope-card__status-badge--sent {
  background: rgba(72, 187, 120, 0.2);
  color: #276749;
}

.envelope-card__status-badge--failed {
  background: rgba(229, 62, 62, 0.2);
  color: #c53030;
}

.envelope-card__details {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 12px;
  color: #718096;
}

.envelope-card__type {
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 6px;
}

.envelope-card__time {
  color: #38a169;
}

.envelope-card__error {
  color: #e53e3e;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* INSTANCE CARD STYLES                                                         */
/* ═══════════════════════════════════════════════════════════════════════════ */

.instance-card {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  padding: 24px;
  box-shadow:
    0 10px 25px rgba(163, 196, 226, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  margin-bottom: 20px;
}

.instance-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.instance-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid transparent;
  background: linear-gradient(white, white) padding-box,
              linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) border-box;
  box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
  flex-shrink: 0;
}

.instance-card__name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #2d3748;
}

.instance-card__badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.instance-card__status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.instance-card__status-badge--open {
  background: rgba(72, 187, 120, 0.2);
  color: #276749;
}

.instance-card__status-badge--connecting {
  background: rgba(214, 158, 46, 0.2);
  color: #b7791f;
}

.instance-card__status-badge--closed,
.instance-card__status-badge--unknown {
  background: rgba(160, 174, 192, 0.2);
  color: #4a5568;
}

.instance-card__ai-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.instance-card__ai-badge--active {
  background: linear-gradient(135deg, rgba(79, 172, 254, 0.2) 0%, rgba(0, 242, 254, 0.2) 100%);
  color: #2b6cb0;
}

.instance-card__ai-badge--inactive {
  background: rgba(160, 174, 192, 0.15);
  color: #718096;
}

.instance-card__info {
  margin-bottom: 16px;
}

.instance-card__info p {
  margin: 0 0 8px 0;
  color: #4a5568;
  font-size: 0.95rem;
}

.instance-card__qr {
  margin: 16px 0;
  text-align: center;
}

.instance-card__qr-img {
  width: 200px;
  height: 200px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 10px;
  background: white;
  border-radius: 12px;
}

.instance-card__qr-waiting {
  color: #718096;
  font-style: italic;
  text-align: center;
  padding: 20px;
}

.instance-card__actions {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* INSTANCE EDIT PAGE STYLES                                                    */
/* ═══════════════════════════════════════════════════════════════════════════ */

.instance-edit {
  max-width: 700px;
}

.instance-edit__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2d3748;
  margin: 0 0 24px 0;
}

.instance-edit__section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2b6cb0;
  margin: 0 0 20px 0;
}

.instance-edit__ai-section {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  padding: 24px;
  margin-top: 24px;
  box-shadow:
    0 10px 25px rgba(163, 196, 226, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* AI SETTINGS FORM STYLES                                                      */
/* ═══════════════════════════════════════════════════════════════════════════ */

.ai-settings-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ai-settings__toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
}

.ai-settings__toggle-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-settings__toggle-label {
  font-weight: 600;
  color: #2d3748;
  font-size: 1rem;
}

.ai-settings__toggle-hint {
  font-size: 0.85rem;
  color: #718096;
}

/* Toggle Switch */
.ai-toggle {
  position: relative;
  display: inline-block;
  width: 56px;
  height: 30px;
  flex-shrink: 0;
}

.ai-toggle__input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ai-toggle__slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(160, 174, 192, 0.4);
  transition: 0.3s;
  border-radius: 30px;
}

.ai-toggle__slider:before {
  position: absolute;
  content: "";
  height: 24px;
  width: 24px;
  left: 3px;
  bottom: 3px;
  background: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.ai-toggle__input:checked + .ai-toggle__slider {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.ai-toggle__input:checked + .ai-toggle__slider:before {
  transform: translateX(26px);
}

.ai-toggle__input:focus + .ai-toggle__slider {
  box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.3);
}

/* AI Settings Fields */
.ai-settings__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-settings__label {
  font-weight: 600;
  color: #2d3748;
  font-size: 0.95rem;
}

.ai-settings__delay-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.ai-settings__delay-input {
  width: 100px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  color: #2d3748;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  text-align: center;
  font-weight: 600;
}

.ai-settings__delay-input:focus {
  outline: none;
  background: white;
  border-color: #4facfe;
  box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.2);
}

.ai-settings__delay-hint {
  font-size: 0.85rem;
  color: #718096;
}

.ai-settings__textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 15px;
  color: #4a5568;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
  line-height: 1.5;
}

.ai-settings__textarea:focus {
  outline: none;
  background: white;
  border-color: #4facfe;
  box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.2);
}

.ai-settings__textarea::placeholder {
  color: #a0aec0;
}

.ai-settings__hint {
  font-size: 0.85rem;
  color: #718096;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* INSTANCE SHOW PAGE STYLES                                                    */
/* ═══════════════════════════════════════════════════════════════════════════ */

.instance-show {
  max-width: 700px;
}

.instance-show__ai-info {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  padding: 24px;
  margin-top: 20px;
  box-shadow:
    0 10px 25px rgba(163, 196, 226, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.instance-show__ai-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #2b6cb0;
  margin: 0 0 16px 0;
}

.instance-show__ai-icon {
  font-size: 1.3rem;
}

.instance-show__ai-details {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.instance-show__ai-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  min-width: 120px;
}

.instance-show__ai-stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #718096;
}

.instance-show__ai-stat-value {
  font-size: 1rem;
  font-weight: 600;
  color: #2d3748;
}

.instance-show__ai-stat-value--active {
  color: #38a169;
}

.instance-show__ai-instruction {
  padding: 16px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  border-left: 4px solid #4facfe;
}

.instance-show__ai-instruction-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #718096;
  margin-bottom: 8px;
}

.instance-show__ai-instruction-text {
  margin: 0;
  color: #4a5568;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* BUTTON STYLES                                                                */
/* ═══════════════════════════════════════════════════════════════════════════ */

.btn-bubble {
  display: inline-block;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-bubble:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

.btn-bubble.btn-small {
  padding: 6px 14px;
  font-size: 12px;
}

.btn-bubble.btn-primary {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
}

.btn-bubble.btn-secondary {
  background: rgba(255, 255, 255, 0.9);
  color: #4a5568;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.btn-bubble.btn-secondary:hover {
  background: white;
  color: #2d3748;
}

.btn-bubble.btn-danger {
  background: linear-gradient(135deg, #fc8181 0%, #e53e3e 100%);
  color: white;
}

.actions-bar {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}
