:root {
  --primary-color: #00A884; /* WhatsApp's new brand green */
  --secondary-color: #008069; /* WhatsApp's darker green */
  --tertiary-color: #075E54; /* WhatsApp's darkest green */
  --background-color: #f0f2f5;
  --card-hover-color: #ffffff;
  --text-color: #111B21; /* WhatsApp's text color */
  --gradient-start: #00A884;
  --gradient-end: #008069;
  --message-background: #FFFFFF;
  --success-green: #00A884;
  --gradient-primary: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
}

body {
  background-color: var(--background-color) !important;
  color: var(--text-color) !important;
  font-family: "Helvetica Neue", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
}

body > .ui.logingrid {
  height: 100%;
  max-width: 800px !important;
  margin:auto !important;
}

#loginForm label {
  color: var(--secondary-color);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.whatsapp.icon.bi-whatsapp {
  font-size: 6rem;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.menu-header {
  background: var(--primary-color) !important;
  color: white !important;
  margin-bottom: 2em !important;
  box-shadow: 
      0 20px 40px rgba(0, 168, 132, 0.2),
      inset 0 0 80px rgba(255, 255, 255, 0.15) !important;
  position: relative;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease-in-out;
}

.login {
  border-radius: 15px !important;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
  padding: 2em !important;
}

.container {
  max-width: 1400px !important;
  margin: 0 auto !important;
}

.main-header {
  background: var(--primary-color) !important;
  color: white !important;
  padding: 1.5em 2em !important;
  border-radius: 24px !important;
  margin-bottom: 2em !important;
  box-shadow: 
      0 20px 40px rgba(0, 168, 132, 0.2),
      inset 0 0 80px rgba(255, 255, 255, 0.15) !important;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease-in-out;
}

.hidden {
  display:none !important;
}

.ui.stackable.cards > .card.hidden {
  display: none !important;
}

.menu-header .title-container {
  font-size: clamp(1.5em, 3vw, 1.8em) !important;
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
}
.main-header .title-container {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
}

a#menulogout, a:visited#menulogout {
  color: #000;
}

.main-header .whatsapp.icon {
  font-size: 1em !important;
}

.main-header .whatsapp.icon:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.2);
}

@media (min-width: 768px) {
  .main-header {
      padding: 2em !important;
  }

  .main-header .ui.header {
      flex-direction: column;
  }

  .main-header .version-label {
      margin-top: 4px !important;
  }
}

.ui.header {
  font-weight: 600 !important;
  color: var(--text-color) !important;
}

.ui.cards > .card {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05) !important;
  border-radius: 16px !important;
  margin: 0.7em !important;
  background-color: var(--message-background) !important;
  border: 1px solid rgba(18, 140, 126, 0.1);
}

.ui.cards > .card:not(.no-hover):hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 12px 24px rgba(18, 140, 126, 0.15) !important;
  background-color: var(--card-hover-color) !important;
}

.ui.horizontal.divider {
  font-size: 1.3em !important;
  color: var(--secondary-color) !important;
  margin: 2.5em 0 !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ui.success.message {
  border-radius: 16px !important;
  box-shadow: 0 4px 8px rgba(37, 211, 102, 0.1) !important;
  border: 1px solid rgba(37, 211, 102, 0.2) !important;
  background-color: rgba(231, 247, 232, 0.8) !important;
  color: var(--success-green) !important;
  animation: slideIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(10px);
}

@keyframes slideIn {
  from { transform: translateX(-30px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.ui.button {
  border-radius: 12px !important;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  color: white !important;
  font-weight: 600 !important;
  letter-spacing: 0.5px;
}

.ui.button:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 16px rgba(0, 168, 132, 0.2) !important;
  filter: brightness(0.95);
}

.ui.form input, .ui.form textarea {
  border-radius: 12px !important;
  border: 2px solid rgba(18, 140, 126, 0.1) !important;
  transition: all 0.3s ease;
}

.ui.form input:focus, .ui.form textarea:focus {
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 3px rgba(0, 168, 132, 0.1) !important;
}

.ui.grid {
  margin: -0.7em !important;
}

#webhooks-table td {
  word-break: break-all;
}

.ui.grid > .column {
  padding: 0.7em !important;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.ui.modal {
  border-radius: 20px !important;
  background-color: var(--message-background) !important;
  overflow: hidden;
}

/* Overflow inteligente para dropdowns em modais */
.ui.modal.dropdown-open {
  overflow: visible !important;
  z-index: 1001 !important;
}

.ui.modal > .header {
  border-radius: 20px 20px 0 0 !important;
  background: var(--gradient-start) !important;
  color: white !important;
  padding: 1.5em !important;
}

.ui.modal > .actions {
  border-radius: 0 0 20px 20px !important;
  background-color: rgba(248, 248, 248, 0.8) !important;
  backdrop-filter: blur(10px);
}

.ui.modal > .actions > .ui.button {
  font-weight: 600 !important;
  letter-spacing: 0.5px;
}

.mb-4 {
  margin-bottom: 1.5em !important;
}

#user-role-indicator.admin {
  color: #db2828; 
  font-weight: bold;
}
  
#user-role-indicator.admin div.label {
  background-color:#d31616; 
}

#user-role-indicator.admin i.icon {
  color:#d31616;
}
  
#user-role-indicator.user {
  color: #a3f298;
}
  
#user-role-indicator.user i.icon {
  color: #a3f298;
}
  
#user-role-indicator.user div.label {
  background-color: #a3f298;
  color: #000;
}

.ui.secondary.pointing.menu {
  margin-bottom: 0;
  border-bottom: none;
}

.p1 {
  padding-right:1em;
  padding-left:1em;
}

.adminlogin {
  display:none;
}

.required {
  color: #db2828;
}

