* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #0a0e1a;
  color: #e0e0e0;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
.header {
  text-align: center;
  padding: 40px 0;
  border-bottom: 1px solid #1a1f2e;
}

.header h1 {
  font-size: 2.5rem;
  color: #4ade80;
  margin-bottom: 8px;
}

.subtitle {
  color: #888;
  font-size: 1rem;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  margin: 30px 0;
  border-bottom: 2px solid #1a1f2e;
}

.tab {
  background: transparent;
  border: none;
  color: #888;
  padding: 12px 24px;
  font-size: 1rem;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.3s;
}

.tab:hover {
  color: #e0e0e0;
}

.tab.active {
  color: #4ade80;
  border-bottom-color: #4ade80;
}

/* Sections */
.section {
  display: none;
}

.section.active {
  display: block;
}

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

.section-header h2 {
  font-size: 1.8rem;
  color: #fff;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: #4ade80;
  color: #000;
}

.btn-primary:hover {
  background: #3bc96d;
}

.btn-secondary {
  background: #2a2a2a;
  color: #fff;
  border: 1px solid #3a3a3a;
}

.btn-secondary:hover {
  background: #333;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
}

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

.btn-small {
  padding: 6px 12px;
  font-size: 0.85rem;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: #141824;
  border-radius: 8px;
  border: 1px solid #1a1f2e;
}

.filter-label {
  color: #888;
  font-size: 0.9rem;
  font-weight: 500;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.filter-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.filter-badge-microsoft {
  background: #1a1f2e;
  color: #666;
}

.filter-badge-cms {
  background: #1a1f2e;
  color: #666;
}

.filter-checkbox input[type="checkbox"]:checked + .filter-badge-microsoft {
  background: #0078d420;
  color: #0078d4;
  border-color: #0078d440;
}

.filter-checkbox input[type="checkbox"]:checked + .filter-badge-cms {
  background: #4ade8020;
  color: #4ade80;
  border-color: #4ade8040;
}

.filter-checkbox:hover .filter-badge {
  border-color: #3a3a3a;
}

/* Badge for CMS meetings */
.badge-cms {
  background: #4ade8020;
  color: #4ade80;
  border: 1px solid #4ade8040;
}

.badge-recurring {
  background: #a855f720;
  color: #a855f7;
  border: 1px solid #a855f740;
}

.cms-meeting {
  border-left: 3px solid #4ade80;
}

/* Items List */
.items-list {
  display: grid;
  gap: 16px;
}

.item-card {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s;
  cursor: pointer;
}

.item-card:hover {
  border-color: #3a3a3a;
  transform: translateY(-2px);
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 12px;
}

.item-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.item-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: #888;
}

.item-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.item-description {
  color: #ccc;
  margin-bottom: 12px;
  line-height: 1.5;
}

.item-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tag {
  padding: 4px 12px;
  background: #2a2a2a;
  border-radius: 16px;
  font-size: 0.85rem;
  color: #4ade80;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 8px;
  vertical-align: middle;
}

.badge-microsoft {
  background: #0078d420;
  color: #0078d4;
  border: 1px solid #0078d440;
}

.microsoft-synced {
  border-left: 3px solid #0078d4;
}

.text-muted {
  color: #888;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 500;
}

.status-pending {
  background: #fbbf2420;
  color: #fbbf24;
}

.status-approved {
  background: #4ade8020;
  color: #4ade80;
}

.status-rejected {
  background: #ef444420;
  color: #ef4444;
}

.status-unread {
  background: #3b82f620;
  color: #3b82f6;
}

.status-read {
  background: #2a2a2a;
  color: #888;
}

.item-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  overflow-y: auto;
  padding: 20px;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #2a2a2a;
}

.modal-header h3 {
  font-size: 1.5rem;
  color: #fff;
}

.close {
  background: none;
  border: none;
  font-size: 2rem;
  color: #888;
  cursor: pointer;
  line-height: 1;
}

.close:hover {
  color: #fff;
}

/* Forms */
form {
  padding: 20px;
}

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

.form-row {
  display: flex;
  gap: 16px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.recurring-settings {
  background: #1a1f2e;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #2a2f3e;
}

.help-text {
  color: #888;
  font-size: 0.85rem;
  margin-top: 5px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #ccc;
  font-size: 0.9rem;
  font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
textarea {
  width: 100%;
  padding: 10px 12px;
  background: #0a0e1a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
}

select {
  width: 100%;
  padding: 10px 40px 10px 12px;
  background-color: #0a0e1a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  /* Custom dropdown arrow */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
}

/* Style the dropdown options */
select option {
  background-color: #1a1a1a;
  color: #fff;
  padding: 10px;
}

select option:hover,
select option:focus,
select option:checked {
  background-color: #2a2a2a;
  color: #4ade80;
}

select:hover {
  border-color: #3a3a3a;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #4ade80;
}

select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234ade80' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

textarea {
  resize: vertical;
}

input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid #2a2a2a;
}

/* Loading & Empty States */
.loading {
  text-align: center;
  padding: 40px;
  color: #888;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #888;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 12px;
  }

  .header h1 {
    font-size: 2rem;
  }

  .tabs {
    overflow-x: auto;
  }

  .tab {
    white-space: nowrap;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .form-row {
    flex-direction: column;
  }

  .item-actions {
    flex-direction: column;
  }
}

/* Settings Section */
.settings-container {
  background: #141824;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid #1a1f2e;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid #1a1f2e;
}

.setting-item:last-child {
  border-bottom: none;
}

.setting-info h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.setting-info p {
  color: #888;
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 600px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
  flex-shrink: 0;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #2a2f3e;
  transition: 0.3s;
  border-radius: 34px;
  border: 2px solid #1a1f2e;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 24px;
  width: 24px;
  left: 3px;
  bottom: 3px;
  background-color: #666;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #4ade80;
  border-color: #4ade80;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(26px);
  background-color: #fff;
}

.toggle-switch input:focus + .toggle-slider {
  box-shadow: 0 0 1px #4ade80;
}

.settings-status {
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  display: none;
}

.settings-status.success {
  display: block;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: #4ade80;
}

.settings-status.error {
  display: block;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* Settings Groups */
.settings-group {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #2a2f3e;
}

.settings-group:last-of-type {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.settings-group-title {
  font-size: 1rem;
  color: #4ade80;
  margin-bottom: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Settings Select Dropdown */
.settings-select {
  min-width: 200px;
  width: auto;
  font-size: 0.95rem;
  transition: all 0.2s;
  /* Ensure text is visible */
  color: #fff !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-select:focus {
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.1);
}

/* Ensure select options are styled properly */
.settings-select option {
  background-color: #1a1a1a;
  color: #fff;
  padding: 12px;
}

/* Voice Descriptions */
.voice-descriptions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.voice-tag {
  display: inline-block;
  padding: 4px 10px;
  background: #1a1f2e;
  border-radius: 16px;
  font-size: 0.75rem;
  color: #888;
  transition: all 0.2s;
}

.voice-tag.active {
  background: #4ade8020;
  color: #4ade80;
  border: 1px solid #4ade8040;
}

/* Responsive adjustments for settings */
@media (max-width: 768px) {
  .setting-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .settings-select {
    width: 100%;
  }

  .voice-descriptions {
    margin-bottom: 8px;
  }
}

