/* PharmFlow Professional Styles - Mapflow.ca Inspired */

/* Color Palette */
:root {
    --primary-color: #1E5B7B;
    --primary-dark: #164561;
    --accent-color: #F4B942;
    --accent-dark: #d9a137;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --text-dark: #333333;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-image {
    height: 40px;
    width: auto;
    background: white;
    padding: 5px 10px;
    border-radius: 8px;
}

.system-name {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-icon {
    font-size: 2rem;
}

nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    gap: 1rem;
    list-style: none;
}

.nav-item {
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-item.active {
    background: var(--accent-color);
    color: var(--text-dark);
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
}

.user-info i {
    font-size: 1.2rem;
}

.btn-logout {
    padding: 0.5rem 1rem;
    background: rgba(220, 53, 69, 0.9);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-logout:hover {
    background: rgba(220, 53, 69, 1);
    transform: translateY(-2px);
}

/* Main Layout */
.main-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.hidden {
    display: none !important;
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Patient List */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.search-bar {
    padding: 0.8rem 1.2rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    width: 300px;
    transition: border-color 0.3s;
}

.search-bar:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-accent {
    background: var(--accent-color);
    color: var(--text-dark);
}

.btn-accent:hover {
    background: var(--accent-dark);
}

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

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

.btn-text {
    background: transparent;
    color: var(--primary-color);
    padding: 0.4rem 0.8rem;
}

.btn-text:hover {
    background: rgba(30, 91, 123, 0.1);
}

.btn-icon {
    padding: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.1rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.btn-icon.btn-danger:hover {
    background: var(--danger-color);
    color: white;
}

/* Tables */
.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--primary-color);
    color: white;
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

tr:hover {
    background: var(--light-bg);
}

tr:last-child td {
    border-bottom: none;
}

.no-data {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Patient Cards */
.patient-card, .follow-up-card {
    background: white;
    border-radius: 8px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s;
}

.patient-card:hover, .follow-up-card:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-lg);
}

.patient-card-header, .follow-up-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.patient-card-header h4, .follow-up-header h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.patient-age {
    background: var(--light-bg);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.patient-card-body p {
    margin: 0.3rem 0;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.follow-up-date {
    background: var(--warning-color);
    color: var(--text-dark);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.follow-up-asap {
    background: var(--danger-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.follow-up-reason {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.3rem;
}

/* Patient Profile */
.profile-header {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.profile-name {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.profile-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.profile-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.info-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: var(--text-muted);
}

.info-value {
    color: var(--text-dark);
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.info-card li:before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
    line-height: 1;
}

.text-muted {
    color: var(--text-muted);
    font-style: italic;
}

/* Assessment Cards */
.assessment-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.assessment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.assessment-header h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.assessment-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-warning {
    background: var(--warning-color);
    color: var(--text-dark);
}

.badge-danger {
    background: var(--danger-color);
    color: white;
}

.assessment-body p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.assessment-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-dark);
}

.modal-footer {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Assessment View */
.assessment-container {
    max-width: 900px;
    margin: 0 auto;
}

.progress-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.progress-bar-container {
    background: var(--light-bg);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.8rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.5s;
}

.progress-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.question-card {
    background: white;
    border-radius: 12px;
    padding: 3rem;
    box-shadow: var(--shadow);
    min-height: 400px;
}

.question-text {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
}

/* Question Options */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.option-btn {
    background: white;
    border: 3px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.option-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.option-btn.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.option-icon {
    font-size: 3rem;
}

.option-label {
    font-weight: 600;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem;
    background: white;
    border: 3px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.checkbox-option:hover {
    border-color: var(--primary-color);
}

.checkbox-option.selected {
    background: rgba(30, 91, 123, 0.1);
    border-color: var(--primary-color);
}

.checkbox-option input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.checkbox-label {
    font-size: 1.1rem;
    cursor: pointer;
}

/* Scale Input */
.scale-container {
    margin-top: 2rem;
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.scale-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.scale-input {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--light-bg);
    outline: none;
    -webkit-appearance: none;
}

.scale-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

.scale-input::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Text Input */
.text-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1.1rem;
    font-family: inherit;
    resize: vertical;
    margin-top: 1rem;
}

.text-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Info Screen */
.info-screen {
    text-align: center;
    padding: 3rem;
}

.info-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
}

.info-message {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.info-details {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.alert-danger {
    background: #fff5f5;
    border: 2px solid var(--danger-color);
    border-radius: 12px;
}

.alert-danger .info-message {
    color: var(--danger-color);
}

.alert-info {
    background: #f0f9ff;
    border: 2px solid var(--info-color);
    border-radius: 12px;
}

.alert-warning {
    background: #fffbf0;
    border: 2px solid var(--warning-color);
    border-radius: 12px;
}

/* Navigation Buttons */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    gap: 1rem;
}

/* Summary View */
.summary-container {
    max-width: 1000px;
    margin: 0 auto;
}

.summary-header {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    text-align: center;
}

.summary-header h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.summary-meta {
    color: var(--text-muted);
    font-size: 1rem;
}

.summary-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.summary-section h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.summary-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item strong {
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.summary-item p {
    color: var(--text-dark);
    font-size: 1.1rem;
}

.text-success {
    color: var(--success-color);
    font-weight: 600;
}

.summary-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Welcome/Pathway Selection */
.welcome-container {
    max-width: 1200px;
    margin: 0 auto;
}

.welcome-header {
    text-align: center;
    margin-bottom: 3rem;
}

.welcome-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.welcome-header p {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.pathways-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.pathway-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow);
    border: 3px solid transparent;
    position: relative;
}

.pathway-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.pathway-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    opacity: 1;
    visibility: visible;
}

.pathway-actions .btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.pathway-actions .btn-secondary {
    background: var(--info-color);
    color: white;
}

.pathway-actions .btn-secondary:hover {
    background: #138496;
}

.pathway-actions .btn-danger {
    background: var(--danger-color);
    color: white;
}

.pathway-actions .btn-danger:hover {
    background: #c82333;
}

.pathway-actions .btn-primary {
    background: var(--success-color);
    color: white;
}

.pathway-actions .btn-primary:hover {
    background: #218838;
}

.pathway-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.pathway-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.pathway-description {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Notifications */
.notification {
    position: fixed;
    top: 100px;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    max-width: 400px;
    transform: translateX(500px);
    transition: transform 0.3s;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-left: 4px solid var(--success-color);
}

.notification-error {
    border-left: 4px solid var(--danger-color);
}

.notification-warning {
    border-left: 4px solid var(--warning-color);
}

.notification-info {
    border-left: 4px solid var(--info-color);
}

/* User Management Styles */
.btn-user-management {
    padding: 0.5rem 1rem;
    background: rgba(244, 185, 66, 0.9);
    border: none;
    border-radius: 8px;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-user-management:hover {
    background: rgba(244, 185, 66, 1);
    transform: translateY(-2px);
}

.user-management-section {
    padding: 1rem 0;
}

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

.section-header h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.user-table thead {
    background: var(--primary-color);
    color: white;
}

.user-table th,
.user-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.user-table th {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-table tbody tr:hover {
    background: var(--light-bg);
}

.user-table tbody tr:last-child td {
    border-bottom: none;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: all 0.2s;
    font-size: 1rem;
}

.btn-icon:hover {
    transform: scale(1.2);
}

.btn-icon.btn-danger {
    color: var(--danger-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .user-table {
        font-size: 0.85rem;
    }
    
    .user-table th,
    .user-table td {
        padding: 0.5rem;
    }
    
    .header-content {
        flex-wrap: wrap;
    }
    
    .user-menu {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
}

/* Templates Section */
.section-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header-bar h1 {
    margin: 0;
    color: var(--primary-color);
}

.templates-info-banner {
    background: linear-gradient(135deg, #e7f5ff 0%, #f0f8ff 100%);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.templates-info-banner i {
    font-size: 1.5rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.templates-info-banner strong {
    display: block;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.templates-info-banner p {
    color: var(--text-muted);
    margin: 0;
}

.template-category {
    margin-bottom: 3rem;
}

.template-category h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.template-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.template-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.template-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.template-header h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin: 0;
}

.badge-info {
    background: #e7f5ff;
    color: #0c5460;
}

.template-description {
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.template-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.template-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.template-meta i {
    color: var(--primary-color);
}

.empty-state {
    text-align: center;
    padding: 3rem;
    background: white;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    color: var(--border-color);
    margin-bottom: 1rem;
}

.empty-state p {
    margin: 1rem 0;
    font-size: 1.1rem;
}

.assessment-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-secondary {
    background: var(--text-muted);
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Footer */
.app-footer {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 2rem;
    margin-top: 4rem;
    border-top: 3px solid var(--accent-color);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-left,
.footer-right {
    flex: 1;
    min-width: 250px;
}

.footer-left {
    text-align: left;
}

.footer-right {
    text-align: right;
}

.footer-content p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.footer-tagline {
    font-style: italic;
    color: var(--accent-color);
    font-size: 0.85rem !important;
}

.footer-tech {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem !important;
}

.footer-content strong {
    color: var(--accent-color);
    font-weight: 600;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-left,
    .footer-right {
        text-align: center;
    }
}

/* Assessment Creator Styles */
.question-item {
    background: var(--light-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.question-number {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.question-body {
    margin-top: 1rem;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s;
}

.btn-icon:hover {
    background: var(--danger-color);
    color: white;
}

.badge-custom {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Notification animations */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* Advanced Question Builder Styles */
.question-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s;
}

.question-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.question-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.question-number {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.question-type-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.badge-button {
    background: #007bff;
    color: white;
}

.badge-checkbox {
    background: #17a2b8;
    color: white;
}

.badge-text {
    background: #6c757d;
    color: white;
}

.badge-info {
    background: #ffc107;
    color: #333;
}

.question-actions {
    display: flex;
    gap: 0.25rem;
}

.question-card-body {
    margin-top: 1rem;
}

.question-text {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.option-item {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.info-box {
    background: #e7f3ff;
    border-left: 4px solid #17a2b8;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.form-control-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.d-block {
    display: block;
}

/* Modal enhancements */
.modal.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.modal-content {
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

.notification i {
    font-size: 1.2rem;
}

.notification-success {
    background: #28a745;
    color: white;
}

.notification-error {
    background: #dc3545;
    color: white;
}

.notification-info {
    background: #17a2b8;
    color: white;
}

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-left: 4px solid #ffc107;
    color: #856404;
}

.alert-warning i {
    color: #856404;
    margin-right: 0.5rem;
}

.alert-warning strong {
    color: #856404;
    display: block;
    margin-bottom: 0.5rem;
}

.alert-warning p {
    margin: 0.5rem 0 0 0;
    color: #856404;
}

/* Super User Auth Modal Styles */
#super-user-auth-modal .modal-content {
    max-width: 500px;
}

#super-auth-error {
    color: var(--danger-color);
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f8d7da;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
}

#super-auth-error i {
    margin-right: 0.5rem;
}

/* Template Builder Styles */
.template-section {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.template-section h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.help-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.builder-item {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.builder-item-header {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.builder-item-number {
    background: var(--primary-color);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.builder-item-body {
    margin-top: 0.5rem;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.template-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* Pathway Cards */
.pathway-card {
    position: relative;
}

.pathway-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
}

.pathway-card[data-type="custom"] {
    border-color: var(--success-color);
}

.pathway-card[data-type="custom"]:hover {
    border-color: var(--success-color);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .main-container {
        padding: 0 1rem;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .search-bar {
        width: 100%;
    }

    .question-text {
        font-size: 1.4rem;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .navigation-buttons {
        flex-direction: column;
    }

    .summary-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    .header,
    .navigation-buttons,
    .btn,
    .profile-actions,
    .assessment-actions {
        display: none !important;
    }

    body {
        background: white;
    }

    .summary-container,
    .profile-header,
    .summary-section {
        box-shadow: none;
        page-break-inside: avoid;
    }
}

/* Utility Classes */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

.detail-section {
    margin-bottom: 1.5rem;
}

.detail-section h4 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
}

.detail-section.alert-danger,
.detail-section.alert-warning {
    padding: 1rem;
    border-radius: 8px;
}