/* Groups Specific Styles */
.group-card {
  transition: all 0.3s ease !important;
  max-height: 180px !important;
}

.group-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(0, 168, 132, 0.15) !important;
}

.group-card .content {
  padding: 1em !important;
}

.group-card .header {
  font-size: 1.1em !important;
  margin-bottom: 0.3em !important;
  font-weight: 600 !important;
}

.group-photo {
  width: 45px !important;
  height: 45px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
}

.group-photo-placeholder {
  width: 45px !important;
  height: 45px !important;
  border-radius: 50% !important;
  background: var(--primary-color) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: white !important;
  font-size: 1.2em !important;
}

.participant-item {
  padding: 0.75rem 0 !important;
}

.participant-item .content .header {
  font-size: 1rem !important;
}

.participant-item .right.floated.content {
  float: none !important;
  margin-top: 0.5rem !important;
}

.admin-badge {
  background: #f2711c !important;
  color: white !important;
  font-size: 0.7em !important;
  padding: 0.2em 0.4em !important;
  border-radius: 3px !important;
  margin-left: 0.5em !important;
}

.super-admin-badge {
  background: #db2828 !important;
  color: white !important;
  font-size: 0.7em !important;
  padding: 0.2em 0.4em !important;
  border-radius: 3px !important;
  margin-left: 0.5em !important;
}

.group-stats {
  display: flex !important;
  gap: 0.8em !important;
  margin-top: 0.4em !important;
  flex-wrap: wrap !important;
}

.group-stat {
  display: flex !important;
  align-items: center !important;
  gap: 0.2em !important;
  font-size: 0.8em !important;
  color: #666 !important;
}

.groups-search-container {
  margin-bottom: 1em !important;
}

.group-actions {
  display: flex !important;
  gap: 0.3em !important;
  margin-top: 0.8em !important;
}

.group-action-btn {
  flex: 1 !important;
  font-size: 0.7em !important;
  padding: 0.4em 0.6em !important;
}

.group-card .description {
  font-size: 0.85em !important;
  color: #666 !important;
  margin-bottom: 0.4em !important;
  line-height: 1.3 !important;
}

.read-more-link {
  color: var(--primary-color) !important;
  text-decoration: none !important;
  font-weight: 500 !important;
}

.read-more-link:hover {
  text-decoration: underline !important;
}

.group-preview-photo {
  width: 80px !important;
  height: 80px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  margin-right: 1em !important;
}

.disappearing-timer-indicator {
  color: var(--primary-color) !important;
  font-weight: bold !important;
}

.invite-link-container {
  background: #f8f9fa !important;
  padding: 1em !important;
  border-radius: 8px !important;
  border: 1px solid #e9ecef !important;
}

.participant-actions {
  display: flex !important;
  gap: 0.3em !important;
}

.participant-action-btn {
  padding: 0.3em 0.6em !important;
  font-size: 0.7em !important;
}

@media (max-width: 768px) {
  .group-actions {
    flex-direction: column !important;
  }
  
  .group-action-btn {
    width: 100% !important;
  }
  
  .group-stats {
    flex-direction: column !important;
    gap: 0.5em !important;
  }
}

/* Groups Manager Styles */
#groupsMainContainer .main-header {
    margin-bottom: 2em !important;
}

#groupsMainContainer .main-header .ui.header {
    color: white !important;
}

#groupsMainContainer .main-header .sub.header {
    color: rgba(255, 255, 255, 0.8) !important;
}

.group-list-item {
    padding: 1rem 0;
    transition: background-color 0.3s ease;
    border-radius: 4px;
    margin: 0.5rem 0;
}

.group-list-item:hover {
    background-color: #f8f9fa;
}

.group-list-item .header {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.group-list-item .meta {
    color: #666;
    font-size: 0.9em;
}

.group-list-item .meta span {
    margin-right: 1rem;
}

.group-list-item .description {
    margin: 0.5rem 0;
    color: #555;
    line-height: 1.4;
}

.read-more-link {
    color: #0084ff;
    cursor: pointer;
    font-weight: 500;
}

.read-more-link:hover {
    text-decoration: underline;
}

/* Group type and role badges */
.group-list-item .ui.mini.label {
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* Group action buttons */
.group-list-item .ui.small.buttons .button {
    border: none !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    margin-right: 0.5rem !important;
}

.group-list-item .ui.small.buttons .button.primary {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.group-list-item .ui.small.buttons .button.primary:hover {
    background-color: var(--secondary-color) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 168, 132, 0.3) !important;
}

.group-list-item .ui.small.buttons .button.secondary {
    background-color: #6c757d !important;
    color: white !important;
}

.group-list-item .ui.small.buttons .button.secondary:hover {
    background-color: #5a6268 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3) !important;
}

.group-list-item .ui.small.buttons .button.loading {
    pointer-events: none;
    opacity: 0.7;
}

/* Remove the old basic button styles for groups */
.group-list-item .ui.small.basic.buttons .button {
    border: none !important;
}

.group-list-item .ui.small.basic.buttons .button:hover {
    border: none !important;
}

/* Participant item styles */
.participant-item {
    padding: 0.75rem 0 !important;
}

.participant-item .content .header {
    font-size: 1rem !important;
}

.participant-item .right.floated.content {
    float: none !important;
    margin-top: 0.5rem !important;
}

/* Groups loading state */
#groupsLoading {
    min-height: 200px;
}

/* Groups filter section */
#groupsMainContainer .ui.segment {
    border: 1px solid #e1e8ed;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    margin-bottom: 1rem;
}

/* No groups message */
#noGroupsMessage {
    margin-top: 2rem;
    text-align: center;
}

