/* Qsyslab Tools Theme CSS */
/* Consistent design system across all pages */

/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Root variables matching reference design */
:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --panel-2: #f7f9fc;
  --muted: #5b6472;
  --text: #0b1220;
  --primary: #2d7ef7;
  --success: #11a05d;
  --red: #e54848;
  --indigo: #4f6cf6;
  --blue: #0d66d0;
  --border: rgba(0,0,0,0.08);
  --shadow: 0 8px 30px rgba(16,24,40,0.08);
  --radius: 12px;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

[data-theme='dark'] {
  --bg: #0b0f14;
  --panel: #131a22;
  --panel-2: #161e28;
  --muted: #7f8a99;
  --text: #e6edf3;
  --primary: #0d66d0;
  --success: #1db954;
  --red: #ff6b6b;
  --indigo: #5b7cfa;
  --blue: #0d66d0;
  --border: rgba(255,255,255,0.08);
  --shadow: 0 4px 24px rgba(0,0,0,0.35);
}

/* Override DaisyUI with our theme colors */
[data-theme='pastel'] {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --panel-2: #f7f9fc;
  --muted: #5b6472;
  --text: #0b1220;
  --primary: #2d7ef7;
  --success: #11a05d;
  --red: #e54848;
  --indigo: #4f6cf6;
  --blue: #0d66d0;
  --border: rgba(0,0,0,0.08);
  --shadow: 0 8px 30px rgba(16,24,40,0.08);
}

/* Global font and smoothing */
html, body {
  font-family: var(--font-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Remix Icons weight adjustment */
[class^="ri-"], [class*=" ri-"] {
  font-weight: 100;
}

/* Beautiful backgrounds */
body {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 40%, color-mix(in srgb, var(--bg) 95%, black) 100%);
  background-attachment: fixed;
  color: var(--text);
}

[data-theme='pastel'] body,
[data-theme='light'] body {
  background: linear-gradient(180deg, #f6f8fb 0%, #f6f8fb 40%, #eef2f7 100%) !important;
}

[data-theme='dark'] body {
  background: linear-gradient(180deg, #0b0f14 0%, #0b0f14 40%, #0d131a 100%) !important;
}

/* Glass morphism effects */
.glass {
  backdrop-filter: saturate(140%) blur(10px);
  background: rgba(255,255,255,.75);
}

[data-theme='dark'] .glass {
  background: rgba(10,14,20,.7);
}

/* Card hover effects */
.card {
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
}

/* Button improvements */
.btn {
  font-weight: 500;
  transition: all 0.2s ease;
}

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

.btn-primary {
  background: linear-gradient(180deg, #2f81f7, #2a6fe0);
  border: 1px solid rgba(255,255,255,0.12);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(180deg, #3489ff, #2f74e8);
  box-shadow: 0 4px 12px rgba(45,126,247,0.3);
}

/* Icon buttons */
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* Status chips */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--border);
  background: rgba(45,126,247,0.06);
}

.status-chip.success {
  background: #a7f3c7;
  color: #30513e;
}

[data-theme='dark'] .status-chip.success {
  background: rgba(29,185,84,0.15);
  color: #1db954;
}

/* Badges */
.badge {
  font-weight: 600;
  font-size: 11px;
  padding: 4px 8px;
}

/* Input fields */
input.input,
textarea.textarea,
select.select {
  transition: all 0.25s ease;
}

input.input:hover,
textarea.textarea:hover,
select.select:hover,
input.input:focus,
textarea.textarea:focus,
select.select:focus {
  border-color: rgba(74,102,255,.6);
  box-shadow: 0 0 0 3px rgba(27,127,245,.1);
}

/* Navbar improvements */
.navbar {
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}

[data-theme='dark'] .navbar {
  background: rgba(10,14,20,0.7);
}

[data-theme='pastel'] .navbar,
[data-theme='light'] .navbar {
  background: rgba(255,255,255,0.75);
}

/* Sidebar styles */
.sidebar {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  overflow-y: auto;
}

.sidebar-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

[data-theme='pastel'] .sidebar-card,
[data-theme='light'] .sidebar-card {
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* List items */
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  background: linear-gradient(180deg,#151c27,#111823);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.25s ease;
}

[data-theme='pastel'] .list-item,
[data-theme='light'] .list-item {
  background: #ffffff;
  border-color: rgba(0,0,0,0.07);
}

.list-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

/* Chat bubbles */
.msg .bubble {
  max-width: 680px;
  padding: 12px 14px;
  border-radius: 14px;
  line-height: 1.6;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.msg .bubble:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.02);
}

/* Typing indicator */
@keyframes typing-bounce {
  0%,80%,100% {
    transform: translateY(0);
    opacity: .6;
  }
  40% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.typing .dot {
  animation: typing-bounce 1s infinite ease-in-out;
}

.typing .dot:nth-child(1) { animation-delay: 0s; }
.typing .dot:nth-child(2) { animation-delay: .2s; }
.typing .dot:nth-child(3) { animation-delay: .4s; }

/* Responsive utilities */
@media (max-width: 979px) {
  .only-desktop {
    display: none !important;
  }
}

@media (min-width: 980px) {
  .only-mobile {
    display: none !important;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--panel);
}

::-webkit-scrollbar-thumb {
  background: var(--muted);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text);
}

/* File upload area */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  transition: all 0.25s ease;
  cursor: pointer;
}

.upload-area:hover {
  border-color: var(--primary);
  background: rgba(45,126,247,0.05);
}

.upload-area.dragging {
  border-color: var(--primary);
  background: rgba(45,126,247,0.1);
}

/* Improved focus states */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Selection color */
::selection {
  background: var(--primary);
  color: white;
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
}