/* Modern Discord Autopost CSS Design System */
:root {
  color-scheme: dark;
  --bg-dark: #0d0f17;
  --bg-card: rgba(22, 26, 42, 0.75);
  --bg-sidebar: #121522;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(88, 101, 242, 0.4);
  
  --primary: #5865F2; /* Discord Blurple */
  --primary-hover: #4752C4;
  --success: #57F287;
  --warning: #FEE75C;
  --danger: #ED4245;
  --cyan: #00F2FE;
  
  --text-main: #F2F3F5;
  --text-muted: #949BA4;
  --text-sub: #B5BAC1;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --shadow-glow: 0 8px 32px 0 rgba(88, 101, 242, 0.2);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
  height: 100vh;
}

h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
}

/* Glassmorphism Effect */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

/* App Container Layout */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* Sidebar Navigation */
.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  padding: 0 8px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.brand-text h2 {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
}

.brand-text h2 span {
  color: var(--cyan);
}

.brand-text p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin: 16px 8px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-sub);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.nav-item.active {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.nav-item .badge {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
}

.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.status-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
}

.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.status-indicator.online {
  background-color: var(--success);
  box-shadow: 0 0 10px var(--success);
}

.status-title {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Main Content Layout */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.top-header {
  height: 70px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(13, 15, 23, 0.8);
  backdrop-filter: blur(10px);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  width: 340px;
}

.header-search input {
  background: transparent;
  border: none;
  color: var(--text-main);
  outline: none;
  font-size: 0.88rem;
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-profile .avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.88rem;
  font-weight: 600;
}

.user-role {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Content Body */
.content-body {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}

.tab-page {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-page.active {
  display: block;
}

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

.page-title {
  margin-bottom: 24px;
}

.page-title h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.page-title p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-sub);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: #fff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #c03537;
}

/* Dashboard Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 20px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--border-highlight);
  transform: translateY(-2px);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.purple { background: rgba(88, 101, 242, 0.15); color: var(--primary); }
.stat-icon.green { background: rgba(87, 242, 135, 0.15); color: var(--success); }
.stat-icon.blue { background: rgba(0, 242, 254, 0.15); color: var(--cyan); }
.stat-icon.cyan { background: rgba(254, 231, 92, 0.15); color: var(--warning); }
.stat-icon.orange { background: rgba(251, 146, 60, 0.15); color: #fb923c; }

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2px 0;
}

.stat-trend {
  font-size: 0.72rem;
  font-weight: 500;
}

.stat-trend.positive { color: var(--success); }

/* Dashboard Widgets */
.dashboard-widgets {
  display: flex;
  gap: 24px;
}

.widget-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.flex-2 { flex: 2; }
.flex-1 { flex: 1; }

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.widget-header h3 {
  font-size: 1.1rem;
}

/* Mock Chart */
.mock-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 200px;
  padding-top: 20px;
}

.chart-bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
  flex: 1;
}

.chart-bar-group .bar {
  width: 28px;
  background: rgba(88, 101, 242, 0.3);
  border-radius: 6px 6px 0 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 4px;
  transition: var(--transition);
}

.chart-bar-group .bar span {
  font-size: 0.68rem;
  font-weight: 600;
  color: #fff;
  opacity: 0;
  transition: var(--transition);
}

.chart-bar-group:hover .bar {
  background: var(--primary);
}

.chart-bar-group:hover .bar span {
  opacity: 1;
}

.chart-bar-group .bar.highlight {
  background: linear-gradient(to top, var(--primary), var(--cyan));
}

.chart-bar-group .label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Activity Feed */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feed-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.feed-badge {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.feed-badge.success { background-color: var(--success); }
.feed-badge.info { background-color: var(--cyan); }

.feed-text {
  font-size: 0.85rem;
  color: var(--text-sub);
}

.feed-text code {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

.feed-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Table Design */
.table-toolbar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 16px;
}

.search-box input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  color: #fff;
  width: 280px;
  outline: none;
}

.table-card {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th, .data-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.88rem;
}

.data-table th {
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Badges */
.badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success { background: rgba(87, 242, 135, 0.15); color: var(--success); }
.badge-warning { background: rgba(254, 231, 92, 0.15); color: var(--warning); }
.badge-accent { background: rgba(88, 101, 242, 0.15); color: var(--primary); }

/* Switch Toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider { background-color: var(--success); }
input:checked + .slider:before { transform: translateX(20px); }

/* Forms & Inputs */
.card {
  padding: 24px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.label-with-counter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.label-with-counter label {
  margin-bottom: 0;
}

.char-counter {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition);
}

.char-counter.warning {
  color: var(--warning);
  font-weight: 600;
}

.char-counter.limit {
  color: var(--danger);
  font-weight: 700;
}

.form-input, .form-select {
  width: 100%;
  background: rgba(16, 20, 32, 0.85);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  outline: none;
  font-size: 0.9rem;
  transition: var(--transition);
  color-scheme: dark;
}

.form-input:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.25);
}