/* Responsive design for groups */
@media (max-width: 768px) {
    .group-list-item .ui.grid .column {
        padding: 0.5rem;
    }
    
    .group-list-item .four.wide.column {
        width: 100% !important;
        text-align: left !important;
        margin-top: 1rem;
    }
    
    .group-list-item .eleven.wide.column {
        width: 100% !important;
    }
    
    .group-list-item .one.wide.column {
        width: auto !important;
        margin-right: 1rem;
    }
}

/* Group type specific styling */
.group-list-item .ui.mini.label.purple {
    background-color: #8e44ad !important;
    color: white !important;
}

.group-list-item .ui.mini.label.blue {
    background-color: #3498db !important;
    color: white !important;
}

.group-list-item .ui.mini.label.green {
    background-color: var(--success-green) !important;
    color: white !important;
}

/* Group icons with specific colors */
.group-list-item .building.icon.purple {
    color: #8e44ad !important;
}

.group-list-item .users.icon.blue {
    color: #3498db !important;
}

.group-list-item .users.icon.green {
    color: var(--success-green) !important;
}

/* Feature badges styling */
.group-list-item .ui.mini.grey.label {
    background-color: #95a5a6 !important;
    color: white !important;
    margin: 0.2rem 0.3rem 0.2rem 0 !important;
}

/* Role badges styling */
.group-list-item .ui.mini.red.label,
.group-list-item .ui.mini.orange.label {
    font-weight: bold !important;
    margin-left: 0.5rem !important;
}

/* Parent community info styling */
.group-list-item .meta .sitemap.icon {
    color: #8e44ad !important;
}

/* Improved meta information spacing */
.group-list-item .meta {
    margin-top: 0.5rem !important;
    line-height: 1.6 !important;
}

.group-list-item .meta span {
    margin-right: 1rem !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.3rem !important;
}

/* Refresh button styling */
#refreshGroups.ui.button {
    background-color: var(--secondary-color) !important;
    color: white !important;
    border: none !important;
    font-weight: 600 !important;
}

#refreshGroups.ui.button:hover {
    background-color: var(--tertiary-color) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(7, 94, 84, 0.3) !important;
}

/* Modal responsiveness improvements */
.ui.modal#modalGroupDetails {
    max-width: 90vw !important;
    width: auto !important;
}

.ui.modal#modalGroupDetails .content {
    max-height: 70vh !important;
    overflow-y: auto !important;
}

.ui.modal#modalGroupDetails .actions .ui.stackable.buttons {
    flex-wrap: wrap !important;
}

.ui.modal#modalGroupDetails .actions .ui.stackable.buttons .button {
    flex: 1 1 auto !important;
    min-width: 120px !important;
    margin: 0.25rem !important;
}

/* Mobile responsiveness for group details */
@media (max-width: 768px) {
    .ui.modal#modalGroupDetails {
        margin: 1rem !important;
        max-width: calc(100vw - 2rem) !important;
    }
    
    .ui.modal#modalGroupDetails .actions .ui.stackable.buttons {
        flex-direction: column !important;
    }
    
    .ui.modal#modalGroupDetails .actions .ui.stackable.buttons .button {
        width: 100% !important;
        margin: 0.25rem 0 !important;
    }
    
    .participant-item {
        padding: 0.75rem 0 !important;
    }
    
    .participant-item .content .header {
        font-size: 1rem !important;
    }
    
    .participant-item .right.floated.content {
        float: none !important;
        margin-top: 0.5rem !important;
    }
}

/* Groups filter section button styling */
.ui.segment .ui.basic.buttons .ui.button {
    background-color: var(--secondary-color) !important;
    color: white !important;
    border: none !important;
    font-weight: 600 !important;
}

.ui.segment .ui.basic.buttons .ui.button:hover {
    background-color: var(--tertiary-color) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(7, 94, 84, 0.3) !important;
}

/* Group Management Modal Styles */
.ui.modal#modalEditGroupInfo,
.ui.modal#modalGroupSettings,
.ui.modal#modalGroupInviteLink,
.ui.modal#modalManageParticipants {
    max-width: 90vw !important;
    width: auto !important;
}

.ui.modal#modalManageParticipants {
    max-width: 95vw !important;
}

.ui.modal#modalEditGroupInfo .content,
.ui.modal#modalGroupSettings .content,
.ui.modal#modalGroupInviteLink .content,
.ui.modal#modalManageParticipants .content {
    max-height: 70vh !important;
    overflow-y: auto !important;
}

/* Group Details Modal Actions Grid */
.ui.modal#modalGroupDetails .actions .ui.stackable.grid {
    margin: 0 !important;
}

.ui.modal#modalGroupDetails .actions .ui.stackable.grid .column {
    padding: 0.5rem !important;
}

.ui.modal#modalGroupDetails .actions h5.ui.header {
    margin-top: 0 !important;
    margin-bottom: 0.5rem !important;
    color: var(--secondary-color) !important;
}

/* Group Settings Sections */
.ui.modal#modalGroupSettings .ui.dividing.header {
    color: var(--secondary-color) !important;
    border-bottom-color: rgba(0, 168, 132, 0.2) !important;
}

.ui.modal#modalGroupSettings .ui.toggle.checkbox {
    margin-bottom: 0.5rem !important;
}

/* Group Photo Container */
#currentGroupPhotoContainer {
    min-height: 80px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#currentGroupPhotoContainer img {
    max-width: 80px !important;
    max-height: 80px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
}

/* Invite Link Input */
.ui.modal#modalGroupInviteLink .ui.action.input {
    margin-bottom: 1rem !important;
}

/* Participants Management */
.ui.modal#modalManageParticipants .ui.header {
    color: var(--secondary-color) !important;
}

.ui.modal#modalManageParticipants .ui.info.message {
    border-radius: 8px !important;
    border-color: rgba(0, 168, 132, 0.3) !important;
    background-color: rgba(0, 168, 132, 0.05) !important;
}

