:root {
  --bg-color: #0d0e12;
  --card-bg: rgba(20, 22, 30, 0.6);
  --card-border: rgba(255, 255, 255, 0.08);
  --primary-color: #6366f1;
  --primary-hover: #4f46e5;
  --accent-color: #10b981;
  --accent-hover: #059669;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --glow-1-color: rgba(99, 102, 241, 0.15);
  --glow-2-color: rgba(16, 185, 129, 0.1);
  --font-family: 'Outfit', sans-serif;
  --shadow-main: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  padding: 16px;
  position: relative;
}

/* Background Animated Glows */
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
}

.glow-1 {
  width: 400px;
  height: 400px;
  background: var(--glow-1-color);
  top: -10%;
  left: -10%;
  animation: float-slow 20s infinite alternate;
}

.glow-2 {
  width: 500px;
  height: 500px;
  background: var(--glow-2-color);
  bottom: -10%;
  right: -10%;
  animation: float-slow 25s infinite alternate-reverse;
}

@keyframes float-slow {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 60px) scale(1.1); }
  100% { transform: translate(-20px, -40px) scale(0.9); }
}

/* Card Containers */
.card-container {
  width: 100%;
  max-width: 440px;
  z-index: 10;
  display: flex;
  justify-content: center;
}

.hidden {
  display: none !important;
}

/* Glassmorphism Card styling */
.glass-card {
  width: 100%;
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow-main);
  transition: border-color var(--transition-normal);
}

.glass-card:hover {
  border-color: rgba(99, 102, 241, 0.2);
}

/* Authentication Page CSS */
.auth-card {
  text-align: center;
}

.brand {
  margin-bottom: 28px;
}

.brand-icon {
  font-size: 3rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 8px rgba(99, 102, 241, 0.3));
}

.brand h1 {
  font-weight: 800;
  font-size: 1.8rem;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  background: linear-gradient(to right, #ffffff, #d1d5db);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 300;
}

.input-group {
  position: relative;
  margin-bottom: 16px;
}

.input-group i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.input-group input {
  width: 100%;
  padding: 14px 16px 14px 46px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 0.95rem;
  outline: none;
  transition: all var(--transition-fast);
}

.input-group input:focus {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.input-group input:focus + i {
  color: var(--primary-color);
}

.auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

/* Button styles */
.btn {
  width: 100%;
  padding: 12px 20px;
  border-radius: 12px;
  border: none;
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: white;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
  color: white;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.85rem;
  width: auto;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: var(--text-main);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.text-danger {
  color: var(--danger-color) !important;
}

.text-danger:hover {
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: rgba(239, 68, 68, 0.2) !important;
}

.status-msg {
  font-size: 0.85rem;
  margin-top: 14px;
  min-height: 18px;
}

/* App Dashboard styling */
.app-card {
  padding: 20px 24px;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.avatar {
  font-size: 2.2rem;
  color: var(--primary-color);
  opacity: 0.9;
}

.user-info h2 {
  font-size: 1.1rem;
  font-weight: 600;
}

.badge {
  font-size: 0.75rem;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  display: inline-block;
  margin-top: 2px;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.header-actions .active-pin {
  color: var(--accent-color);
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.2);
}

/* Connection status bar */
.connection-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

.status-dot.connected {
  background-color: var(--accent-color);
  box-shadow: 0 0 8px var(--accent-color);
}

.status-dot.disconnected {
  background-color: var(--danger-color);
  box-shadow: 0 0 8px var(--danger-color);
}

.sync-controls {
  padding: 8px 0 16px;
}

/* Switch styling */
.switch-container {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.switch-container input {
  display: none;
}

.switch-slider {
  width: 38px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  position: relative;
  transition: background var(--transition-fast);
}

.switch-slider::before {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  position: absolute;
  left: 3px;
  top: 3px;
  transition: transform var(--transition-fast);
}

.switch-container input:checked + .switch-slider {
  background: var(--primary-color);
}

.switch-container input:checked + .switch-slider::before {
  transform: translateX(18px);
}

/* Sections */
h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
}

.clipboard-box, .file-sharing, .history-section {
  margin-bottom: 20px;
}

/* Active area box */
.active-area {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 12px;
  transition: border-color var(--transition-fast);
}

.active-area:focus-within {
  border-color: rgba(99, 102, 241, 0.3);
}

#active-text {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 0.95rem;
  resize: vertical;
}

.active-image-preview {
  position: relative;
  margin-top: 8px;
  border-radius: 8px;
  overflow: hidden;
  max-height: 160px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
}

#active-image {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.btn-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.btn-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.active-actions {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

/* Alert styles */
.alert {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.alert.warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}

/* File upload dropzone */
.upload-dropzone {
  border: 1px dashed rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--primary-color);
  background: rgba(99, 102, 241, 0.04);
}

.upload-icon {
  font-size: 1.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  transition: transform var(--transition-fast);
}

.upload-dropzone:hover .upload-icon {
  transform: translateY(-2px);
  color: var(--primary-color);
}

.upload-dropzone p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.browse-link {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: underline;
}

/* Progress bar */
.progress-bar-container {
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  height: 20px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  width: 0%;
  transition: width var(--transition-fast);
}

#progress-text {
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 2;
  color: white;
}

/* History List styles */
.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.history-list {
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.history-list::-webkit-scrollbar {
  width: 4px;
}

.history-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.empty-state {
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 1.5rem;
  margin-bottom: 8px;
  opacity: 0.5;
}

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

/* History Card */
.history-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 12px;
  position: relative;
  transition: all var(--transition-fast);
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.history-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.history-device {
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
}

.history-content {
  font-size: 0.9rem;
  line-height: 1.4;
  word-break: break-all;
  white-space: pre-wrap;
  color: #e5e7eb;
}

.history-image-preview {
  margin-top: 6px;
  max-height: 120px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: flex-start;
}

.history-image-preview img {
  max-height: 120px;
  max-width: 100%;
  object-fit: contain;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.15);
  padding: 8px;
  border-radius: 8px;
}

.file-info i {
  font-size: 1.4rem;
  color: var(--primary-color);
}

.file-details {
  display: flex;
  flex-direction: column;
}

.file-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-main);
}

