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

:root {
    --primary: #6366f1;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --secondary: #64748b;
    --accent: #06b6d4;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

body {
    background-color: var(--background);
    color: var(--text-main);
    overflow-x: hidden;
}

/* Sidebar - Luxury Glassmorphism */
.app-container {
    display: flex;
}

.sidebar {
    width: 280px;
    background: #0f172a;
    color: white;
    height: 100vh;
    position: fixed;
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0.75rem;
    cursor: pointer;
    font-weight: 500;
}

.nav-item i { width: 20px; transition: transform 0.3s; }

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

.nav-item:hover i { transform: translateX(3px); }

.nav-item.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.4);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
}

.top-bar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    padding: 1.25rem 3rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 900;
}

.content-inner {
    padding: 2.5rem 3rem;
    max-width: 1600px;
    margin: 0 auto;
}

/* Luxury Cards */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s;
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: white;
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    border: 1px solid var(--border);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-val { font-size: 1.75rem; font-weight: 800; color: var(--text-main); }
.stat-label { font-size: 0.875rem; color: var(--text-muted); font-weight: 500; }

/* Buttons */
.btn {
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.btn-primary { 
    background: var(--primary-gradient); 
    color: white; 
}

.btn-primary:hover { 
    transform: translateY(-2px) scale(1.02); 
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.5); 
}

.btn-outline {
    background: white;
    border: 1.5px solid var(--border);
    color: var(--text-main);
}

.btn-outline:hover { background: var(--background); border-color: var(--primary); color: var(--primary); }

/* Form Elements */
.form-group { margin-bottom: 1.5rem; }
.form-label { font-size: 0.9rem; font-weight: 600; color: var(--text-main); margin-bottom: 0.6rem; display: block; }

.form-control {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border);
    background: #fcfdfe;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Full Width Landscape Editor */
.job-card-grid {
    display: block;
}

.editor-left-pane {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Hide Preview but keep for PDF generation */
.sticky-preview {
    display: none !important;
}

#pdf-container {
    flex: 1;
    overflow: hidden;
    background: #cbd5e1;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
    border: 1px solid var(--border);
}

.prescription-paper {
    background: white;
    width: 210mm;
    height: 297mm;
    padding: 15mm;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    color: #1e293b;
    font-size: 13px;
    position: relative;
    transform-origin: top center;
    flex-shrink: 0;
}

.paper-header {
    border-bottom: 2.5px solid #0f172a;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.doc-name { font-size: 1.4rem; font-weight: 800; color: #0f172a; margin-bottom: 2px; }
.doc-sub { font-size: 0.8rem; font-weight: 600; color: #475569; }

.med-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.med-table th {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1.5px solid #0f172a;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.med-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #f1f5f9;
}

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

.view-section {
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hidden { display: none !important; }

/* Search Suggestion Styling */
.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
    margin-top: 5px;
    max-height: 250px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f8fafc;
}

.suggestion-item:hover, .suggestion-item.active { background: var(--primary); color: white; }

/* Checklist Grid Styling */
.checklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    max-height: 160px;
    overflow-y: auto;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-main);
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.check-item:hover { background: #f1f5f9; }

.wiz-chip {
    padding: 6px 14px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.wiz-chip:hover {
    transform: translateY(-1px);
    background: #f1f5f9;
    border-color: var(--primary);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.wiz-chip.active {
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

/* Step Animations */
.wiz-step-animate {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

.rx-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #eef2ff;
    color: var(--primary);
    border-radius: 6px;
    font-weight: 900;
    font-size: 0.7rem;
    margin-right: 10px;
}

/* Dropzone Styling */
.dropzone * {
    pointer-events: none;
}

.dropzone:hover {
    border-color: var(--primary) !important;
    background: #f5f3ff !important;
}

.dropzone.dragover {
    border-color: #a855f7 !important;
    background: #f3e8ff !important;
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.1);
}

.dropzone.dragover i {
    transform: scale(1.1);
    color: #a855f7 !important;
}

#excel-preview-table th, #excel-preview-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
}

#excel-preview-table tbody tr:last-child td {
    border-bottom: none;
}