/* Participant Item in Management */
.ui.modal#modalManageParticipants .participant-item {
    padding: 0.75rem 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

.ui.modal#modalManageParticipants .participant-item:last-child {
    border-bottom: none !important;
}

.ui.modal#modalManageParticipants .participant-item .ui.mini.button {
    font-size: 0.7rem !important;
    padding: 0.4rem 0.6rem !important;
}

.ui.modal#modalManageParticipants .participant-item .ui.mini.buttons {
    margin-bottom: 0.5rem !important;
}

.ui.modal#modalManageParticipants .participant-item .ui.mini.buttons .button {
    margin: 0.1rem !important;
}

/* Participant action buttons styling */
.ui.modal#modalManageParticipants .participant-item .ui.mini.red.button {
    background-color: #db2828 !important;
    color: white !important;
}

.ui.modal#modalManageParticipants .participant-item .ui.mini.red.button:hover {
    background-color: #c82121 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 8px rgba(219, 40, 40, 0.3) !important;
}

.ui.modal#modalManageParticipants .participant-item .ui.mini.orange.button {
    background-color: #f2711c !important;
    color: white !important;
}

.ui.modal#modalManageParticipants .participant-item .ui.mini.orange.button:hover {
    background-color: #e55a00 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 8px rgba(242, 113, 28, 0.3) !important;
}

.ui.modal#modalManageParticipants .participant-item .ui.mini.grey.button {
    background-color: #767676 !important;
    color: white !important;
}

.ui.modal#modalManageParticipants .participant-item .ui.mini.grey.button:hover {
    background-color: #666666 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 8px rgba(118, 118, 118, 0.3) !important;
}

/* Participant item content layout */
.ui.modal#modalManageParticipants .participant-item .content {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    width: 100% !important;
}

.ui.modal#modalManageParticipants .participant-item .participant-info {
    flex: 1 !important;
}

.ui.modal#modalManageParticipants .participant-item .participant-actions {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 0.5rem !important;
    margin-left: 1rem !important;
}

.ui.modal#modalManageParticipants .participant-item .participant-labels {
    display: flex !important;
    gap: 0.3rem !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
}

.ui.modal#modalManageParticipants .participant-item .participant-buttons .right.floated.content {
    float: none !important;
    margin: 0 !important;
}

/* Proxy Configuration Styles */
#proxyUrlField {
  display: none;
}

#proxyUrlField.show {
  display: block;
}

/* S3 Configuration Styles */

/* Mobile Responsiveness for Group Management */
@media (max-width: 768px) {
    .ui.modal#modalGroupDetails .actions .ui.stackable.grid .column {
        width: 100% !important;
        margin-bottom: 1rem !important;
    }
    
    .ui.modal#modalGroupDetails .actions .ui.fluid.buttons {
        flex-direction: column !important;
    }
    
    .ui.modal#modalGroupDetails .actions .ui.fluid.buttons .button {
        margin: 0.25rem 0 !important;
        width: 100% !important;
    }
    
    .ui.modal#modalManageParticipants .ui.stackable.grid .column {
        width: 100% !important;
        margin-bottom: 2rem !important;
    }
    
    .ui.modal#modalGroupSettings .ui.segment .ui.stackable.grid .column {
        width: 100% !important;
        text-align: center !important;
    }
    
    .ui.modal#modalGroupSettings .ui.buttons {
        flex-direction: column !important;
    }
    
    .ui.modal#modalGroupSettings .ui.buttons .button {
        margin: 0.25rem 0 !important;
        width: 100% !important;
    }
    
    /* Mobile layout for participant items */
    .ui.modal#modalManageParticipants .participant-item .content {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    .ui.modal#modalManageParticipants .participant-item .participant-actions {
        margin-left: 0 !important;
        margin-top: 0.5rem !important;
        align-items: flex-start !important;
        width: 100% !important;
    }
    
    .ui.modal#modalManageParticipants .participant-item .participant-labels {
        justify-content: flex-start !important;
        margin-bottom: 0.5rem !important;
    }
    
    .ui.modal#modalManageParticipants .participant-item .ui.mini.buttons {
        width: 100% !important;
    }
    
    .ui.modal#modalManageParticipants .participant-item .ui.mini.buttons .button {
        flex: 1 !important;
        margin: 0.1rem !important;
    }
}

/* Button Styling for Group Actions */
.ui.modal .actions .ui.button {
    border-radius: 8px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.ui.modal .actions .ui.blue.button {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.ui.modal .actions .ui.blue.button:hover {
    background-color: var(--secondary-color) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 168, 132, 0.3) !important;
}

.ui.modal .actions .ui.green.button {
    background-color: var(--success-green) !important;
    color: white !important;
}

.ui.modal .actions .ui.green.button:hover {
    background-color: var(--secondary-color) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 168, 132, 0.3) !important;
}

.ui.modal .actions .ui.orange.button {
    background-color: #f2711c !important;
    color: white !important;
}

.ui.modal .actions .ui.orange.button:hover {
    background-color: #e55a00 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(242, 113, 28, 0.3) !important;
}

.ui.modal .actions .ui.purple.button {
    background-color: #8e44ad !important;
    color: white !important;
}

.ui.modal .actions .ui.purple.button:hover {
    background-color: #7d3c98 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(142, 68, 173, 0.3) !important;
}

/* Loading States */
.ui.modal .ui.button.loading {
    pointer-events: none !important;
    opacity: 0.7 !important;
}

/* Form Validation */
.ui.modal .ui.form .field.error input,
.ui.modal .ui.form .field.error textarea {
    border-color: #db2828 !important;
    box-shadow: 0 0 0 3px rgba(219, 40, 40, 0.1) !important;
}