/* Custom Select Option Dark Theme */
select option, .form-select option {
  background-color: #121522 !important;
  color: #ffffff !important;
  padding: 10px;
  font-size: 0.9rem;
}

select option:checked, .form-select option:checked {
  background-color: var(--primary) !important;
  color: #ffffff !important;
}

select option:hover, .form-select option:hover {
  background-color: var(--primary-hover) !important;
  color: #ffffff !important;
}

.form-help {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  overflow-y: auto;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  width: 520px;
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
  padding: 28px;
  margin: auto;
  box-sizing: border-box;
}

.modal-content::-webkit-scrollbar {
  width: 6px;
}

.modal-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

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

/* Accounts Tab Specific */
.accounts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.account-card {
  padding: 24px;
}

.account-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.bot-avatar {
  font-size: 2rem;
  background: var(--primary);
  width: 50px; height: 50px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.info-banner {
  display: flex;
  gap: 16px;
  padding: 20px;
  border-left: 4px solid var(--warning);
}

.info-icon { font-size: 1.5rem; }

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: #fff;
  font-size: 0.88rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  animation: slideIn 0.3s forwards;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Form Row Layout */
.form-row {
  display: flex;
  gap: 16px;
}

.form-row .flex-1 {
  flex: 1;
  min-width: 0;
}

/* Searchable Select Dropdown */
.searchable-select {
  position: relative;
}

.searchable-select .searchable-input {
  padding-right: 36px;
  cursor: pointer;
}

.searchable-select .searchable-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.searchable-select .searchable-input.selected {
  border-color: var(--primary);
  color: var(--text-main);
}

.searchable-select .select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  transition: var(--transition);
}

.searchable-select.open .select-arrow {
  transform: translateY(-50%) rotate(180deg);
  color: var(--primary);
}

.select-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #1a1e2e;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  max-height: 240px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  display: none;
  animation: dropdownSlide 0.2s ease;
}

.searchable-select.open .select-dropdown {
  display: block;
}

@keyframes dropdownSlide {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dropdown scrollbar */
.select-dropdown::-webkit-scrollbar {
  width: 6px;
}

.select-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.select-dropdown::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.select-dropdown::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Option Items */
.select-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.88rem;
  color: var(--text-sub);
}

.select-option:hover {
  background: rgba(88, 101, 242, 0.15);
  color: var(--text-main);
}

.select-option:active {
  background: rgba(88, 101, 242, 0.25);
}

.option-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.option-channel-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text-muted);
  flex-shrink: 0;
  font-weight: 700;
}

.option-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Loading State */
.select-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
  justify-content: center;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Empty State */
.select-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

/* Table Cell Icons */
.cell-with-icon {
  display: flex;
  align-items: center;
  gap: 6px;
}

.server-icon {
  font-size: 0.9rem;
}

.channel-icon {
  font-weight: 800;
  color: var(--text-muted);
  font-size: 1rem;
}

.text-muted {
  color: var(--text-muted);
}

/* Modal wider for two-column layout */
.modal-content {
  width: 620px;
}

/* ============================
   Discord Accounts Management
   ============================ */

/* Green success button */
.btn-success {
  background: #2d9f48;
  color: #fff;
  border: none;
}

.btn-success:hover {
  background: #248f3e;
  transform: translateY(-1px);
}

/* Card Section Title */
.card-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

/* Card Header Row (title + action button) */
.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-header-row .card-section-title {
  margin-bottom: 0;
}

/* Discord Add Account Card */
.discord-add-account-card {
  margin-bottom: 24px;
}

.discord-add-account-card .form-group {
  margin-bottom: 16px;
}

/* Discord Accounts Table Card */
.discord-accounts-table-card .table-card {
  border: none;
  border-radius: 0;
  background: transparent;
}

/* Account empty state */
.accounts-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  color: var(--text-muted);
  gap: 12px;
}

.accounts-empty-state svg {
  opacity: 0.4;
}

.accounts-empty-state p {
  font-size: 0.9rem;
}

/* Status badges in accounts table */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
}

