/* ============================================================
   Medimove SM - Custom Styles
   ============================================================ */

/* Global */
body {
    background-color: #f8f9fc;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Login page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Card enhancements */
.card {
    border: none;
    border-radius: 0.75rem;
}

.card-header {
    border-radius: 0.75rem 0.75rem 0 0 !important;
}

/* Navigation */
.navbar {
    padding: 0.75rem 1rem;
}

.navbar-brand {
    font-size: 1.25rem;
    letter-spacing: 0.02em;
}

/* Dashboard stat cards */
.card.border-primary {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card.border-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1) !important;
}

/* Buttons */
.btn {
    border-radius: 0.5rem;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
}

/* Flash messages */
.alert {
    border: none;
    border-radius: 0.75rem;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #6c757d;
}

/* Forms */
.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* ============================================================
   Doctor compact shell (Patch 1)
   ============================================================ */
body.role-doctor {
    background-color: #eef1f6;
}

.doctor-shell-wrapper {
    margin: 0 auto;
    min-height: calc(100vh - 56px);
    position: relative;
}

body.role-doctor.doctor-mode-compact .doctor-full-nav {
    display: none !important;
}

body.role-doctor.doctor-mode-normal .doctor-compact-chrome {
    display: none !important;
}

body.role-doctor.doctor-mode-normal .doctor-shell-wrapper {
    max-width: none !important;
    width: 100% !important;
}

.doctor-compact-chrome {
    background: var(--bs-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.doctor-compact-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    max-width: 100%;
}

.doctor-compact-title {
    font-weight: 600;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doctor-menu-btn {
    color: #fff !important;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
}

.doctor-main {
    position: relative;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

body.role-doctor.doctor-mode-compact .doctor-shell-wrapper {
    background: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border-radius: 0 0 0.75rem 0.75rem;
    overflow-x: hidden;
}

.doctor-resize-handle {
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 100%;
    cursor: ew-resize;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.25));
    z-index: 10;
}

body.role-doctor.doctor-mode-compact .ai-product-col {
    flex: 0 0 100%;
    max-width: 100%;
}

body.role-doctor.doctor-mode-compact #aktUppgifterDisplay {
    max-width: 100% !important;
}

body.role-doctor.doctor-mode-compact .paste-hero-btn {
    min-width: 0 !important;
    width: 100%;
}

@media (max-width: 767px) {
    body.role-doctor.doctor-mode-compact .doctor-shell-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 0;
    }
}

/* Popup Explorer window: fill entire small window (no side gutters) */
body.role-doctor.doctor-mode-popup {
    background-color: #fff;
}

body.role-doctor.doctor-mode-popup .doctor-shell-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    min-height: calc(100vh - 48px);
    box-shadow: none !important;
    border-radius: 0 !important;
}

body.role-doctor.doctor-mode-popup .doctor-main {
    padding-top: 0.75rem;
}