/* Success/Error Messages in Modals */
.ui.modal .ui.success.message {
    border-radius: 8px !important;
    border-color: rgba(0, 168, 132, 0.3) !important;
    background-color: rgba(0, 168, 132, 0.05) !important;
    color: var(--success-green) !important;
}

.ui.modal .ui.error.message {
    border-radius: 8px !important;
    border-color: rgba(219, 40, 40, 0.3) !important;
    background-color: rgba(219, 40, 40, 0.05) !important;
    color: #db2828 !important;
}

/* Webhooks Manager Styles */
#webhooksMainContainer .main-header {
    margin-bottom: 2em !important;
}

#webhooksMainContainer .main-header .ui.header {
    color: white !important;
}

#webhooksMainContainer .main-header .sub.header {
    color: rgba(255, 255, 255, 0.8) !important;
}

#webhooksMainContainer .ui.segment {
    border: 1px solid #e1e8ed;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    margin-bottom: 1rem;
}

/* Webhooks loading state */
#webhooksLoading {
    min-height: 200px;
}

/* No webhooks message */
#noWebhooksMessage {
    margin-top: 2rem;
    text-align: center;
}

/* Webhooks table styling */
#webhooks-table-manager {
    margin: 0 !important;
}

#webhooks-table-manager td {
    word-break: break-all;
}

#webhooks-table-manager .ui.small.buttons .button {
    border: none !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    margin-right: 0.25rem !important;
}

#webhooks-table-manager .ui.small.buttons .button.blue {
    background-color: var(--primary-color) !important;
    color: white !important;
}

#webhooks-table-manager .ui.small.buttons .button.blue:hover {
    background-color: var(--secondary-color) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 168, 132, 0.3) !important;
}

#webhooks-table-manager .ui.small.buttons .button.red {
    background-color: #db2828 !important;
    color: white !important;
}

#webhooks-table-manager .ui.small.buttons .button.red:hover {
    background-color: #c82121 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(219, 40, 40, 0.3) !important;
}

/* Webhook status labels */
#webhooks-table-manager .ui.mini.label.green {
    background-color: var(--success-green) !important;
    color: white !important;
}

#webhooks-table-manager .ui.mini.label.red {
    background-color: #db2828 !important;
    color: white !important;
}

/* S3 Modal Specific Styles */
#modalS3Config {
    top: 10vh !important;
    margin-top: 0 !important;
}

#modalS3Config .content {
    max-height: calc(80vh - 140px) !important; /* 80vh minus header and actions height */
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 1.5rem !important;
}

/* Custom scrollbar for S3 modal content */
#modalS3Config .content::-webkit-scrollbar {
    width: 8px;
}

#modalS3Config .content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#modalS3Config .content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

#modalS3Config .content::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Firefox scrollbar styling */
#modalS3Config .content {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f1f1f1;
}

/* S3 Instructions Accordion */
#s3Instructions {
    margin-bottom: 2rem !important;
    border: 1px solid rgba(0, 168, 132, 0.2) !important;
    border-radius: 8px !important;
    background-color: rgba(0, 168, 132, 0.03) !important;
}

/* S3 Toggle State Colors */
/* Configurações base do toggle para evitar overflow */
#s3EnabledNew.ui.toggle.checkbox label,
#s3EnabledExisting.ui.toggle.checkbox label {
    overflow: hidden !important;
}

#s3EnabledNew.ui.toggle.checkbox label:before,
#s3EnabledNew.ui.toggle.checkbox label:after,
#s3EnabledExisting.ui.toggle.checkbox label:before,
#s3EnabledExisting.ui.toggle.checkbox label:after {
    border-radius: 1rem !important;
}

/* Estado com dados e ATIVO: Verde - OVERRIDE SEMÂNTICO UI */
html body .ui.form .field .ui.toggle.checkbox#s3EnabledExisting.checked.has-data label:before,
html body .ui.toggle.checkbox#s3EnabledExisting.checked.has-data label:before,
body .ui.toggle.checkbox#s3EnabledExisting.checked.has-data label:before,
#s3EnabledExisting.ui.toggle.checkbox.checked.has-data label:before {
    background-color: var(--success-green) !important;
    border: 1px solid var(--success-green) !important;
    box-shadow: 0 0 8px rgba(0, 168, 132, 0.3) !important;
    background-image: none !important;
}

#s3EnabledExisting.ui.toggle.checkbox.checked.has-data label:after {
    background-color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

/* Estado com dados mas DESATIVADO: Laranja/Vermelho - Especificidade extra */
.ui.toggle.checkbox#s3EnabledExisting.has-data:not(.checked) label:before,
#s3EnabledExisting.ui.toggle.checkbox.has-data:not(.checked) label:before {
    background-color: #f2711c !important;
    border: 1px solid #f2711c !important;
    box-shadow: 0 0 8px rgba(242, 113, 28, 0.3) !important;
}

.ui.toggle.checkbox#s3EnabledExisting.has-data:not(.checked) label:after,
#s3EnabledExisting.ui.toggle.checkbox.has-data:not(.checked) label:after {
    background-color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    left: 0.15em !important;
    transform: none !important;
    margin-left: 0 !important;
}

#s3Instructions .title {
    background-color: rgba(0, 168, 132, 0.08) !important;
    color: var(--primary-color) !important;
    font-weight: 600 !important;
}

#s3Instructions .title:hover {
    background-color: rgba(0, 168, 132, 0.15) !important;
}

#s3Instructions .content {
    background-color: white !important;
    border-top: 1px solid rgba(0, 168, 132, 0.1) !important;
}

/* Chatwoot Modal Specific Styles */
#modalChatwootConfig {
    top: 10vh !important;
    margin-top: 0 !important;
}

#modalChatwootConfig .content {
    max-height: calc(80vh - 140px) !important; /* 80vh minus header and actions height */
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 1.5rem !important;
}

