* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f3f4f6;
    color: #111827;
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* NAVBAR */

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;
    margin-bottom: 40px;
    padding: 22px 30px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 42px;
    height: 42px;
    background: #2563eb;
    border-radius: 12px;
}

.brand-name {
    font-size: 20px;
    font-weight: 800;
}

.nav-links {
    display: flex;
    gap: 28px;
}

.nav-links a,
.navbar a {
    color: #111827;
    text-decoration: none;
    font-weight: 700;
}

.nav-links a:hover,
.navbar a:hover {
    color: #2563eb;
}

/* HERO */

.hero {
    background: linear-gradient(135deg, #ffffff, #eaf4ff);
    padding: 90px 70px;
    border-radius: 28px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
}

.eyebrow {
    display: inline-block;
    margin-bottom: 18px;
    color: #2563eb;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero h1 {
    max-width: 800px;
    font-size: 58px;
    line-height: 1.05;
    margin-bottom: 24px;
}

.hero p {
    max-width: 680px;
    font-size: 20px;
    color: #4b5563;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-top: 34px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 15px 28px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
}

.primary {
    background: #111827;
    color: white;
}

.secondary {
    background: white;
    color: #111827;
    border: 1px solid #d1d5db;
}

/* CARDS */

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 36px;
}

.card {
    background: white;
    padding: 34px;
    border-radius: 22px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.06);
}

.card h2 {
    font-size: 24px;
    margin-bottom: 12px;
}

.card p {
    color: #4b5563;
}

/* CONTENT SECTION */

.content-section {
    background: white;
    margin-top: 36px;
    padding: 50px;
    border-radius: 24px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.06);
}

.content-section h1 {
    font-size: 46px;
    margin-bottom: 14px;
}

.content-section h2 {
    font-size: 34px;
    margin-bottom: 18px;
}

.content-section p {
    max-width: 820px;
    color: #4b5563;
    margin-bottom: 14px;
}

/* JOURNAL LIST */

.search-wrapper {
    margin-top: 40px;
    margin-bottom: 10px;
}

.search-wrapper input {
    width: 100%;
    padding: 20px;
    border-radius: 18px;
    border: 1px solid #d1d5db;
    font-size: 17px;
    outline: none;
    background: white;
}

.search-wrapper input:focus {
    border-color: #2563eb;
}

.journal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-top: 36px;
}

.journal-card {
    display: block;
    background: white;
    padding: 28px;
    border-radius: 20px;
    text-decoration: none;
    color: #111827;
    box-shadow: 0 12px 35px rgba(0,0,0,0.06);
    transition: 0.25s ease;
}

.journal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 45px rgba(0,0,0,0.09);
}

.journal-card strong {
    font-size: 22px;
}

.journal-card p {
    margin-top: 8px;
    color: #6b7280;
}

.journal-date {
    display: block;
    color: #2563eb;
    font-weight: 800;
    margin-bottom: 10px;
}

/* JOURNAL PAGE */

.journal-page {
    background: white;
    padding: 60px;
    border-radius: 28px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.06);
}

.journal-page h1 {
    font-size: 48px;
    margin-bottom: 10px;
}

.date {
    color: #6b7280;
    font-weight: 700;
    margin-bottom: 35px;
}

/* PATIENT OVERVIEW - FIXAD BILD */

.patient-overview {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-top: 30px;
    margin-bottom: 40px;
    padding: 30px;
    background: #f9fafb;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
}

.patient-avatar {
    width: 140px;
    height: 140px;
    min-width: 140px;
    max-width: 140px;
    border-radius: 20px;
    overflow: hidden;
    background: #e5e7eb;
    flex-shrink: 0;
}

.patient-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Om du vill visa hela bilden utan beskärning, byt object-fit: cover; till contain ovan */

.patient-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.patient-row span {
    display: block;
    font-size: 14px;
    color: #6b7280;
}

.patient-row strong {
    font-size: 18px;
    color: #111827;
}

/* JOURNAL META */

.journal-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 35px;
}

.meta-item {
    background: #f9fafb;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
}

.meta-item span {
    display: block;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 8px;
}

.meta-item strong {
    font-size: 18px;
}

.status {
    color: #16a34a;
}

/* JOURNAL BOX */

.journal-box {
    margin-top: 20px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 40px;
}

.journal-box h2 {
    font-size: 24px;
    margin-top: 30px;
    margin-bottom: 14px;
    color: #111827;
}

.journal-box h2:first-child {
    margin-top: 0;
}

.journal-box p {
    color: #4b5563;
    line-height: 1.8;
    font-size: 17px;
}

.back-link {
    display: inline-block;
    margin-top: 35px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 700;
}

/* FOOTER */

.footer {
    margin-top: 60px;
    padding: 40px;
    background: white;
    border-radius: 24px;
    border-top: 1px solid #e5e7eb;
}

.footer-content {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.footer h3 {
    margin-bottom: 10px;
}

.footer p {
    color: #6b7280;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    text-decoration: none;
    color: #111827;
    font-weight: 700;
}

.footer-links a:hover {
    color: #2563eb;
}

/* DARK MODE */

.theme-btn {
    padding: 12px 18px;
    border: none;
    border-radius: 12px;
    background: #111827;
    color: white;
    cursor: pointer;
    font-weight: 700;
}

.dark-mode {
    background: #0f172a;
    color: white;
}

.dark-mode .hero,
.dark-mode .card,
.dark-mode .journal-page,
.dark-mode .journal-card,
.dark-mode .navbar,
.dark-mode .footer,
.dark-mode .content-section,
.dark-mode .journal-box,
.dark-mode .meta-item,
.dark-mode .patient-overview {
    background: #111827;
    color: white;
}

.dark-mode p,
.dark-mode span,
.dark-mode .journal-card p {
    color: #d1d5db;
}

.dark-mode a {
    color: white;
}

/* RESPONSIVE */

@media (max-width: 800px) {
    .container {
        padding: 24px 14px;
    }

    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero {
        padding: 55px 30px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .cards,
    .journal-grid,
    .journal-meta {
        grid-template-columns: 1fr;
    }

    .content-section,
    .journal-page {
        padding: 32px;
    }

    .patient-overview {
        flex-direction: column;
        align-items: flex-start;
    }

    .patient-avatar {
        width: 120px;
        height: 120px;
        min-width: 120px;
        max-width: 120px;
    }
}
