/* === ROOT VARIABLES === */
:root {
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --primary-light: #14b8a6;
    --primary-pale: #ccfbf1;
    --primary-bg: #f0fdfa;

    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;

    --bg-white: #ffffff;
    --bg-gray: #fafafa;
    --bg-light: #f9fafb;

    --border-light: #e5e7eb;
    --border-medium: #d1d5db;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(13, 148, 136, 0.15);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === LEFT SIDEBAR === */
.left-sidebar {
    width: 25vw;
    min-width: 320px;
    max-width: 450px;
    position: relative;
    background: var(--bg-gray);
    display: flex;
    flex-direction: column;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    z-index: 10;
}

/* === HEADER === */
.sidebar-header-left {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0 24px;
    height: auto;
    /* Changed from fixed height */
    min-height: 80px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    /* Added */
    justify-content: center;
    /* Added */
    gap: 12px;
    /* Added */
    padding-top: 16px;
    padding-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Filter Tabs & Specialty Bar */
.sidebar-filters-top {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.filter-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px;
    border-radius: 10px;
    gap: 4px;
}

.filter-tab {
    flex: 1;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-tab:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.filter-tab.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.filter-row {
    display: flex;
    gap: 10px;
    width: 100%;
}

.specialty-filter-container,
.patient-filter-container,
.review-filter-container {
    flex: 1;
}

.specialty-filter-container select,
.patient-filter-container select,
.review-filter-container select {
    width: 100%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    padding: 6px 8px;
    font-size: 0.8rem;
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
    text-overflow: ellipsis;
}

.specialty-filter-container select:hover,
.patient-filter-container select:hover,
.review-filter-container select:hover {
    background: rgba(255, 255, 255, 0.3);
}

.specialty-filter-container select option,
.patient-filter-container select option,
.review-filter-container select option {
    background: var(--bg-white);
    color: var(--text-primary);
}

/* Global Stats Bar */
.global-stats-bar {
    background: rgba(0, 0, 0, 0.15);
    padding: 8px 16px;
    margin-top: 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.3s ease;
}

.global-stats-bar strong {
    color: white;
    font-weight: 700;
}

/* Create Consultation Placeholder */
.create-consultation-placeholder {
    width: 100%;
    padding: 24px;
    margin-top: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px dashed var(--border-medium);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.create-consultation-placeholder:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.plus-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-pale);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 4px;
}

.create-consultation-placeholder h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.create-consultation-placeholder p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* List Item Version of Create Consultation */
.create-consultation-list-item {
    background: var(--bg-white);
    border: 2px dashed var(--border-medium);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.create-consultation-list-item:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.placeholder-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-pale);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 300;
    flex-shrink: 0;
}

.placeholder-text h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
}

.placeholder-text p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.session-badges-row {
    margin-bottom: 10px;
}

.specialty-badge {
    background: var(--primary-pale);
    color: var(--primary-dark);
    border: 1px solid var(--primary-light);
}

.global-badge {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.header-top {
    width: 100%;
}

.title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.title-row h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
}

.btn-add-consultation {
    background: transparent;
    border: 2px dashed rgba(255, 255, 255, 0.4);
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-consultation:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
    transform: scale(1.05);
}

/* Search Container */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.7);
    pointer-events: none;
    z-index: 1;
}

.patient-search-input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 0.95rem;
    backdrop-filter: blur(8px);
    transition: var(--transition);
}

.patient-search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.patient-search-input:focus {
    outline: none;
    background: white;
    color: var(--text-primary);
    border-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.patient-search-input:focus+.search-icon,
.patient-search-input:focus~.search-icon {
    color: var(--primary);
}

/* === PATIENT LIST CONTAINER === */
.patient-list {
    flex: 1;
    overflow-y: auto;
    background: var(--bg-gray);
    padding: 16px;
}

/* === PATIENT CARD === */
.patient-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    border: 2px solid var(--border-light);
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    overflow: hidden;
}

.patient-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

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

.patient-card:hover::before {
    transform: scaleY(1);
}

.patient-card.selected {
    border-color: var(--primary);
    background: var(--primary-bg);
    box-shadow: var(--shadow-lg);
}

.patient-card.selected::before {
    transform: scaleY(1);
}

.patient-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-pale) 0%, var(--primary-light) 100%);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.3rem;
    flex-shrink: 0;
    border: 3px solid var(--primary-pale);
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.2);
}

.patient-info {
    flex: 1;
    min-width: 0;
}

