/* PostOpCare - Hospital Clinical Theme (Desktop-first, Accessible) */
:root {
    /* Primary Clinical Colors */
    --primary-blue: #005eb8;
    --primary-blue-dark: #003d82;
    --primary-blue-darker: #002f5c;
    --accent-blue: #0066cc;
    
    /* Backgrounds */
    --light-blue-bg: #e8f4fd;
    --pale-blue-bg: #f5f9fc;
    --warm-gray-bg: #f7f9fb;
    --body-bg: #eef3f8;
    
    /* Status Colors - more distinct */
    --success-green: #1e7e34;
    --success-green-light: #d4edda;
    --warning-orange: #d97706;
    --warning-orange-light: #fef3c7;
    --danger-red: #c82333;
    --danger-red-light: #f8d7da;
    --info-teal: #0f766e;
    --info-teal-light: #d1fae5;
    --info-cyan: #0c5460;
    --neutral-slate: #475569;
    
    /* Text Colors - high contrast for readability */
    --text-dark: #111827;
    --text-body: #1f2937;
    --text-muted: #4b5563;
    --text-light: #6b7280;
    
    /* Borders & Shadows */
    --border-color: #cbd5e1;
    --border-color-strong: #94a3b8;
    --card-shadow: 0 1px 3px rgba(0, 61, 130, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    --card-shadow-hover: 0 4px 12px rgba(0, 94, 184, 0.12), 0 2px 4px rgba(0, 0, 0, 0.06);
    --card-shadow-elevated: 0 10px 25px rgba(0, 61, 130, 0.15);
}

html {
    font-size: 16px;
}

body {
    background: linear-gradient(180deg, var(--body-bg) 0%, #e6edf5 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        'Inter', sans-serif;
    color: var(--text-body);
    line-height: 1.7;
    min-height: 100vh;
}

/* Navbar - Desktop-first with stronger clinical presence */
.navbar {
    background: linear-gradient(90deg, var(--primary-blue-darker) 0%, var(--primary-blue) 100%) !important;
    box-shadow: 0 3px 10px rgba(0, 47, 92, 0.2);
    padding: 0.875rem 0;
    border-bottom: 3px solid var(--accent-blue);
}

.navbar .navbar-brand {
    font-weight: 700;
    font-size: 1.375rem;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar .navbar-brand i {
    font-size: 1.5rem;
    color: #93c5fd;
}

.navbar .nav-link,
.navbar .text-white {
    font-size: 1rem;
    font-weight: 500;
}

.navbar .btn-outline-light {
    border-width: 2px;
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease-in-out;
}

.navbar .btn-outline-light:hover,
.navbar .btn-outline-light:focus {
    background: white;
    color: var(--primary-blue-darker);
    border-color: white;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

/* Page Header - More prominent and distinct */
.page-header {
    background: linear-gradient(90deg, white 0%, var(--pale-blue-bg) 100%);
    border-radius: 10px;
    padding: 1.75rem 2.25rem;
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--primary-blue);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 94, 184, 0.03) 100%);
    pointer-events: none;
}

.page-header h1 {
    color: var(--primary-blue-darker);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
    letter-spacing: -0.02em;
    position: relative;
}

.page-header .subtitle {
    color: var(--text-muted);
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: 500;
    position: relative;
}

/* Cards - More defined with better separation */
.card-cardiocare {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    transition: box-shadow 0.25s ease-in-out;
    margin-bottom: 1.75rem;
    overflow: hidden;
}

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

.card-cardiocare .card-header {
    background: linear-gradient(90deg, var(--pale-blue-bg) 0%, white 70%);
    border-bottom: 3px solid var(--primary-blue);
    padding: 1rem 1.5rem;
    font-weight: 700;
    color: var(--primary-blue-darker);
    font-size: 1.125rem;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.card-cardiocare .card-header i {
    color: var(--primary-blue);
    font-size: 1.25rem;
}

.card-cardiocare .card-body {
    padding: 1.5rem;
}

.status-badge {
    padding: 0.5rem 0.875rem;
    border-radius: 24px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    letter-spacing: 0.01em;
}

.status-pending {
    background-color: var(--warning-orange-light);
    color: #92400e;
    border: 1.5px solid var(--warning-orange);
}

.status-completed {
    background-color: var(--success-green-light);
    color: var(--success-green);
    border: 1.5px solid var(--success-green);
}

.status-critical {
    background-color: var(--danger-red-light);
    color: var(--danger-red);
    border: 1.5px solid var(--danger-red);
}

.status-warning {
    background-color: var(--warning-orange-light);
    color: #92400e;
    border: 1.5px solid var(--warning-orange);
}

.status-normal {
    background-color: var(--info-teal-light);
    color: var(--info-teal);
    border: 1.5px solid var(--info-teal);
}

.btn-cardiocare-primary {
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
    border: none;
    color: white;
    padding: 0.625rem 1.75rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease-in-out;
    border-radius: 8px;
    letter-spacing: 0.01em;
}

.btn-cardiocare-primary:hover,
.btn-cardiocare-primary:focus {
    background: linear-gradient(90deg, var(--primary-blue-dark) 0%, var(--primary-blue) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 94, 184, 0.35);
}

.btn-cardiocare-primary:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 114, 206, 0.35);
}