.file-size {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.history-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(20, 22, 30, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--accent-color);
  padding: 12px 24px;
  border-radius: 50px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1000;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast i {
  color: var(--accent-color);
  font-size: 1.1rem;
}

.toast.error {
  border-color: var(--danger-color);
}

.toast.error i {
  color: var(--danger-color);
}

.toast.warning {
  border-color: var(--warning-color);
}

.toast.warning i {
  color: var(--warning-color);
}

/* Tabs Navigation */
.tabs-nav {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 20px;
  gap: 4px;
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  font-family: var(--font-family);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  color: white;
  background: var(--primary-color);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.tab-panel {
  display: block;
}

/* Kanban Board Layout */
.todo-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.task-form-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
}

.task-form-card h4 {
  font-size: 0.95rem;
  margin-bottom: 12px;
  font-weight: 600;
}

.input-group-sm {
  margin-bottom: 10px;
}

.input-group-sm input, .input-group-sm textarea, .input-group-sm select {
  width: 100%;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 0.85rem;
  outline: none;
  transition: border var(--transition-fast);
}

.input-group-sm input:focus, .input-group-sm textarea:focus, .input-group-sm select:focus {
  border-color: var(--primary-color);
}

.form-actions-row {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}

.kanban-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.kanban-board::-webkit-scrollbar {
  width: 4px;
}

.kanban-board::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.kanban-column {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  padding: 12px;
}

.column-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.column-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-queue { background-color: var(--text-muted); }
.dot-progress { background-color: var(--primary-color); }
.dot-done { background-color: var(--warning-color); }
.dot-sent { background-color: var(--accent-color); }
.dot-archive { background-color: #4b5563; }

.column-header h5 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.column-count {
  margin-left: auto;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 6px;
  border-radius: 10px;
  color: var(--text-muted);
}

.column-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 50px;
}

/* Kanban Cards */
.task-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 12px;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.task-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.task-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.task-card-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
}

.task-card-actions {
  display: flex;
  gap: 4px;
}

.task-card-actions button {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.task-card-actions button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.task-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.3;
}

.task-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.task-card-key {
  font-weight: 600;
  background: rgba(99, 102, 241, 0.1);
  color: #a5b4fc;
  padding: 1px 6px;
  border-radius: 4px;
}

.task-card-date {
  font-size: 0.7rem;
}

.task-card-whatsapp {
  margin-top: 8px;
  width: 100%;
}

.badge-alert-done {
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
  0% { border-color: rgba(245, 158, 11, 0.3); }
  50% { border-color: rgba(245, 158, 11, 0.9); }
  100% { border-color: rgba(245, 158, 11, 0.3); }
}

/* Settings Styles */
.settings-section h3 {
  margin-top: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 6px;
}

.settings-group {
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.settings-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.settings-group input {
  padding: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 0.9rem;
  outline: none;
}

.settings-group input:focus {
  border-color: var(--primary-color);
}

.field-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