.status-badge .status-dot-inline {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-badge.online {
  background: rgba(87, 242, 135, 0.12);
  color: var(--success);
}

.status-badge.online .status-dot-inline {
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
}

.status-badge.offline {
  background: rgba(148, 155, 164, 0.12);
  color: var(--text-muted);
}

.status-badge.offline .status-dot-inline {
  background: var(--text-muted);
}

.status-badge.error {
  background: rgba(237, 66, 69, 0.12);
  color: var(--danger);
}

.status-badge.error .status-dot-inline {
  background: var(--danger);
  box-shadow: 0 0 6px var(--danger);
}

/* Delete button in accounts table */
.btn-delete-account {
  background: transparent;
  border: 1px solid rgba(237, 66, 69, 0.3);
  color: var(--danger);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-delete-account:hover {
  background: rgba(237, 66, 69, 0.15);
  border-color: var(--danger);
}

/* Loading spinner for add account button */
.btn-success.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn-success.loading .spinner-inline {
  display: inline-block;
}

.spinner-inline {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ========================
   License Header Pill & UI
   ======================== */
.license-header-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.license-header-pill.active {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.license-header-pill.expired {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-checking {
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
}

.dot-active {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.dot-expired {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

/* License Badges */
.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* ==========================================================================
   AUTHENTICATION PAGE STYLES (LOGIN & REGISTER)
   ========================================================================== */
.auth-page-container {
  min-height: 100vh;
  width: 100%;
  background: #f8fafc;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #0f172a;
}

.auth-box {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Brand Header */
.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
  text-align: center;
}

.auth-logo-squircle {
  width: 58px;
  height: 58px;
  background: #10b981;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.4);
  margin-bottom: 16px;
}

.auth-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px 0;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  font-size: 0.95rem;
  color: #64748b;
  margin: 0;
  font-weight: 500;
}

.auth-subtitle span {
  font-weight: 700;
  color: #334155;
}

/* Card Container */
.auth-card {
  width: 100%;
  background: #ffffff;
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.07), 0 0 1px rgba(15, 23, 42, 0.1);
  border: 1px solid rgba(226, 232, 240, 0.6);
}

/* Pill Tabs Switcher */
.auth-tabs {
  display: flex;
  background: #f1f5f9;
  border-radius: 14px;
  padding: 5px;
  margin-bottom: 26px;
}

.auth-tab-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.auth-tab-btn.active {
  background: #ffffff;
  color: #0f172a;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

/* Form & Input Fields */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #334155;
}

.auth-input {
  width: 100%;
  padding: 13px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 0.92rem;
  color: #0f172a;
  outline: none;
  transition: all 0.2s ease;
}

.auth-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.auth-input:focus {
  background: #ffffff;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Green Submit Button */
.btn-auth-submit {
  width: 100%;
  padding: 14px 20px;
  background: #10b981;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
  box-shadow: 0 6px 16px -4px rgba(16, 185, 129, 0.4);
}

.btn-auth-submit:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -4px rgba(16, 185, 129, 0.5);
}

.btn-auth-submit:active {
  transform: translateY(0);
}

/* Footer Link */
.auth-footer {
  margin-top: 24px;
  font-size: 0.9rem;
  color: #64748b;
  font-weight: 500;
}

.auth-footer a {
  color: #10b981;
  font-weight: 700;
  text-decoration: none;
  margin-left: 4px;
  transition: color 0.2s ease;
}

.auth-footer a:hover {
  color: #059669;
  text-decoration: underline;
}

/* Logout Button styling */
.btn-logout-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  margin-left: 6px;
}

.btn-logout-icon:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

/* Test Send Modal & Countdown Styles */
.test-send-icon-wrapper {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: rgba(88, 101, 242, 0.12);
  border: 2px solid rgba(88, 101, 242, 0.35);
  transition: all 0.3s ease;
}

.test-send-icon-wrapper.sending {
  animation: pulseGlow 1.5s infinite alternate;
}

.test-send-icon-wrapper.success {
  background: rgba(87, 242, 135, 0.15);
  border-color: var(--success);
  color: var(--success);
  box-shadow: 0 0 20px rgba(87, 242, 135, 0.3);
}

.test-send-icon-wrapper.error {
  background: rgba(237, 66, 69, 0.15);
  border-color: var(--danger);
  color: var(--danger);
  box-shadow: 0 0 20px rgba(237, 66, 69, 0.3);
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 8px rgba(88, 101, 242, 0.3);
    border-color: rgba(88, 101, 242, 0.4);
  }
  100% {
    box-shadow: 0 0 24px rgba(88, 101, 242, 0.8);
    border-color: var(--primary);
  }
}

.test-send-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top: 3px solid var(--primary);
  border-right: 3px solid var(--cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.timer-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  margin: 16px 0;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.2);
}

.timer-num {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
}

.timer-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
}

/* Image Preview & Attachment Styles */
.image-preview-wrapper {
  background: rgba(0, 0, 0, 0.25);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
}

.image-preview-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.image-preview-card img {
  max-width: 100%;
  max-height: 180px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  object-fit: contain;
  background: #0d1117;
}

.task-image-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(88, 101, 242, 0.15);
  border: 1px solid rgba(88, 101, 242, 0.4);
  color: var(--primary);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

