/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background-color: #0f172a; /* slate-900 */
    color: #e2e8f0; /* slate-200 */
    min-height: 100vh;
    line-height: 1.6;
}

/* Navigation */
.nav {
    background-color: rgba(15, 23, 42, 0.8); /* slate-900/80 */
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #334155; /* slate-700 */
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: bold;
    background: linear-gradient(to right, #22d3ee, #14b8a6); /* cyan-400 to teal-500 */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border: none;
    background-color: transparent;
    cursor: pointer;
    transition: opacity 0.2s;
}

.nav-logo:hover {
    opacity: 0.8;
}

.nav-menu-container {
    position: relative;
}

.nav-menu-toggle {
    display: block;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.5rem;
    transition: color 0.2s;
}

.nav-menu-toggle:hover {
    color: #e2e8f0;
}

.nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    align-items: stretch;
    min-width: 200px;
    padding: 0.5rem;
    margin-top: 0.5rem;
    z-index: 100;
}

.nav-menu.open {
    display: flex;
}

.nav-link {
    background: none;
    border: none;
    color: #94a3b8; /* slate-400 */
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
    font-size: 0.875rem;
    white-space: nowrap;
}

.nav-link:hover {
    color: #e2e8f0; /* slate-200 */
}

.nav-link.active {
    color: #22d3ee; /* cyan-400 */
    font-weight: 500;
}

/* Navigation link styles for dropdown */
.nav-link {
    width: 100%;
    text-align: left;
    padding: 0.75rem;
    border-radius: 0.375rem;
}

.nav-link:hover {
    background-color: rgba(34, 211, 238, 0.1);
}

/* Mobile Navigation - ensure dropdown works on all screen sizes */
@media (max-width: 768px) {
    .nav-menu {
        min-width: 180px;
    }
}

/* Main Content - Responsive Padding */
.main-content {
    min-height: calc(100vh - 4rem);
    padding: 1rem;
}

@media (min-width: 640px) {
    .main-content {
        padding: 2rem 1rem;
    }
}