/* Custom scrollbar for Chatwoot modal content */
#modalChatwootConfig .content::-webkit-scrollbar {
    width: 8px;
}

#modalChatwootConfig .content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#modalChatwootConfig .content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

#modalChatwootConfig .content::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Firefox scrollbar styling */
#modalChatwootConfig .content {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f1f1f1;
}

/* Compact folder color dropdown to fit inside modal - single line, no scroll */
#folderModal .folder-color-dropdown {
    overflow: visible !important;
}

#folderModal .folder-color-dropdown .color-grid {
    display: flex !important;
    flex-wrap: nowrap !important; /* Single line */
    gap: 4px !important; /* Minimal gap */
    padding: 4px !important;
}

#folderModal .folder-color-dropdown .color-item {
    width: 28px !important; /* Same as color-preview */
    height: 28px !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
}

#folderModal .folder-color-dropdown .color-dot {
    width: 28px !important; /* Same as color-preview */
    height: 28px !important;
    border-radius: 4px !important; /* Same as color-preview */
    border: 2px solid rgba(0, 0, 0, 0.1) !important; /* Same as color-preview */
}

/* Chatwoot Instructions Accordion */
#chatwootInstructions {
    margin-bottom: 2rem !important;
    border: 1px solid rgba(0, 168, 132, 0.2) !important;
    border-radius: 8px !important;
    background-color: rgba(0, 168, 132, 0.03) !important;
}

#chatwootInstructions .title {
    background-color: rgba(0, 168, 132, 0.08) !important;
    color: var(--secondary-color) !important;
    font-weight: 600 !important;
    padding: 1rem 1.5rem !important;
    border-radius: 8px 8px 0 0 !important;
}

#chatwootInstructions .title:hover {
    background-color: rgba(0, 168, 132, 0.12) !important;
}

#chatwootInstructions .title .dropdown.icon {
    color: var(--primary-color) !important;
}

#chatwootInstructions .content {
    padding: 1.5rem !important;
    border-top: 1px solid rgba(0, 168, 132, 0.1) !important;
}

#chatwootInstructions .ui.relaxed.list .item {
    padding: 0.75rem 0 !important;
}

#chatwootInstructions .ui.relaxed.list .item .header {
    color: var(--secondary-color) !important;
    font-weight: 600 !important;
    margin-bottom: 0.5rem !important;
}

#chatwootInstructions .ui.relaxed.list .item .description {
    color: #555 !important;
    line-height: 1.5 !important;
}

#chatwootInstructions .ui.relaxed.list .item .description strong {
    color: var(--text-color) !important;
}

#chatwootInstructions .ui.relaxed.list .item i.icon {
    color: var(--primary-color) !important;
    margin-right: 0.75rem !important;
}

/* Webhook URL highlighting */
#webhookUrl {
    color: var(--primary-color) !important;
    font-family: 'Courier New', monospace !important;
    background-color: rgba(0, 168, 132, 0.1) !important;
    padding: 0.2rem 0.4rem !important;
    border-radius: 4px !important;
    font-size: 0.9em !important;
}

/* Responsive design for webhooks */
@media (max-width: 768px) {
    #webhooksMainContainer .ui.stackable.grid .column {
        width: 100% !important;
        margin-bottom: 1rem !important;
    }
    
    #webhooksMainContainer .ui.segment .ui.stackable.grid .column {
        padding: 0.5rem;
    }
    
    #webhooksMainContainer .ui.segment .four.wide.column,
    #webhooksMainContainer .ui.segment .three.wide.column {
        width: 100% !important;
        margin-bottom: 0.5rem !important;
    }
    
    #webhooksMainContainer .ui.segment .six.wide.column {
        width: 100% !important;
        margin-bottom: 1rem !important;
    }
    
    #webhooks-table-manager .ui.small.buttons {
        flex-direction: column !important;
        gap: 0.25rem !important;
    }
    
    #webhooks-table-manager .ui.small.buttons .button {
        width: 100% !important;
        margin-right: 0 !important;
    }
    
    /* Mobile responsive for S3 modal */
    #modalS3Config {
        max-height: 90vh !important;
        top: 5vh !important;
        margin: 0 1rem !important;
        max-width: calc(100vw - 2rem) !important;
    }

    #modalS3Config .content {
        max-height: calc(90vh - 140px) !important;
        padding: 1rem !important;
    }

    /* Mobile responsive for Chatwoot modal */
    #modalChatwootConfig {
        max-height: 90vh !important;
        top: 5vh !important;
        margin: 0 1rem !important;
        max-width: calc(100vw - 2rem) !important;
    }

    #modalChatwootConfig .content {
        max-height: calc(90vh - 140px) !important;
        padding: 1rem !important;
    }
}

/* Webhook clickable styling */
.webhook-clickable {
    cursor: pointer;
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.webhook-clickable:hover {
    color: #007bff;
    text-decoration: none;
}

/* Chatwoot Toggle State Colors */
/* Configurações base do toggle para evitar overflow */
#chatwootEnabled.ui.toggle.checkbox label {
    overflow: hidden !important;
}

#chatwootEnabled.ui.toggle.checkbox label:before,
#chatwootEnabled.ui.toggle.checkbox label:after {
    border-radius: 1rem !important;
}

/* Estado padrão sem dados mantém comportamento nativo do Semantic UI */

/* Estado com dados e ATIVO: Verde - OVERRIDE SEMÂNTICO UI */
html body .ui.form .field .ui.toggle.checkbox#chatwootEnabled.checked.has-data label:before,
html body .ui.toggle.checkbox#chatwootEnabled.checked.has-data label:before,
body .ui.toggle.checkbox#chatwootEnabled.checked.has-data label:before,
#chatwootEnabled.ui.toggle.checkbox.checked.has-data label:before {
    background-color: var(--success-green) !important;
    border: 1px solid var(--success-green) !important;
    box-shadow: 0 0 8px rgba(0, 168, 132, 0.3) !important;
    background-image: none !important;
}

