* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 10px;
  color: #333;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

header {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e0e0e0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.header-text {
  flex: 1;
}

.header-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 5px;
}

header h1 {
  font-size: 1.8rem;
  margin-bottom: 0;
  color: #333;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-help {
  background: none;
  border: none;
  color: #667eea;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s;
  margin-left: 8px;
  vertical-align: middle;
  line-height: 1;
}

.btn-help:hover {
  background: #667eea15;
  transform: scale(1.1);
}

.btn-help .bi {
  font-size: 1em;
}

header p {
  color: #666;
  font-size: 0.9rem;
}

.header-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #666;
  font-size: 0.9rem;
  gap: 20px;
  flex-wrap: wrap;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.separator {
  color: #999;
}

.sort-label {
  font-weight: normal;
  margin: 0;
}

.sort-select {
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  color: #333;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s;
}

.sort-select:hover {
  border-color: #667eea;
}

.sort-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.account-count {
  font-weight: 500;
  color: #555;
}

.header-right {
  margin-left: auto;
}

.header-right a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.header-right a:hover {
  text-decoration: underline;
}

/* Alerts */
.alert {
  padding: 10px 15px;
  border-radius: 6px;
  margin-bottom: 15px;
  font-weight: 500;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.alert p {
  margin: 0;
  flex: 1;
}

.alert-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  margin-left: 15px;
  opacity: 0.6;
  transition: opacity 0.3s;
  line-height: 1;
}

.alert-close:hover {
  opacity: 1;
}

.alert.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert.warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.api-key-panel {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #f8f9fa;
}

.api-key-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.api-key-label {
  grid-column: 1 / -1;
  font-weight: 600;
  font-size: 0.9rem;
  color: #333;
}

.api-key-input {
  margin: 0;
}

.api-key-input-wrap {
  position: relative;
}

.api-key-input-wrap .api-key-input {
  padding-right: 40px;
}

.api-key-visibility-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #666;
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.api-key-visibility-btn:hover {
  color: #333;
}

.api-key-actions {
  display: flex;
  gap: 8px;
}

.api-key-help {
  grid-column: 1 / -1;
  margin-top: 8px;
  color: #666;
  font-size: 0.8rem;
}