.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* Welcome Screen */
.welcome-container {
    min-height: calc(100vh - 4rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.welcome-card {
    width: 100%;
    max-width: 42rem;
    text-align: center;
    background-color: rgba(30, 41, 59, 0.5); /* slate-800/50 */
    border: 1px solid #475569; /* slate-700 */
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(to right, #22d3ee, #14b8a6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.welcome-subtitle {
    color: #cbd5e1; /* slate-300 */
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.warning-banner {
    margin-bottom: 2rem;
    padding: 1rem;
    border-left: 4px solid #eab308; /* yellow-500 */
    background-color: rgba(234, 179, 8, 0.1); /* yellow-900/30 */
    color: #fde047; /* yellow-200 */
    border-radius: 0 0.5rem 0.5rem 0;
    text-align: left;
}

.warning-title {
    font-weight: bold;
    font-size: 1.125rem;
    color: #facc15; /* yellow-400 */
    margin-bottom: 0.5rem;
}

.warning-text {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.warning-text-bold {
    font-weight: 600;
}

.warning-banner-inline {
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background-color: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.5);
    border-radius: 0.5rem;
    color: #fde047;
    font-size: 0.875rem;
}

.tier-warning {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.5);
    border-radius: 0.5rem;
    color: #fde047;
    font-size: 0.875rem;
}

.welcome-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.welcome-actions .btn-primary {
    width: 100%;
    max-width: 20rem;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(to right, #06b6d4, #14b8a6); /* cyan-500 to teal-600 */
    color: white;
    font-weight: bold;
    padding: 0.75rem 2.5rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: linear-gradient(to right, #0891b2, #0d9488); /* cyan-600 to teal-700 */
    transform: scale(1.05);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-large {
    width: 100%;
    padding: 1rem;
    font-size: 1.125rem;
}

.btn-link {
    background: none;
    border: none;
    color: #22d3ee; /* cyan-400 */
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 1rem;
}

.btn-link:hover {
    color: #67e8f9; /* cyan-300 */
}

.btn-secondary {
    background-color: #475569; /* slate-600 */
    color: #e2e8f0; /* slate-200 */
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.btn-secondary:hover {
    background-color: #64748b; /* slate-500 */
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-danger {
    background-color: #dc2626; /* red-600 */
    color: white;
    font-weight: 500; /* medium weight like legacy */
    padding: 0.5rem 1rem; /* smaller padding like legacy px-4 py-2 */
    border: none;
    border-radius: 0.5rem; /* rounded-lg */
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem; /* slightly smaller */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-danger:hover {
    background-color: #b91c1c; /* red-700 */
    transform: scale(1.02);
}

.btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-icon {
    margin-right: 0.5rem;
}

/* Dashboard */
.dashboard-container {
    max-width: 64rem;
    margin: 0 auto;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-title {
    font-size: 2.25rem;
    font-weight: bold;
    color: #f1f5f9; /* slate-100 */
    margin-bottom: 0.5rem;
}

.dashboard-subtitle {
    color: #94a3b8; /* slate-400 */
    margin-top: 0.5rem;
}

.dashboard-section {
    background-color: rgba(30, 41, 59, 0.5);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid #475569;
    margin-bottom: 2rem;
}

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

.dashboard-section-header .section-title {
    margin-bottom: 0;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #22d3ee; /* cyan-400 */
    margin-bottom: 0.75rem;
    margin-top: 0;
}

/* Reduce spacing between form sections on client analysis page */
.client-view-container .form-details {
    margin-bottom: 1rem;
}

.client-view-container .form-details-content {
    margin-top: 0.75rem;
}

.page-title {
    font-size: 1.875rem;
    font-weight: bold;
    color: #e2e8f0;
    margin-bottom: 2rem;
}

/* Forms */
.client-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.form-group {
    display: flex;
    gap: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background-color: #0f172a; /* slate-900 */
    border: 1px solid #475569; /* slate-600 */
    border-radius: 0.375rem;
    color: #e2e8f0;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #22d3ee; /* cyan-500 */
    box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.2);
}

.form-input::placeholder {
    color: #64748b; /* slate-500 */
}

.form-input-small {
    flex-shrink: 0;
    width: auto;
    min-width: 80px;
}

.form-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background-color: #0f172a;
    border: 1px solid #475569;
    border-radius: 0.375rem;
    color: #e2e8f0;
    font-size: 0.875rem;
    resize: vertical;
    font-family: inherit;
    transition: all 0.2s;
}

.form-textarea:focus {
    outline: none;
    border-color: #22d3ee;
    box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.2);
}

.form-textarea::placeholder {
    color: #64748b;
}

select.form-input {
    cursor: pointer;
}

/* Clients List */
.clients-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.client-item {
    width: 100%;
    text-align: left;
    padding: 1rem;
    background-color: #1e293b; /* slate-800 */
    border: 1px solid #475569;
    border-radius: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    cursor: pointer;
}

.client-item:hover {
    border-color: #22d3ee; /* cyan-500 */
}

.client-item-info {
    flex-grow: 1;
}

.client-item-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #f1f5f9; /* slate-100 */
    margin-bottom: 0.25rem;
}

.client-item-meta {
    font-size: 0.875rem;
    color: #94a3b8; /* slate-400 */
}

.client-item-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon-only {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.btn-icon-only:hover {
    background-color: #334155; /* slate-700 */
    color: #22d3ee;
}

.empty-state {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background-color: rgba(30, 41, 59, 0.4);
    border: 2px dashed #475569;
    border-radius: 0.5rem;
}

.empty-state p {
    color: #94a3b8;
}

/* Client View */
.client-view-container {
    max-width: 1280px;
    margin: 0 auto;
}

.client-header {
    margin-bottom: 2rem;
}

.client-view-title {
    font-size: 2.25rem;
    font-weight: bold;
    color: #f1f5f9;
    margin-top: 0.5rem;
}

.client-view-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .client-view-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
}

.client-form-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.client-results-column {
    align-self: start;
}

@media (min-width: 1024px) {
    .client-results-column {
        position: sticky;
        top: 5rem;
    }
}

.form-section {
    background-color: #1e293b;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #475569;
}

/* Collapsible Form Details */
.form-details {
    background-color: #1e293b;
    border: 1px solid #475569;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

/* Further reduce spacing in client view */
.client-view-container .form-details {
    margin-bottom: 1rem;
}

.form-details-summary {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    transition: background-color 0.2s;
    border-radius: 0.75rem 0.75rem 0 0;
}

.form-details-summary:hover {
    background-color: rgba(51, 65, 85, 0.5);
}

.form-details-summary::-webkit-details-marker {
    display: none;
}

.form-details[open] .form-details-summary {
    border-radius: 0.75rem 0.75rem 0 0;
    border-bottom: 1px solid #475569;
}

.form-details-chevron {
    color: #94a3b8;
    font-size: 0.875rem;
    transition: transform 0.2s;
    flex-shrink: 0;
    margin-left: 1rem;
}

.form-details[open] .form-details-chevron {
    transform: rotate(90deg);
}

.form-details-content {
    padding: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #475569;
}

.form-details-help {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.form-details-note {
    font-size: 0.75rem;
    color: #67e8f9;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.form-details-warning {
    font-size: 0.75rem;
    color: #fde047;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.form-other-input {
    margin-top: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #cbd5e1;
    margin-bottom: 0.5rem;
}

.form-label-large {
    display: block;
    font-size: 1.125rem;
    font-weight: 500;
    color: #cbd5e1;
    margin-bottom: 0.5rem;
}

.form-divider {
    position: relative;
    margin: 1rem 0;
    text-align: center;
}

.form-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #475569;
}

.form-divider-text {
    position: relative;
    background-color: #1e293b;
    padding: 0 0.75rem;
    color: #94a3b8;
    font-size: 0.875rem;
}

/* Condition Buttons */
.condition-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.condition-button {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 9999px;
    border: 1px solid;
    cursor: pointer;
    transition: all 0.2s;
    background-color: #475569;
    border-color: #64748b;
    color: #cbd5e1;
}

.condition-button:hover {
    background-color: #64748b;
}

.condition-button.selected {
    background-color: #0891b2;
    border-color: #22d3ee;
    color: white;
}

.condition-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Intake Form Section (now collapsible) */
#details-intake-form.form-details {
    background-color: #1e293b;
    border: 1px solid #475569;
}

.intake-form-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .intake-form-header {
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
    }
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.intake-form-description {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.intake-form-status {
    margin-bottom: 1rem;
}

.intake-form-status-text {
    font-size: 0.875rem;
    font-style: italic;
    color: #fde047;
}

.intake-form-status-text.has-form {
    color: #86efac;
}

.intake-form-existing {
    margin-bottom: 1rem;
}

.intake-form-file-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    background-color: #0f172a;
    border-radius: 0.5rem;
    border: 1px solid #475569;
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .intake-form-file-info {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.intake-form-file-details {
    flex-grow: 1;
}

.intake-form-filename {
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.25rem;
}

.intake-form-uploaded {
    font-size: 0.75rem;
    color: #64748b;
}

.intake-form-actions {
    display: flex;
    gap: 0.5rem;
}

.intake-form-replace {
    margin-top: 1rem;
}

.intake-form-upload {
    margin-top: 1rem;
}

.intake-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #cbd5e1;
    margin-bottom: 0.5rem;
}

.intake-form-loading {
    margin-top: 0.5rem;
}

.intake-form-loading-text {
    font-size: 0.875rem;
    color: #22d3ee;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* EKG Upload Status */
.ekg-upload-status {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.ekg-upload-status-text {
    font-size: 0.875rem;
    font-style: italic;
    color: #fde047; /* yellow-300 */
}

.ekg-upload-status-text.ekg-upload-status-success {
    color: #86efac; /* green-300 */
}

.ekg-upload-status-text.ekg-upload-status-error {
    color: #f87171; /* red-400 */
}

/* EKG Preview */
.ekg-preview {
    margin-top: 1rem;
    padding: 0.5rem;
    background-color: #0f172a;
    border-radius: 0.5rem;
    border: 1px solid #475569;
}

.ekg-preview-img {
    max-height: 15rem;
    width: auto;
    margin: 0 auto;
    display: block;
    border-radius: 0.375rem;
}

.ekg-preview-filename {
    text-align: center;
    padding: 0.5rem;
    font-size: 0.875rem;
    color: #e2e8f0;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Psychosocial Fields */
.form-psychosocial-fields {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-psychosocial-field {
    display: flex;
    flex-direction: column;
}

/* Form Finalize Section */
.form-finalize {
    background-color: #1e293b;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #475569;
    margin-top: 2rem;
}

.form-analysis-name {
    margin-bottom: 1rem;
}

.form-warning-box {
    padding: 0.75rem;
    background-color: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.5);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.form-warning-title {
    font-weight: bold;
    color: #fde047;
    margin-bottom: 0.5rem;
}

.form-warning-text {
    font-size: 0.875rem;
    color: #fde047;
    line-height: 1.6;
}

/* Results */
.results-container {
    background-color: #1e293b;
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
}

.results-placeholder {
    text-align: center;
    padding: 2rem;
    color: #94a3b8;
}

.clients-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.analysis-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(34, 211, 238, 0.2);
    border-top-color: rgb(34, 211, 238);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.loading-text {
    color: rgb(148, 163, 184);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.results-content {
    display: none;
}

.results-content.active {
    display: block;
}

.result-item {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid;
}

.result-item.contraindicated {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: #ef4444; /* red-500 */
    color: #fca5a5; /* red-300 */
}

.result-item.high-risk {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b; /* amber-500 */
    color: #fcd34d; /* amber-300 */
}

.result-item.medium-risk {
    background-color: rgba(251, 191, 36, 0.1);
    border-color: #fbbf24; /* amber-400 */
    color: #fde68a; /* amber-200 */
}

.result-item.low-risk {
    background-color: rgba(34, 197, 94, 0.1);
    border-color: #22c55e; /* green-500 */
    color: #86efac; /* green-300 */
}

.result-substance {
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.result-explanation {
    font-size: 0.875rem;
    line-height: 1.6;
}

/* History */
.history-container {
    padding-top: 2rem;
    border-top: 1px solid #475569;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-item {
    background-color: #1e293b;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.history-item:hover {
    border-color: #22d3ee;
    background-color: #334155;
}

.history-item-title {
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.5rem;
}

.history-item-date {
    font-size: 0.875rem;
    color: #94a3b8;
}

/* Account */
.account-container {
    max-width: 64rem;
    margin: 0 auto;
}

.account-section {
    background-color: #1e293b;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid #475569;
    margin-bottom: 1.5rem;
}

.info-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.info-label {
    color: #94a3b8;
}

.info-value {
    color: #e2e8f0;
}

.subscription-status {
    margin-top: 1rem;
}

/* Pricing */
.pricing-container {
    max-width: 64rem;
    margin: 0 auto;
    text-align: center;
}

.pricing-banner {
    background-color: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.5);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

.pricing-banner-title {
    color: #fde047;
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.pricing-banner-text {
    color: #fde047;
    font-size: 0.875rem;
}

.pricing-plans {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.pricing-plan {
    background-color: #1e293b;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid #475569;
    max-width: 28rem;
    width: 100%;
    position: relative;
}

.pricing-plan.featured {
    border: 2px solid #22d3ee;
    transform: scale(1.05);
}

.plan-badge {
    background-color: #06b6d4;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    display: inline-block;
    margin-bottom: 1rem;
}

.plan-name {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #e2e8f0;
}

.plan-price {
    margin-bottom: 1rem;
}

.price-amount {
    font-size: 2.25rem;
    font-weight: bold;
    color: #e2e8f0;
}

.price-interval {
    color: #94a3b8;
    margin-left: 0.5rem;
}

.plan-features {
    list-style: none;
    text-align: left;
    margin: 1.5rem 0;
    padding: 0;
}

.plan-features li {
    padding: 0.75rem 0;
    color: #cbd5e1;
    display: flex;
    align-items: start;
}

.plan-features li::before {
    content: "✓";
    color: #22c55e; /* green-400 */
    font-weight: bold;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

/* About */
.about-container {
    max-width: 64rem;
    margin: 0 auto;
}

.about-header {
    margin-bottom: 1rem;
}

.about-content {
    background-color: rgba(30, 41, 59, 0.5);
    border: 1px solid #475569;
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.about-section {
    margin-bottom: 2rem;
}

.about-section:last-of-type {
    margin-bottom: 0;
}

.about-text {
    color: #cbd5e1;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.about-warning {
    color: #fde047;
    font-weight: 600;
    margin-top: 0.5rem;
    line-height: 1.7;
}

.about-list {
    list-style: none;
    padding: 0;
    margin: 0;
    color: #cbd5e1;
    line-height: 1.8;
}

.about-list li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

.about-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #22d3ee;
    font-weight: bold;
    font-size: 1.2rem;
}

.about-list-ordered {
    list-style: none;
    counter-reset: about-counter;
}

.about-list-ordered li {
    counter-increment: about-counter;
    padding-left: 2rem;
}

.about-list-ordered li::before {
    content: counter(about-counter) ".";
    position: absolute;
    left: 0;
    color: #22d3ee;
    font-weight: bold;
}

.about-list-nested {
    margin-top: 0.5rem;
    margin-left: 1rem;
}

.about-list-bold {
    font-weight: 600;
    color: #f1f5f9;
}

.about-subsection {
    margin-bottom: 1.5rem;
}

.about-subsection:last-child {
    margin-bottom: 0;
}

.about-subtitle {
    font-size: 1.25rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 0.5rem;
}

.about-info-box {
    padding: 0.75rem;
    background-color: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.5);
    border-radius: 0.5rem;
    color: #67e8f9;
    font-size: 0.875rem;
    margin-top: 1rem;
}

.about-security-box {
    padding: 1rem;
    border-left: 4px solid #22d3ee;
    background-color: rgba(6, 182, 212, 0.1);
    color: #67e8f9;
    border-radius: 0 0.5rem 0.5rem 0;
    margin: 2rem 0;
}

.about-security-title {
    font-weight: bold;
    font-size: 1.125rem;
    color: #22d3ee;
    margin-bottom: 0.5rem;
}

.about-security-text {
    font-size: 0.875rem;
    margin-top: 0.5rem;
    line-height: 1.6;
}

.about-actions {
    text-align: center;
    padding-top: 1rem;
    margin-top: 2rem;
}

.about-version {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #475569;
    text-align: center;
}

.about-version-text {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Auth Screens */
.auth-container {
    min-height: calc(100vh - 4rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    background-color: rgba(30, 41, 59, 0.5);
    border: 1px solid #475569;
    border-radius: 0.75rem;
    padding: 2rem;
    width: 100%;
    max-width: 28rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.auth-title-main {
    font-size: 1.875rem;
    font-weight: bold;
    background: linear-gradient(to right, #22d3ee, #14b8a6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-title {
    font-size: 2rem;
    font-weight: bold;
    color: #e2e8f0;
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-subtitle {
    color: #94a3b8;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #cbd5e1;
}

.form-help {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: -0.25rem;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .form-input {
    padding-right: 3rem;
}

.password-toggle-btn {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.password-toggle-btn:hover {
    color: #e2e8f0;
}

.password-eye-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.auth-links {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.btn-link {
    background: none;
    border: none;
    color: #22d3ee;
    cursor: pointer;
    font-size: 0.875rem;
    text-decoration: underline;
    padding: 0.25rem 0.5rem;
    transition: color 0.2s;
}

.btn-link:hover {
    color: #67e8f9;
}

.error-message {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fca5a5;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.success-message {
    background-color: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #86efac;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.75rem;
    color: #64748b; /* slate-500 */
    margin-top: 2rem;
}

.footer p {
    margin: 0.25rem 0;
}

/* Loading State */
.loading {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #475569;
    border-top-color: #22d3ee;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error Messages */
.error-message {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fca5a5;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.success-message {
    background-color: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #86efac;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    font-size: 0.875rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    z-index: 1001;
    width: 90%;
    max-width: 28rem;
}

.modal-body {
    background-color: #1e293b;
    border: 1px solid #475569;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.modal-icon-success {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    background-color: rgba(34, 197, 94, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon-svg {
    width: 1.5rem;
    height: 1.5rem;
    color: #86efac;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #f1f5f9;
    margin-bottom: 0.5rem;
}

.modal-message {
    color: #94a3b8;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.modal-actions {
    margin-top: 1.5rem;
}

/* Risk Badges */
.risk-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 9999px;
    border: 1px solid;
    flex-shrink: 0;
}

.risk-badge-contraindicated {
    background-color: #991b1b;
    border-color: #dc2626;
    color: #fecaca;
}

.risk-badge-high {
    background-color: #c2410c;
    border-color: #f97316;
    color: #fed7aa;
}

.risk-badge-medium {
    background-color: #a16207;
    border-color: #eab308;
    color: #fef08a;
}

.risk-badge-low {
    background-color: #1e40af;
    border-color: #3b82f6;
    color: #bfdbfe;
}

.risk-badge-supportive {
    background-color: #166534;
    border-color: #22c55e;
    color: #bbf7d0;
}

.risk-badge-unknown {
    background-color: #475569;
    border-color: #64748b;
    color: #cbd5e1;
}

/* History Details (Collapsible) */
.history-details {
    background-color: rgba(30, 41, 59, 0.5);
    border: 1px solid #475569;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.history-summary {
    padding: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    transition: background-color 0.2s;
    border-radius: 0.5rem 0.5rem 0 0;
}

.history-summary:hover {
    background-color: rgba(51, 65, 85, 0.5);
}

.history-summary::-webkit-details-marker {
    display: none;
}

.history-details[open] .history-summary {
    border-bottom: 1px solid #475569;
    border-radius: 0.5rem 0.5rem 0 0;
}

.history-summary-content {
    flex-grow: 1;
}

.history-summary-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.history-summary-title {
    font-weight: 600;
    color: #e2e8f0;
    font-size: 1rem;
}

.history-summary-date {
    font-size: 0.75rem;
    color: #94a3b8;
}

.history-summary-counts {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.history-summary-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
    flex-shrink: 0;
}

.history-action-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
    font-size: 1rem;
}

.history-action-btn:hover {
    background-color: #334155;
    color: #22d3ee;
}

.history-delete-btn:hover {
    color: #ef4444;
}

.history-details-content {
    padding: 1rem;
    border-top: 1px solid #475569;
}

.history-risk-section,
.history-results-section,
.history-ekg-section,
.history-bp-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: rgba(15, 23, 42, 0.5);
    border: 1px solid #475569;
    border-radius: 0.5rem;
}

.history-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.75rem;
}

.history-risk-text {
    font-size: 0.875rem;
    color: #cbd5e1;
    line-height: 1.6;
    margin-top: 0.75rem;
}

.history-result-item {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    background-color: rgba(30, 41, 59, 0.6);
    border: 1px solid #475569;
    border-radius: 0.375rem;
}

.history-result-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.5rem;
}

.history-result-substance {
    font-weight: 600;
    font-size: 1rem;
    color: #f1f5f9;
    flex-grow: 1;
}

.history-result-explanation {
    font-size: 0.875rem;
    color: #cbd5e1;
    line-height: 1.6;
}

/* Results Display Updates */
.results-risk-section,
.results-results-section,
.results-ekg-section,
.results-bp-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: rgba(15, 23, 42, 0.5);
    border: 1px solid #475569;
    border-radius: 0.5rem;
}

.results-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.75rem;
}

.results-risk-text {
    font-size: 0.875rem;
    color: #cbd5e1;
    line-height: 1.6;
    margin-top: 0.75rem;
}

.result-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.5rem;
}

.result-substance {
    font-weight: 600;
    font-size: 1rem;
    color: #f1f5f9;
    flex-grow: 1;
}