.btn-cardiocare-outline {
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    background: white;
    padding: 0.625rem 1.75rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease-in-out;
    border-radius: 8px;
}

.btn-cardiocare-outline:hover,
.btn-cardiocare-outline:focus {
    background: var(--primary-blue);
    color: white;
    box-shadow: 0 0 0 0.2rem rgba(0, 94, 184, 0.2);
}

.table-cardiocare {
    margin-bottom: 0;
}

.table-cardiocare thead {
    background: linear-gradient(90deg, var(--pale-blue-bg) 0%, white 100%);
}

.table-cardiocare thead th {
    border-bottom: 3px solid var(--primary-blue);
    color: var(--primary-blue-darker);
    font-weight: 700;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.table-cardiocare tbody tr {
    transition: background-color 0.15s ease-in-out;
}

.table-cardiocare tbody tr:hover {
    background-color: var(--pale-blue-bg);
}

.table-cardiocare tbody td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    border-color: var(--border-color);
    font-size: 1rem;
    color: var(--text-body);
}

.table-cardiocare tbody tr + tr td {
    border-top: 1px solid var(--border-color);
}

.form-label-cardiocare {
    font-weight: 600;
    color: var(--primary-blue-darker);
    margin-bottom: 0.625rem;
    font-size: 1rem;
    letter-spacing: 0.01em;
}

.form-control-cardiocare,
.form-select-cardiocare {
    border: 1.5px solid var(--border-color-strong);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-body);
    background-color: white;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.form-control-cardiocare:hover,
.form-select-cardiocare:hover {
    border-color: var(--primary-blue);
}

.form-control-cardiocare:focus,
.form-select-cardiocare:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 0.25rem rgba(0, 114, 206, 0.18);
    outline: none;
}

.form-control-cardiocare::placeholder {
    color: var(--text-light);
}

.questionnaire-section {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--card-shadow);
}

.questionnaire-section-title {
    color: var(--primary-blue-darker);
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--light-blue-bg);
}

/* Dolore +/- controls */
.dolore-control {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    max-width: 320px;
}

.dolore-control .form-control-cardiocare {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    padding: 0.75rem 0.5rem;
}

.dolore-btn {
    background: linear-gradient(180deg, white 0%, var(--pale-blue-bg) 100%);
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue-darker);
    width: 3.25rem;
    min-width: 3.25rem;
    height: 3.25rem;
    border-radius: 10px;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
    box-shadow: var(--card-shadow);
}

.dolore-btn:hover,
.dolore-btn:focus {
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
    color: white;
    border-color: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(0, 94, 184, 0.3);
    outline: none;
}

.dolore-btn:active {
}

.dolore-btn:focus-visible {
    box-shadow: 0 0 0 0.25rem rgba(0, 114, 206, 0.35);
}

.patient-info-banner {
    background: linear-gradient(135deg, var(--light-blue-bg) 0%, white 100%);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.patient-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-blue) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.modal-cardiocare .modal-header {
    background: linear-gradient(to right, var(--light-blue-bg), white);
    border-bottom: 2px solid var(--primary-blue);
    color: var(--primary-blue-dark);
}

.modal-cardiocare .modal-content {
    border-radius: 8px;
    border: none;
    box-shadow: 0 8px 32px rgba(0, 94, 184, 0.2);
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    text-align: center;
    transition: all 0.2s ease-in-out;
}

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

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin: 0 auto 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card-icon.blue {
    background: var(--light-blue-bg);
    color: var(--primary-blue);
}

.stat-card-icon.green {
    background: #d4edda;
    color: var(--success-green);
}

.stat-card-icon.yellow {
    background: #fff3cd;
    color: #856404;
}

.stat-card-icon.red {
    background: #f8d7da;
    color: var(--danger-red);
}

.stat-card-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-blue-dark);
    margin-bottom: 0.25rem;
}

.stat-card-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0;
}

.search-box {
    position: relative;
}

.search-box input {
    padding-left: 2.5rem;
}

.search-box-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}