#chatwootEnabled.ui.toggle.checkbox.checked.has-data label:after {
    background-color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

/* Estado com dados mas DESATIVADO: Laranja/Vermelho - Especificidade extra */
.ui.toggle.checkbox#chatwootEnabled.has-data:not(.checked) label:before,
#chatwootEnabled.ui.toggle.checkbox.has-data:not(.checked) label:before {
    background-color: #f2711c !important;
    border: 1px solid #f2711c !important;
    box-shadow: 0 0 8px rgba(242, 113, 28, 0.3) !important;
}

.ui.toggle.checkbox#chatwootEnabled.has-data:not(.checked) label:after,
#chatwootEnabled.ui.toggle.checkbox.has-data:not(.checked) label:after {
    background-color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    left: 0.15em !important;
    transform: none !important;
    margin-left: 0 !important;
}

/* Indicadores visuais para toggle com dados - fundo do toggle */
#chatwootToggleExisting.status-green label::before {
    background-color: #00A884 !important;
}

#chatwootToggleExisting.status-orange label::before {
    background-color: #f2711c !important;
}

#chatwootToggleExisting.status-grey label::before {
    background-color: #d4d4d5 !important;
}

/* Transcription Provider Segmented Control Buttons */
.transcription-provider-btn {
    flex: 1 !important;
    position: relative !important;
    transition: all 0.3s ease !important;
}

/* Estado CINZA: sem dados configurados */
.transcription-provider-btn.no-data {
    background-color: #f5f5f5 !important;
    color: #999 !important;
    cursor: pointer !important;
    opacity: 0.6 !important;
}

/* Estado NORMAL: com dados, mas não selecionado */
.transcription-provider-btn.has-data {
    background-color: #fff !important;
    color: #333 !important;
    border: 1px solid #ddd !important;
}

/* Estado SELECIONADO: botão clicado */
.transcription-provider-btn.selected {
    background-color: #e3f2fd !important;
    color: #1976d2 !important;
    border: 2px solid #2196f3 !important;
    font-weight: 600 !important;
}

/* Estado ATIVO: transcrição enabled + é o provider atual */
.transcription-provider-btn.active .provider-indicator {
    display: inline !important;
    margin-right: 0.5em !important;
}

/* Hover em botões com dados */
.transcription-provider-btn.has-data:hover,
.transcription-provider-btn.selected:hover {
    background-color: #e8f4f8 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

/* Hover em botões sem dados - feedback visual sutil */
.transcription-provider-btn.no-data:hover {
    background-color: #ebebeb !important;
    opacity: 0.75 !important;
}

/* ===== Folders System Styles ===== */

/* Folders Sidebar */
#folders-sidebar {
  padding-right: 0.5rem;
}

#folders-list .folder-item {
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

#folders-list .folder-item:hover {
  background-color: #f8f9fa;
  transform: translateX(2px);
}

#folders-list .folder-item.active {
  background-color: #e3f2fd !important;
  border-left: 3px solid #2185d0;
}

#folders-list .folder-item.drag-over {
  background-color: #d1ecf1 !important;
  border: 2px dashed #0c5460;
}

/* Folder Actions */
.folder-actions {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.folder-item:hover .folder-actions {
  opacity: 1;
}

.folder-actions .button {
  padding: 0.4em !important;
}

/* Instance Row Dragging */
#instances-table tbody tr {
  cursor: move;
  transition: all 0.2s ease;
}

#instances-table tbody tr:hover {
  background-color: #f8f9fa;
}

#instances-table tbody tr.dragging {
  opacity: 0.5;
  background-color: #e0e0e0;
}

#instances-table tbody tr[draggable="true"]:hover {
  cursor: grab;
}

#instances-table tbody tr[draggable="true"]:active {
  cursor: grabbing;
}

/* Drag Handle Column */
#instances-table tbody tr td:first-child {
  text-align: center;
  cursor: grab;
  color: #ccc;
}

#instances-table tbody tr td:first-child::before {
  content: "☰";
  font-size: 1.2em;
}

#instances-table tbody tr:hover td:first-child {
  color: #666;
}

/* Folder Modal - Allow dropdown overflow */
#folderModal .content {
  overflow: visible !important;
}

#folderModal .ui.form {
  overflow: visible !important;
}

#folderModal .field {
  overflow: visible !important;
}

/* Folder Modal Color Picker - Inline Button Style */
.folder-color-button-wrapper {
  position: relative;
  overflow: visible;
}

.folder-color-button {
  width: 100%;
  height: 38px;
  border: 1px solid rgba(34, 36, 38, 0.15);
  border-radius: 4px;
  background: white;
  cursor: pointer;
  padding: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.folder-color-button:hover {
  border-color: rgba(34, 36, 38, 0.35);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.folder-color-button:focus {
  outline: none;
  border-color: #85b7d9;
  box-shadow: 0 0 0 2px rgba(33, 133, 208, 0.15);
}

.color-preview {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.folder-color-button:hover .color-preview {
  transform: scale(1.1);
}

/* Color Dropdown Popover */
.folder-color-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: white;
  border: 1px solid rgba(34, 36, 38, 0.15);
  border-radius: 6px;
  padding: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  min-width: 180px;
}

.folder-color-dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 12px;
  width: 12px;
  height: 12px;
  background: white;
  border-left: 1px solid rgba(34, 36, 38, 0.15);
  border-top: 1px solid rgba(34, 36, 38, 0.15);
  transform: rotate(45deg);
}


.color-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.color-item {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.color-item:hover {
  background-color: rgba(0, 0, 0, 0.03);
  transform: scale(1.05);
}

.color-item.selected {
  background-color: rgba(33, 133, 208, 0.1);
  box-shadow: 0 0 0 2px rgba(33, 133, 208, 0.3);
}

.color-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.color-item:hover .color-dot {
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25), inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.color-item.selected .color-dot {
  border-color: white;
  box-shadow: 0 0 0 3px currentColor, 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* Current Folder Title */
#current-folder-title {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #f0f0f0;
}

/* Responsive */
@media (max-width: 768px) {
  #folders-sidebar {
    margin-bottom: 1rem;
  }

  .twelve.wide.column {
    width: 100% !important;
  }

  /* Ajustes para tabela de instâncias em mobile */
  #instances-table {
    font-size: 0.9rem;
  }

  #instances-table thead th,
  #instances-table tbody td {
    padding: 0.5rem !important;
  }
}

