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

:root {
  --bg-color: #0f172a;
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --sidebar-bg: rgba(15, 23, 42, 0.85);
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  background-image: radial-gradient(circle at top right, #1e3a8a, transparent 40%),
                    radial-gradient(circle at bottom left, #0f172a, transparent 40%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-container {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

h1 {
  margin-top: 0;
  font-weight: 600;
  font-size: 24px;
  text-align: center;
  margin-bottom: 8px;
}

p.subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 30px;
}

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

label {
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-weight: 500;
}

input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
  box-sizing: border-box;
}

input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

button {
  width: 100%;
  padding: 12px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

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

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

button:hover {
  background: var(--primary-hover);
}

button:active {
  transform: scale(0.98);
}

.footer-link {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-muted);
}

.footer-link a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.footer-link a:hover {
  text-decoration: underline;
}

.error-msg {
  color: #ef4444;
  font-size: 13px;
  margin-bottom: 15px;
  text-align: center;
}

/* Dashboard Layout Overrides */
body.dashboard-body {
  align-items: stretch;
  justify-content: flex-start;
  overflow: hidden;
}

.app-layout {
  display: flex;
  width: 100vw;
  height: 100vh;
}

.sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  padding: 20px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.sidebar-header {
  margin-bottom: 30px;
}

.logo {
  font-size: 18px;
  font-weight: bold;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  color: var(--text-main);
}

.upgrade-box {
  background: #f59e0b;
  border-radius: 6px;
  padding: 12px;
  cursor: pointer;
}

.upgrade-box p {
  color: white;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 6px;
  transition: all 0.2s;
}

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

.nav-item.active {
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary-color);
  font-weight: 500;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.main-content {
  flex: 1;
  padding: 40px;
  overflow-y: auto;
}

.dashboard-container {
  max-width: 1000px;
  margin: 0 auto;
}

/* Unipile Specific Styles */
.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.header-row h1 {
  font-size: 24px;
  margin: 0;
  text-align: left;
}

.header-row p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 4px 0 0 0;
}

.status-indicators {
  display: flex;
  gap: 16px;
  margin-bottom: 30px;
  font-size: 12px;
  color: var(--text-muted);
}

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

.status-dot.green { background: #10b981; }
.status-dot.blue { background: #3b82f6; }
.status-dot.orange { background: #f59e0b; }
.status-dot.red { background: #ef4444; }

.empty-state-box {
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 40px;
  background: rgba(15, 23, 42, 0.3);
}

.empty-state-content {
  background: var(--glass-bg);
  padding: 24px;
  border-radius: 8px;
  max-width: 500px;
  margin: 0;
  border: 1px solid var(--glass-border);
}

.empty-state-content h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.empty-state-content p {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0 0 20px 0;
  line-height: 1.5;
}

.btn-group {
  display: flex;
  gap: 10px;
}

.btn-group button {
  width: auto;
  padding: 8px 16px;
  font-size: 13px;
}

/* Connect Modal Styles */
.connect-card {
  width: 440px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.connect-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 15px;
}

.connect-body {
  padding: 30px;
}

.connect-body h2 {
  text-align: center;
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 20px 0;
}

.toggle-switch {
  display: flex;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  padding: 4px;
  margin: 0 auto 30px auto;
  width: fit-content;
}

.toggle-btn {
  padding: 8px 24px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: transparent;
  width: auto;
  font-weight: 500;
}

.toggle-btn.active {
  background: rgba(255,255,255,0.1);
  color: var(--text-main);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.connect-footer {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn-dark {
  background: #1e293b;
  color: white;
}
.btn-dark:hover {
  background: #334155;
}

.optional-settings-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  margin-top: 20px;
  margin-bottom: 16px;
}

.settings-box {
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  padding: 16px;
  position: relative;
  margin-bottom: 20px;
}

.settings-box-label {
  position: absolute;
  top: -9px;
  left: 12px;
  background: var(--bg-color);
  padding: 0 6px;
  font-size: 11px;
  color: var(--text-muted);
}

/* Modal for How to Find Cookies */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 30px;
  width: 90%;
  max-width: 500px;
  color: var(--text-main);
}
.modal-content h3 { margin-top: 0; }
.modal-content ol { padding-left: 20px; margin-bottom: 20px; }
.modal-content li { margin-bottom: 10px; font-size: 14px; line-height: 1.5; }
