: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;
    --success-color: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
}

/* Glassmorphism Utilities */
.glass-card, .glass-sidebar {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-container {
    width: 100%;
    max-width: 440px;
    padding: 20px;
}

.login-card {
    padding: 40px;
    border-radius: 24px;
    text-align: center;
    animation: fadeUp 0.6s ease-out forwards;
}

.logo-container {
    margin-bottom: 24px;
}

.logo-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.logo-container h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.login-card h2 {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 32px;
}

.auth-features {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 32px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.feature i {
    color: var(--success-color);
    font-size: 16px;
}

.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.terms {
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    height: 100vh;
}

.glass-sidebar {
    width: 280px;
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 32px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon-small {
    font-size: 24px;
    color: var(--primary-color);
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 600;
}

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

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

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

.nav-item i {
    font-size: 20px;
}

.sidebar-footer {
    padding: 24px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
}

.user-role {
    font-size: 12px;
    color: var(--text-muted);
}

.btn-logout {
    color: var(--text-muted);
    transition: color 0.2s;
}

.btn-logout:hover {
    color: #ef4444;
}

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

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 48px;
}

.top-nav h1 {
    font-size: 28px;
    font-weight: 700;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.skill-card {
    padding: 24px;
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.skill-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
}

.skill-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.skill-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 24px;
}

.btn-secondary {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

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

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

/* Workspace Layout */
.workspace-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.btn-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--text-muted);
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

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

.workspace-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    height: calc(100vh - 180px);
}

.input-panel, .results-panel {
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-radius: 20px;
}

.input-panel h3, .results-panel h3 {
    margin-bottom: 16px;
    font-size: 18px;
}

.results-panel h4 {
    margin-top: 20px;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--primary-color);
}

textarea#clinical-notes {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    color: var(--text-main);
    resize: none;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.6;
}

textarea#clinical-notes:focus {
    outline: none;
    border-color: var(--primary-color);
}

.code-block {
    background: rgba(0, 0, 0, 0.3);
    padding: 16px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 13px;
    white-space: pre-wrap;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Quill Customizations for Dark Mode */
.ql-toolbar.ql-snow {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
    border-bottom: none !important;
    border-radius: 8px 8px 0 0;
}
.ql-container.ql-snow {
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
    color: var(--text-main);
}
.ql-snow .ql-stroke {
    stroke: var(--text-main) !important;
}
.ql-snow .ql-fill {
    fill: var(--text-main) !important;
}
.ql-snow .ql-picker {
    color: var(--text-main) !important;
}

#results-content {
    overflow-y: auto;
    flex: 1;
}

/* Switch styling */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-muted);
  transition: .4s;
  border-radius: 50%;
}

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

input:checked + .slider:before {
  transform: translateX(20px);
  background-color: white;
}

/* Highlight styling */
.pii-highlight {
    background-color: rgba(234, 179, 8, 0.2);
    color: #fef08a;
    border-radius: 4px;
    padding: 2px 4px;
    position: relative;
    cursor: help;
    transition: background-color 0.2s;
    display: inline-block;
}

.pii-highlight:hover {
    background-color: rgba(234, 179, 8, 0.4);
}

.pii-highlight:hover::after {
    content: attr(data-label);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    margin-bottom: 4px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 10;
}