/* Drag & Drop Styles */
tr[draggable="true"] {
  cursor: move;
  transition: opacity 0.2s, background-color 0.2s;
}

tr[draggable="true"]:hover {
  background-color: #f5f5f5 !important;
}

tr.dragging {
  opacity: 0.5;
  background-color: #e8f5e9 !important;
}

.folder-item.drag-over {
  background-color: #e3f2fd !important;
  border-left: 4px solid var(--primary-color) !important;
  transform: translateX(4px);
  transition: all 0.2s;
}

.folder-item {
  transition: all 0.2s;
  cursor: pointer;
}

.folder-item:hover {
  background-color: #f5f5f5 !important;
}

.folder-item.active {
  background-color: #e8f5e9 !important;
  border-left: 4px solid var(--primary-color) !important;
  font-weight: 600;
}

.folder-actions {
  opacity: 0;
  transition: opacity 0.2s;
}

.folder-item:hover .folder-actions {
  opacity: 1;
}

/* ===== Instance List Items - Minimal & Consistent ===== */
.instance-list-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.625rem 0.875rem;
  margin-bottom: 0.375rem;
  background: var(--message-background);
  border-radius: 8px;
  border: 1px solid rgba(18, 140, 126, 0.08);
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.instance-list-item:hover {
  border-color: rgba(18, 140, 126, 0.15);
  background: var(--card-hover-color);
  box-shadow: 0 2px 8px rgba(18, 140, 126, 0.08);
}

.instance-list-item.drag-ready {
  cursor: grab !important;
  background: rgba(0, 168, 132, 0.05);
  border-color: rgba(0, 168, 132, 0.3);
  box-shadow: 0 4px 12px rgba(18, 140, 126, 0.15);
}

.instance-list-item.drag-ready .instance-drag-handle {
  color: var(--primary-color);
  font-weight: bold;
}

.instance-list-item.dragging {
  opacity: 0.5;
  transform: scale(0.98);
  cursor: grabbing !important;
}

/* Drag Handle - Minimal */
.instance-drag-handle {
  color: rgba(17, 27, 33, 0.2);
  font-size: 0.875rem;
  cursor: grab;
  padding: 0 0.25rem;
  user-select: none;
  transition: color 0.2s;
}

.instance-list-item:hover .instance-drag-handle {
  color: rgba(17, 27, 33, 0.4);
}

.instance-list-item.dragging .instance-drag-handle {
  cursor: grabbing;
}

/* Status Indicator - ui horizontal label style (consistent with instance details) */
.instance-list-item .instance-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4em 0.75em;
  border-radius: 0.28571429rem;
  font-size: 0.78571429rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: baseline;
  transition: all 0.2s;
}

.instance-list-item .instance-status.online {
  background-color: #21ba45;
  color: #fff;
}

.instance-list-item .instance-status.offline {
  background-color: #db2828;
  color: #fff;
}

.instance-list-item .instance-status-text {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

/* Instance Info */
.instance-list-item .instance-info {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.instance-list-item .instance-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-color);
}

.instance-list-item .instance-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-color);
  opacity: 0.5;
  flex-wrap: wrap;
}

.instance-list-item .instance-id {
  font-family: 'Courier New', monospace;
  color: var(--text-color);
  opacity: 0.4;
  cursor: help;
  transition: opacity 0.2s;
  font-size: 0.75rem;
}

.instance-list-item .instance-id:hover {
  opacity: 0.6;
}

.instance-list-item .instance-folder {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
}

.instance-list-item .instance-folder i {
  font-size: 0.75rem;
}

/* Instance Actions - Visible Delete Button */
.instance-list-item .instance-actions {
  display: flex;
  gap: 0.375rem;
  align-items: center;
}

.instance-list-item .instance-btn-menu {
  padding: 0.5rem 0.625rem !important;
  background: rgba(220, 53, 69, 0.08) !important;
  color: #dc3545 !important;
  border: 1px solid rgba(220, 53, 69, 0.2) !important;
  border-radius: 6px !important;
  font-size: 0.875rem !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
  opacity: 0.9 !important;
}

.instance-list-item .instance-btn-menu:hover {
  background: rgba(220, 53, 69, 0.15) !important;
  border-color: rgba(220, 53, 69, 0.4) !important;
  opacity: 1 !important;
  transform: scale(1.05) !important;
}

.instance-list-item .instance-btn-menu:active {
  transform: scale(0.95) !important;
}

.instance-list-item .instance-btn-menu i {
  margin: 0 !important;
}

/* Responsive */
@media (max-width: 768px) {
  .instance-list-item {
    flex-wrap: wrap;
    gap: 0.625rem;
  }

  .instance-list-item .instance-actions {
    opacity: 1;
    width: 100%;
    margin-top: 0.25rem;
  }

  .instance-list-item .instance-btn {
    flex: 1;
  }
}