.patient-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.patient-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.case-count {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.case-count svg {
    width: 14px;
    height: 14px;
    color: var(--primary);
}

.patient-card .chevron {
    width: 20px;
    height: 20px;
    color: var(--text-tertiary);
    flex-shrink: 0;
    transition: var(--transition);
}

.patient-card:hover .chevron,
.patient-card.selected .chevron {
    color: var(--primary);
    transform: translateX(4px);
}

/* === BUTTONS === */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

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

.btn-primary svg {
    width: 18px;
    height: 18px;
}

/* === STATES === */
.loading-state,
.empty-state,
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.empty-state.small {
    padding: 40px 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

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

.loading-state p,
.empty-state p,
.error-state p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 12px 0;
}

.empty-state h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 12px 0 4px 0;
}

.empty-icon,
.error-state svg {
    width: 56px;
    height: 56px;
    color: var(--text-tertiary);
    opacity: 0.5;
    margin-bottom: 12px;
}

.error-state {
    color: #dc2626;
}

.error-state svg {
    color: #dc2626;
}

/* === DETAILS PANEL === */
.patient-details-panel {
    position: absolute;
    inset: 0;
    background: var(--bg-gray);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
    z-index: 100;
    box-shadow: var(--shadow-xl);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.patient-details-panel.open {
    transform: translateX(0);
}



.details-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-height: 100px;
}

.details-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    flex: 1;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(4px);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateX(-4px);
}

.back-btn svg {
    width: 20px;
    height: 20px;
}

.details-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* === SESSION SECTION === */
.session-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--primary);
}

.session-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.btn-new-session {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

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

.btn-new-session svg {
    width: 16px;
    height: 16px;
}

/* === SESSION CARD === */
.session-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    border: 2px solid var(--border-light);
    padding: 18px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.session-card.reviewed {
    background: linear-gradient(to right, #fefce8 0%, var(--bg-white) 100%);
}

.session-card::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

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

.session-card:hover::before {
    transform: scaleY(1);
}

.session-card.active {
    border-color: var(--primary);
    background: var(--primary-bg);
    box-shadow: var(--shadow-lg);
}

.session-card.active::before {
    transform: scaleY(1);
}

.session-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 12px;
}

.session-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.session-date svg {
    width: 14px;
    height: 14px;
    color: var(--primary);
}

.btn-delete-session {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.btn-delete-session:hover {
    background: #fee2e2;
    color: #ef4444;
    opacity: 1;
}

.session-card:hover .btn-delete-session {
    opacity: 0.8;
}

.btn-delete-session:hover {
    opacity: 1;
}

.session-badges {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.session-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.session-badge svg {
    width: 12px;
    height: 12px;
}

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

.review-badge {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
}

.pending-badge {
    background: #f3f4f6;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.session-preview {
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

/* === REVIEW SECTION === */
.btn-toggle-review {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid #f59e0b;
    color: #f59e0b;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 12px;
}

.btn-toggle-review:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.btn-toggle-review svg {
    width: 16px;
    height: 16px;
}

.session-review-section {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 2px solid var(--border-light);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        max-height: 500px;
        transform: translateY(0);
    }
}

.review-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    margin-top: 8px;
}

.review-stars {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    margin-bottom: 8px;
}

.star {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-tertiary);
}

.star svg {
    width: 28px;
    height: 28px;
    transition: var(--transition);
}

.star:hover svg,
.star.filled svg {
    color: #fbbf24;
    transform: scale(1.1);
}

.star.filled svg {
    fill: #fbbf24;
    stroke: #fbbf24;
}

.review-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    transition: var(--transition);
    margin-bottom: 12px;
}

.review-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.review-actions {
    display: flex;
    gap: 8px;
}

.btn-save-review {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

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

.btn-save-review svg {
    width: 16px;
    height: 16px;
}

.btn-cancel-review {
    padding: 10px 20px;
    background: white;
    color: var(--text-secondary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-cancel-review:hover {
    border-color: var(--border-medium);
    background: var(--bg-light);
}

#patient-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    height: calc(100vh - 80px);
    /* Prilagodi visini headera */
}

/* === SCROLLBAR === */
.patient-list::-webkit-scrollbar,
::-webkit-scrollbar {
    width: 8px;
}

.patient-list::-webkit-scrollbar-track,
.details-content::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 4px;
}

.patient-list::-webkit-scrollbar-thumb,
.details-content::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.patient-list::-webkit-scrollbar-thumb:hover,
.details-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* === MODAL TABS & ENHANCED FORM === */
.modal-content.large-modal {
    width: 600px;
    max-width: 95vw;
}

.modal-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-light);
}