.api-key-form-modal {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.api-key-actions-modal {
  justify-content: flex-end;
  padding-top: 12px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn-primary {
  background: #667eea;
  color: white;
}

.btn-primary:hover {
  background: #5568d3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
}

.btn-danger {
  background: #dc3545;
  color: white;
}

.btn-danger:hover {
  background: #c82333;
}

.btn-warning {
  background: #ffc107;
  color: #333;
}

.btn-warning:hover {
  background: #e0a800;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn-oauth {
  background: white;
  color: #3c4043;
  width: 100%;
  border: 1px solid #dadce0;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 0.9rem;
}

.btn-oauth:hover {
  background: #f8f9fa;
  border-color: #d2d3d4;
  box-shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
}

.btn-outlook::before {
  content: '';
  width: 21px;
  height: 21px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 23 23"><path fill="%23f3f3f3" d="M0 0h23v23H0z"/><path fill="%23f35325" d="M1 1h10v10H1z"/><path fill="%2381bc06" d="M12 1h10v10H12z"/><path fill="%2305a6f0" d="M1 12h10v10H1z"/><path fill="%23ffba08" d="M12 12h10v10H12z"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

.btn-gmail::before {
  content: '';
  width: 18px;
  height: 18px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path fill="%234285F4" d="M45.12 24.5c0-1.56-.14-3.06-.4-4.5H24v8.51h11.84c-.51 2.75-2.06 5.08-4.39 6.64v5.52h7.11c4.16-3.83 6.56-9.47 6.56-16.17z"/><path fill="%2334A853" d="M24 46c5.94 0 10.92-1.97 14.56-5.33l-7.11-5.52c-1.97 1.32-4.49 2.1-7.45 2.1-5.73 0-10.58-3.87-12.31-9.07H4.34v5.7C7.96 41.07 15.4 46 24 46z"/><path fill="%23FBBC05" d="M11.69 28.18C11.25 26.86 11 25.45 11 24s.25-2.86.69-4.18v-5.7H4.34C2.85 17.09 2 20.45 2 24c0 3.55.85 6.91 2.34 9.88l7.35-5.7z"/><path fill="%23EA4335" d="M24 10.75c3.23 0 6.13 1.11 8.41 3.29l6.31-6.31C34.91 4.18 29.93 2 24 2 15.4 2 7.96 6.93 4.34 14.12l7.35 5.7c1.73-5.2 6.58-9.07 12.31-9.07z"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

/* Icon styles for headings */
.icon-microsoft,
.icon-google {
  display: inline-block;
  width: 21px;
  height: 21px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-right: 8px;
  vertical-align: middle;
}

.icon-microsoft {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 23 23"><path fill="%23f3f3f3" d="M0 0h23v23H0z"/><path fill="%23f35325" d="M1 1h10v10H1z"/><path fill="%2381bc06" d="M12 1h10v10H12z"/><path fill="%2305a6f0" d="M1 12h10v10H1z"/><path fill="%23ffba08" d="M12 12h10v10H12z"/></svg>');
}

.icon-google {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path fill="%234285F4" d="M45.12 24.5c0-1.56-.14-3.06-.4-4.5H24v8.51h11.84c-.51 2.75-2.06 5.08-4.39 6.64v5.52h7.11c4.16-3.83 6.56-9.47 6.56-16.17z"/><path fill="%2334A853" d="M24 46c5.94 0 10.92-1.97 14.56-5.33l-7.11-5.52c-1.97 1.32-4.49 2.1-7.45 2.1-5.73 0-10.58-3.87-12.31-9.07H4.34v5.7C7.96 41.07 15.4 46 24 46z"/><path fill="%23FBBC05" d="M11.69 28.18C11.25 26.86 11 25.45 11 24s.25-2.86.69-4.18v-5.7H4.34C2.85 17.09 2 20.45 2 24c0 3.55.85 6.91 2.34 9.88l7.35-5.7z"/><path fill="%23EA4335" d="M24 10.75c3.23 0 6.13 1.11 8.41 3.29l6.31-6.31C34.91 4.18 29.93 2 24 2 15.4 2 7.96 6.93 4.34 14.12l7.35 5.7c1.73-5.2 6.58-9.07 12.31-9.07z"/></svg>');
}

/* Divider */
.divider {
  text-align: center;
  margin: 12px 0;
  position: relative;
}

.divider::before,
.divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: #ddd;
}

.divider::before {
  left: 0;
}

.divider::after {
  right: 0;
}

.divider span {
  padding: 0 10px;
  color: #999;
  font-size: 0.9rem;
  background: #f8f9fa;
}

.app-password-section summary {
  cursor: pointer;
  font-weight: 600;
  color: #666;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 6px;
  user-select: none;
  transition: background 0.3s;
  font-size: 0.9rem;
}

.app-password-section summary:hover {
  background: #e9ecef;
}

.app-password-form {
  margin-top: 10px;
  padding: 12px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}

.help-text {
  display: block;
  color: #666;
  font-size: 0.75rem;
  margin-top: 3px;
}

.app-password-instructions {
  margin-top: 10px;
  padding: 12px;
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 6px;
}

.app-password-instructions h4 {
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: #856404;
}

.app-password-instructions ol {
  margin-left: 18px;
  margin-bottom: 8px;
}

.app-password-instructions li {
  margin-bottom: 5px;
  font-size: 0.8rem;
  color: #856404;
}

.app-password-instructions a {
  color: #667eea;
  text-decoration: none;
}

.app-password-instructions a:hover {
  text-decoration: underline;
}

.warning-note {
  background: #f8d7da;
  padding: 8px;
  border-radius: 6px;
  margin-top: 8px;
  border: 1px solid #f5c6cb;
  color: #721c24;
  font-size: 0.75rem;
}

/* Accounts */
.accounts h2 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: #333;
}

/* Service Description */
.service-description {
  background: linear-gradient(135deg, #667eea15, #764ba215);
  border: 1px solid #667eea30;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 25px;
}

.service-description h2 {
  font-size: 1.5rem;
  color: #667eea;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.service-description h3 {
  font-size: 1.1rem;
  color: #555;
  margin-top: 20px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.service-description h3:first-of-type {
  margin-top: 15px;
}

.service-description p {
  color: #555;
  line-height: 1.6;
  margin-bottom: 12px;
}

.service-description ol,
.service-description ul {
  margin-left: 20px;
  margin-bottom: 15px;
}

.service-description li {
  margin-bottom: 8px;
  color: #555;
  line-height: 1.5;
}

.service-description strong {
  color: #333;
}

.service-description .bi {
  color: #667eea;
}

.schedule-info {
  background: white;
  border-radius: 8px;
  padding: 12px 15px;
  margin-top: 15px;
  border-left: 4px solid #667eea;
}

.schedule-info p {
  margin-bottom: 8px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.schedule-info p:last-child {
  margin-bottom: 0;
}

.schedule-info .bi {
  color: #667eea;
  font-size: 1.1em;
}

/* Accounts */
.accounts h2 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: #333;
}

.account-group {
  margin-bottom: 20px;
}

.account-group h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  color: #555;
}

.warning-text {
  color: #856404;
  background: #fff3cd;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 10px;
  border: 1px solid #ffeaa7;
  font-size: 0.85rem;
}

.account-list {
  display: grid;
  gap: 8px;
}

.account-card {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  transition: all 0.3s;
}

.account-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.account-info-section {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-right-section {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

.action-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.account-info {
  flex: 1;
}

.account-email {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-email .icon-microsoft,
.account-email .icon-google,
.account-email .bi-envelope-fill {
  flex-shrink: 0;
  font-size: 1.1rem;
}

.account-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge.outlook {
  background: #0078d4;
  color: white;
}

.badge.gmail {
  background: #ea4335;
  color: white;
}

.badge.legacy {
  background: #ffc107;
  color: #333;
}

.badge.warning {
  background: #ff6b6b;
  color: white;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.spinner {
  animation: spin 1s linear infinite;
  display: inline-block;
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.account-card.needs-reauth {
  border-color: #ff6b6b;
  background: #fff5f5;
}

.account-card.needs-reauth .account-email {
  color: #d63031;
}

.last-sync {
  color: #666;
  font-size: 0.8rem;
}

.owner-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 500;
  margin-left: 8px;
}

.owner-badge i {
  font-size: 0.8rem;
}

/* Owner badge color variants */
.owner-badge-blue {
  background: #e3f2fd;
  color: #1976d2;
}

.owner-badge-purple {
  background: #f3e5f5;
  color: #7b1fa2;
}

.owner-badge-green {
  background: #e8f5e9;
  color: #388e3c;
}

.owner-badge-orange {
  background: #fff3e0;
  color: #f57c00;
}

.owner-badge-pink {
  background: #fce4ec;
  color: #c2185b;
}

.owner-badge-teal {
  background: #e0f2f1;
  color: #00796b;
}

.owner-badge-indigo {
  background: #e8eaf6;
  color: #3949ab;
}

.owner-badge-red {
  background: #ffebee;
  color: #d32f2f;
}

.user-select {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.85rem;
  background: white;
  cursor: pointer;
  transition: border-color 0.2s;
}

.user-select:hover {
  border-color: #667eea;
}

.user-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.empty-state p {
  font-size: 1.2rem;
  margin-bottom: 15px;
}

.empty-state a {
  color: #667eea;
  font-weight: 600;
  text-decoration: none;
}

.empty-state a:hover {
  text-decoration: underline;
}

/* Login page */
.login-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.login-card {
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 20px;
  background: #f8f9fa;
}

.outlook-card {
  border-color: #0078d4;
}

.gmail-card {
  border-color: #ea4335;
}

.card-header {
  margin-bottom: 15px;
  text-align: center;
}

.card-header h2 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.card-header p {
  color: #666;
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: border-color 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.info {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #ddd;
}

.info p {
  color: #666;
  font-size: 0.8rem;
  margin-bottom: 3px;
}

.note {
  background: #fff3cd;
  padding: 8px;
  border-radius: 6px;
  margin-top: 8px;
  border: 1px solid #ffeaa7;
  font-size: 0.8rem;
}

/* Instructions */
.instructions {
  background: #f8f9fa;
  padding: 30px;
  border-radius: 12px;
  margin-top: 40px;
}

.instructions h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: #333;
}

.instruction-box {
  background: white;
  padding: 25px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.instruction-box h4 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: #555;
}

.instruction-box ol {
  margin-left: 20px;
  margin-bottom: 20px;
}

.instruction-box li {
  margin-bottom: 10px;
  line-height: 1.6;
}

.instruction-box code {
  background: #f8f9fa;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  color: #e83e8c;
}

.instruction-box a {
  color: #667eea;
  text-decoration: none;
}

.instruction-box a:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  margin-top: 30px;
  padding-top: 12px;
  border-top: 1px solid #e0e0e0;
  text-align: center;
  color: #666;
  font-size: 0.85rem;
}

footer a {
  color: #667eea;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Bootstrap Icons */
.bi {
  vertical-align: middle;
}

header .bi {
  font-size: 1.2em;
}

.btn .bi {
  margin-right: 4px;
}

.info .bi-check-circle-fill {
  color: #28a745;
  margin-right: 6px;
}

.bi-exclamation-triangle-fill {
  color: #ffc107;
  margin-right: 6px;
}

.empty-state .bi {
  font-size: 1.2em;
  color: #999;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background-color: white;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  padding: 15px 20px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #333;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #666;
  line-height: 1;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.3s;
}

.modal-close:hover {
  background: #f0f0f0;
}

.modal-body {
  padding: 20px;
}

.modal-body p {
  margin: 0 0 10px 0;
  color: #666;
  font-size: 0.95rem;
}

.delete-email {
  font-weight: 600;
  color: #333;
  background: #f8f9fa;
  padding: 8px 12px;
  border-radius: 6px;
  margin-top: 10px;
  font-size: 0.9rem;
}

.modal-footer {
  padding: 15px 20px;
  border-top: 1px solid #e0e0e0;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.modal-footer .btn {
  min-width: 80px;
}

.modal-large {
  max-width: 1000px;
}

.modal-large .modal-body {
  max-height: 65vh;
  overflow-y: auto;
}

.help-content h4 {
  font-size: 1.1rem;
  color: #667eea;
  margin-top: 20px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.help-content h4:first-of-type {
  margin-top: 15px;
}

.help-content p {
  line-height: 1.6;
  margin-bottom: 15px;
  color: #555;
}

.help-content ol,
.help-content ul {
  margin-left: 20px;
  margin-bottom: 15px;
}

.help-content li {
  margin-bottom: 10px;
  color: #555;
  line-height: 1.5;
}

.help-content .category-list li {
  margin-bottom: 8px;
}

.help-content strong {
  color: #333;
}

.help-content .bi {
  color: #667eea;
  margin-right: 6px;
}

.help-content .schedule-info {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 12px 15px;
  margin-top: 20px;
  border-left: 4px solid #667eea;
}

.help-content .schedule-info p {
  margin-bottom: 8px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.help-content .schedule-info p:last-child {
  margin-bottom: 0;
}

.help-content .schedule-info .bi {
  color: #667eea;
  font-size: 1.1em;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .api-key-form {
    grid-template-columns: 1fr;
  }

  .api-key-actions {
    justify-content: flex-start;
  }
  
  header h1 {
    font-size: 1.5rem;
  }
  
  .login-options {
    grid-template-columns: 1fr;
  }
  
  .account-card {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .account-col-actions {
    align-items: flex-start;
  }
  
  .action-buttons {
    justify-content: flex-start;
  }
}

/* Webhook Controls */
.webhook-fieldset {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px 12px;
  margin: 0;
  width: 400px;
  max-width: 100%;
  box-sizing: border-box;
}

.webhook-legend {
  font-size: 0.8rem;
  font-weight: 600;
  color: #667eea;
  padding: 0 6px;
  margin: 0;
}

.webhook-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  width: 100%;
}

.webhook-url-display {
  font-size: 0.85rem;
  color: #666;
  background-color: #f5f5f5;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #ddd;
  flex: 1;
  min-width: 0;
  width: 100%;
  cursor: pointer;
}

.webhook-url-display:focus {
  outline: none;
  border-color: #667eea;
}

.webhook-url-display.webhook-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.webhook-url-display.webhook-failed {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  margin: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #667eea;
}

input:focus + .slider {
  box-shadow: 0 0 1px #667eea;
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.form-control {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: border-color 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Icon-only buttons */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 6px;
  border: none;
  background-color: #f0f0f0;
  color: #333;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
}

.btn-icon:hover {
  background-color: #e0e0e0;
  transform: translateY(-1px);
}

.btn-icon.btn-danger {
  background-color: #fee;
  color: #c33;
}

.btn-icon.btn-danger:hover {
  background-color: #fdd;
  color: #a22;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
}

.toast {
  background: white;
  border-radius: 8px;
  padding: 16px 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: slideIn 0.3s ease-out;
  min-width: 300px;
  border-left: 4px solid #667eea;
}

.toast.toast-success {
  border-left-color: #4caf50;
}

.toast.toast-error {
  border-left-color: #f44336;
}

.toast.toast-warning {
  border-left-color: #ff9800;
}

.toast.toast-info {
  border-left-color: #2196f3;
}

.toast-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.toast-success .toast-icon {
  color: #4caf50;
}

.toast-error .toast-icon {
  color: #f44336;
}

.toast-warning .toast-icon {
  color: #ff9800;
}

.toast-info .toast-icon {
  color: #2196f3;
}

.toast-content {
  flex: 1;
  font-size: 14px;
  color: #333;
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  color: #999;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.2s;
}

.toast-close:hover {
  color: #666;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

.toast.toast-hiding {
  animation: slideOut 0.3s ease-out forwards;
}