.modal-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: -2px;
}

.modal-tab:hover {
    color: var(--primary);
    background: rgba(0, 0, 0, 0.02);
}

.modal-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.input-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.sidebar-select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    background: white;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.new-patient-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

@media (max-width: 600px) {
    .new-patient-grid {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input,
.form-group select {
    padding: 10px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.modal-divider {
    border: 0;
    border-top: 1px solid var(--border-light);
    margin: 20px 0;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.patient-card,
.session-card {
    animation: fadeIn 0.3s ease;
}

/* === UTILITY CLASSES === */
.details-body {
    animation: fadeIn 0.4s ease;
}

/* === FOCUS STYLES === */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

button:focus-visible {
    outline-offset: 4px;
}

/* ZAMENI postojeći .review-preview CSS sa ovim (suptilniji) */

/* === REVIEW PREVIEW (SUPTILNIJI) === */
.review-preview {
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    margin-top: 4px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.preview-stars {
    display: flex;
    gap: 4px;
}

.preview-stars .star {
    width: 20px;
    height: 20px;
    padding: 0;
    background: none;
    border: none;
}

.preview-rating {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-white);
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid var(--border-medium);
}

.preview-comment {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    padding: 4px;
    margin: 8px 0;
    min-height: 60px;
    display: flex;
    align-items: center;
}

.preview-comment.empty {
    background: #fafbfc;
    color: var(--text-tertiary);
    font-style: italic;
}

.preview-comment p {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.5;
}

.preview-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.edit-label {
    margin: 4px;
}

.btn-edit-preview,
.btn-close-preview {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
    max-width: 120px;
}

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

.btn-edit-preview:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-close-preview {
    background: var(--bg-white);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.btn-close-preview:hover {
    background: var(--bg-light);
    border-color: var(--border-medium);
}

.review-notification {
    backdrop-filter: blur(10px);
}

.review-notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    border-radius: inherit;
    opacity: 0.1;
}

.notification-success {
    animation: slideInRight 0.4s ease-out;
}

.notification-error {
    animation: slideInRight 0.4s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* === VIEW MODE (ISTI KAO PRE) */
.review-view-mode {
    position: relative;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 🖊️ OLOVKA DESNO GORE */
.edit-pencil-btn {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.edit-pencil-btn:hover {
    background: white;
    border-color: #0ea5e9;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
    transform: scale(1.05);
}

.pencil-icon {
    width: 16px;
    height: 16px;
    color: #64748b;
}

.edit-pencil-btn:hover .pencil-icon {
    color: #0ea5e9;
}

/* === EDIT MODE (TRANSFORMACIJA) */
.review-view-mode.edit-mode {
    background: white;
    border-color: #0ea5e9;
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.1);
    padding: 16px;
}

/* EDIT KONTROLE (umesto olovke) */
.edit-controls {
    display: flex;
    gap: 8px;
    justify-content: right;
}

.edit-control-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.cancel-btn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

.cancel-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    transform: scale(1.05);
}

.save-btn {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #059669;
}

.save-btn:hover {
    background: rgba(16, 185, 129, 0.15);
    transform: scale(1.05);
}

/* EDIT STARS (kompaktni) */
.edit-header {
    margin: -4px -16px 16px -16px;
    padding: 16px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 8px;
    border-bottom: 1px solid #bfdbfe;
}

.edit-stars-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.edit-stars {
    display: flex;
    gap: 4px;
}

.edit-star-btn {
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.edit-star-btn:hover {
    background: rgba(251, 191, 36, 0.1);
    transform: scale(1.1);
}

.edit-star-btn.active {
    background: rgba(251, 191, 36, 0.2);
}

.edit-star-btn.active .edit-star {
    color: #f59e0b;
    fill: #f59e0b;
}

.edit-star {
    width: 18px;
    height: 18px;
    color: #d1d5db;
}

.edit-rating-display {
    font-size: 1.2rem;
    font-weight: 700;
    color: #64748b;
    min-width: 24px;
    text-align: center;
}

/* EDIT TEXTAREA (kompaktni) */
.edit-textarea {
    width: 100%;
    min-height: 72px;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    transition: all 0.2s ease;
    line-height: 1.5;
    margin-bottom: 0;
}

.edit-textarea:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* === GLATKI PRELAZI === */
.review-view-mode {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.edit-star-btn,
.edit-control-btn,
.edit-pencil-btn {
    transition: all 0.15s ease;
}

/* ANIMACIJA TRANSFORMACIJE */
@keyframes editTransform {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.98);
    }

    100% {
        transform: scale(1);
    }
}

.review-view-mode.edit-mode {
    animation: editTransform 0.3s ease;
}

/* 🌐 GLOBAL SESSION STYLES */
.session-tabs {
    display: flex;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-btn2 {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: none;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn2:hover {
    background: #f3f4f6;
}

.tab-btn2.active {
    background: var(--primary);
    color: white;
}

.tab-content2 {
    display: none;
}

.tab-content2.active {
    display: block;
}

.global-session {
    border-left: 4px solid var(--primary);
    background: #f0fdf4;
}

.global-badge {
    background: #10b981 !important;
    color: white !important;
    font-size: 11px !important;
    padding: 4px 8px !important;
}

.session-creator {
    font-size: 12px;
    color: #059669;
    margin-top: 8px;
    font-style: italic;
}

.global-indicator {
    background: #10b981;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 12px;
    margin-left: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* chat.css */

.action-btn.like-btn.active {
    color: #22c55e;
    /* Zelena za Like */
    background: #f0fdf4;
    border-color: #22c55e;
}

.action-btn.dislike-btn.active {
    color: #ef4444;
    /* Crvena za Dislike */
    background: #fef2f2;
    border-color: #ef4444;
}

.action-btn.active svg {
    fill: currentColor;
    /* Puni ikonicu bojom */
}

/* === DOCTOR PROFILE & LOGOUT === */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.doctor-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.doctor-profile:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.doctor-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    letter-spacing: 0.3px;
}

.logout-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border-radius: 50%;
    margin-left: 4px;
}

.logout-btn:hover {
    color: #fecaca;
    /* Light red */
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* === NEW CONSULTATION MODAL === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    /* Limit height */
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 30px;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    /* Flex layout */
    flex-direction: column;
}

.modal-overlay.open .modal-content {
    transform: translateY(0);
}

.modal-content.medium-modal {
    max-width: 500px;
}

.modal-instruction-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.pdf-drop-zone {
    width: 100%;
    height: 180px;
    border: 2px dashed var(--border-medium);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-light);
    position: relative;
    overflow: hidden;
}

.pdf-drop-zone:hover,
.pdf-drop-zone.dragover {
    border-color: var(--primary);
    background: var(--primary-pale);
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    text-align: center;
    padding: 20px;
}

.pdf-drop-zone:hover .drop-zone-content {
    color: var(--primary-dark);
}

.file-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.file-name-display {
    font-weight: 600;
    color: var(--primary);
    margin-top: 8px;
    word-break: break-all;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-shrink: 0;
    /* Don't shrink header */
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-tertiary);
    transition: var(--transition);
}

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

.modal-body {
    overflow-y: auto;
    /* Enable vertical scroll */
    padding-right: 5px;
    margin-bottom: 20px;
    flex: 1;
    /* Take remaining space */
}

.modal-body textarea {
    width: 100%;
    height: 140px;
    /* Reduced fixed height */
    min-height: 100px;
    padding: 16px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 24px;
    resize: vertical;
}

.modal-body textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
    /* Don't shrink footer */
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
}

.btn-secondary {
    background: white;
    border: 2px solid var(--border-light);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--bg-light);
    border-color: var(--border-medium);
}

/* === PDF FILE UPLOAD STYLES === */
.file-upload-area {
    margin-top: 8px;
}

.pdf-upload-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 8px;
}

.file-input {
    width: 100%;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.pdf-purpose-select {
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
}

.btn-file-upload {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary-pale);
    color: var(--primary-dark);
    border: 2px dashed var(--primary-light);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-file-upload:hover {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary);
}

.btn-file-upload svg {
    flex-shrink: 0;
}

.pdf-preview {
    margin-top: 12px;
}

.pdf-file-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.pdf-file-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

.pdf-file-card svg {
    flex-shrink: 0;
}

.pdf-file-info {
    flex: 1;
    min-width: 0;
}

.pdf-file-name {
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pdf-file-size {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.btn-remove-file {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-remove-file:hover {
    background: #fee2e2;
    color: #dc2626;
}

.input-help {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}