/* ======================================================================
   MEDICUS INTERNAL UI
   Version: 1.0
   ====================================================================== */
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #333;
    background: #f5f1e8;
}

/* ======================================================================
   PAGE
   ====================================================================== */

.page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.page-content {
    margin-top: 24px;
}


/* ======================================================================
   HEADER
   ====================================================================== */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
}

.page-header-left {
    flex: 1;
}

.page-title {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
}

.page-subtitle {
    margin-top: 6px;
    color: #666;
    font-size: 17px;
}

.page-period {
    margin-top: 8px;
    font-weight: 600;
}

.page-actions {
    display: flex;
    gap: 10px;
}


/* ======================================================================
   TOOLBAR
   ====================================================================== */

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.toolbar-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}


/* ======================================================================
   BUTTONS
   ====================================================================== */

.button {
    display: inline-flex;
	align-items:center;
	justify-content:center;
	gap:6px;
    padding: 9px 18px;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid #ccc;
    background: white;
    color: #333;
    cursor: pointer;
    transition: .15s;
    font-size: 14px;
}

.button:hover {
    background: #f5f5f5;
}

.button-primary {
    background: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

.button-primary:hover {
    background: #0b5ed7;
}

.button-danger {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

.button-danger:hover {
    background: #bb2d3b;
}

/* Neutral action */

.button-secondary{

    background:#64748b;

    border-color:#64748b;

    color:white;

}

.button-secondary:hover{

    background:#475569;

}


/* Warning / utility */

.button-warning{

    background:#d4af37;

    border-color:#d4af37;

    color:white;

}

.button-warning:hover{

    background:#c59b21;

}


/* ======================================================================
   FORMS
   ====================================================================== */

.form-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.form-row input[type=date] {

    padding: 8px 10px;

    border: 1px solid #ccc;

    border-radius: 6px;

}


/* ======================================================================
   SUMMARY
   ====================================================================== */

.summary-bar {

    display: flex;

    gap: 35px;

    align-items: center;

    padding: 18px 20px;

    background: #fafafa;

    border: 1px solid #ddd;

    border-radius: 8px;

    margin-bottom: 24px;

    flex-wrap: wrap;

}

.summary-item {

    display: flex;

    gap: 8px;

    align-items: center;

}

.summary-value {

    font-weight: bold;

    font-size: 18px;

}


/* ======================================================================
   CARDS
   ====================================================================== */

.content-card {

    border: 1px solid #ddd;

    border-radius: 8px;

    background: white;

    padding: 18px;

    margin-bottom: 18px;

}

.content-card:last-child {

    margin-bottom: 0;

}

.two-column {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.two-column-main {
    flex: 1;
}

.two-column-side {
    flex: 1;
}

@media (max-width: 900px) {
    .two-column {
        flex-direction: column;
    }

    .two-column-main,
    .two-column-side {
        flex: 1;
    }
}


/* ======================================================================
   HELPERS
   ====================================================================== */

.text-muted {
    color: #777;
}

.text-right {
    text-align: right;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}


/* ======================================================================
   RESPONSIVE
   ====================================================================== */

@media (max-width: 900px) {

    .page {
        padding: 15px;
    }

    .page-header {
        flex-direction: column;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .summary-bar {

        gap:20px;

    }

}

/* ======================================================================
   Error messages
   ====================================================================== */

.message-error{
    background:#fee2e2;
    border:1px solid #fca5a5;
    color:#991b1b;
    padding:12px 16px;
    border-radius:8px;
    margin-bottom:15px;
}

.message-warning{
    background:#fef3c7;
    border:1px solid #fcd34d;
    color:#92400e;
    padding:12px 16px;
    border-radius:8px;
    margin-bottom:15px;
}





/* ======================================================================
   SITE NAVIGATION
   ====================================================================== */


/* ======================================================================
   MENU BUTTON
   ====================================================================== */

.site-menu-button {

    position: fixed;

    top: 16px;
    right: 16px;

    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid #ccc;
    border-radius: 8px;

    background: white;
    color: #333;

    font-size: 24px;
    line-height: 1;

    cursor: pointer;

    z-index: 10000;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);

    transition:
        background 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.1s ease;
}


.site-menu-button:hover {

    background: #f5f5f5;

    box-shadow:
        0 3px 10px rgba(0, 0, 0, 0.12);
}


.site-menu-button:active {

    transform: translateY(1px);
}


.site-menu-button.is-hidden {
    display: none;
}



/* ======================================================================
   OVERLAY
   ====================================================================== */

.site-menu-overlay {

    position: fixed;

    inset: 0;

    background: rgba(0, 0, 0, 0.35);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;

    z-index: 9998;
}


.site-menu-overlay.is-open {

    opacity: 1;
    visibility: visible;
}



/* ======================================================================
   NAVIGATION DRAWER
   ====================================================================== */

.site-navigation {

    position: absolute;

    top: 0;
    right: 0;
    left: auto;

    width: 330px;
    max-width: 85vw;
    height: 100%;

    box-sizing: border-box;

    background: #f5f1e8;

    box-shadow:
        -4px 0 20px rgba(0, 0, 0, 0.18);

    transform: translateX(100%);

    transition:
        transform 0.2s ease;

    overflow-y: auto;
}


.site-menu-overlay.is-open .site-navigation {

    transform: translateX(0);
}



/* ======================================================================
   DRAWER HEADER
   ====================================================================== */

.site-navigation-header {

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 22px 20px;

    background: white;

    border-bottom: 1px solid #ddd;

    position: sticky;
    top: 0;

    z-index: 2;
}



/* ======================================================================
   BRANDING
   ====================================================================== */

.site-navigation-title {

    font-size: 24px;
    font-weight: 700;
    color:#92400e;
    line-height: 1.1;
}


.site-navigation-subtitle {

    margin-top: 4px;

    color: #777;

    font-size: 14px;
}



/* ======================================================================
   CLOSE BUTTON
   ====================================================================== */

.site-menu-close {

    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 42px;

    padding: 0;

    border: 1px solid #ccc;
    border-radius: 8px;

    background: white;
    color: #333;

    font-size: 28px;
    line-height: 1;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}


.site-menu-close:hover {

    background: #f5f5f5;
    border-color: #bbb;
}



/* ======================================================================
   NAVIGATION CONTAINER
   ====================================================================== */

.site-navigation-links {

    display: flex;
    flex-direction: column;

    gap: 4px;

    padding: 14px;
}



/* ======================================================================
   LEVEL 1 - MAIN SECTIONS
   ====================================================================== */

.site-navigation-section {

    width: 100%;
    margin: 0;
}


.site-navigation-section-toggle {

    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    box-sizing: border-box;

    padding: 13px 10px;

    border: none;
    border-radius: 10px;

    background: transparent;

    color: #263238;

    font-family: inherit;

    font-size: 16px;
    font-weight: 700;

    line-height: 1.2;

    text-align: left;

    cursor: pointer;

    transition:
        background 0.15s ease,
        color 0.15s ease;
}


.site-navigation-section-toggle:hover {

    background: rgba(255, 255, 255, 0.65);
}


.site-navigation-section-main {

    display: flex;
    align-items: center;

    gap: 10px;

    min-width: 0;
}


.site-navigation-section-main .site-navigation-icon {

    width: 30px;
    flex: 0 0 30px;

    text-align: center;

    font-size: 21px;
}



/* ======================================================================
   SECTION CHEVRON
   ====================================================================== */

.site-navigation-chevron {

    display: flex;
    align-items: center;
    justify-content: center;

    width: 24px;
    height: 24px;

    flex: 0 0 24px;

    color: #7a7f85;

    font-size: 21px;
    line-height: 1;

    transition:
        transform 0.2s ease,
        color 0.2s ease;
}


.site-navigation-section.is-expanded
> .site-navigation-section-toggle {

    background: rgba(255, 255, 255, 0.75);

    color: #1e3a5f;
}


.site-navigation-section.is-expanded
> .site-navigation-section-toggle
> .site-navigation-chevron {

    transform: rotate(90deg);

    color: #1e3a5f;
}



/* ======================================================================
   SUBMENUS
   ====================================================================== */

.site-navigation-submenu {

    display: none;

    box-sizing: border-box;

    padding: 3px 0 6px 8px;
}


.site-navigation-section.is-expanded
> .site-navigation-submenu {

    display: block;
}



/* ======================================================================
   LEVEL 2 - SUBSECTIONS
   ====================================================================== */

.site-navigation-section.nested {

    margin: 1px 0 3px;
}


.site-navigation-section.nested
> .site-navigation-section-toggle {

    padding: 10px 10px;

    border-radius: 8px;

    font-size: 15px;
    font-weight: 600;

    color: #4a5055;
}


.site-navigation-section.nested
> .site-navigation-section-toggle:hover {

    background: rgba(255, 255, 255, 0.6);
}


.site-navigation-section.nested.is-expanded
> .site-navigation-section-toggle {

    background: rgba(255, 255, 255, 0.7);

    color: #1e3a5f;
}



/* ======================================================================
   LEVEL 3 - ACTUAL DESTINATION LINKS
   ====================================================================== */

.site-navigation-link {

    display: flex;
    align-items: center;

    width: 100%;
    min-height: 48px;

    box-sizing: border-box;

    margin: 3px 0;

    padding: 10px 14px;

    border: 1px solid #ddd;
    border-radius: 9px;

    background: white;

    color: #333;

    text-decoration: none;

    font-family: inherit;

    font-size: 15px;
    font-weight: 600;

    line-height: 1.2;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.05s ease;
}


.site-navigation-link:hover {

    background: #fafafa;

    border-color: #ccc;

    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.05);
}


.site-navigation-link:active {

    transform: translateY(1px);
}



/* ======================================================================
   LEVEL 3 ICON
   ====================================================================== */

.site-navigation-link .site-navigation-icon {

    width: 30px;
    flex: 0 0 30px;

    margin-right: 8px;

    text-align: center;

    font-size: 21px;
}



/* ======================================================================
   NESTED LEVEL 3 LINKS
   ====================================================================== */

.nested-submenu {

    padding-left: 8px;
}


.nested-link {

    min-height: 48px;

    font-size: 15px;
    font-weight: 600;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #fdfdfdc4;
}

.modal-overlay {
		display: none;
		position: fixed;
		inset: 0;
		background: rgba(0,0,0,.45);
		z-index: 9999;

		justify-content: center;
		align-items: center;
	}

.modal-box {
	background: white;
	padding: 25px;
	border-radius: 10px;
	width: 380px;
	box-shadow: 0 10px 25px rgba(0,0,0,.25);
}

.modal-box h3 {
	margin-top: 0;
}

.modal-box input {
	width:100%;
	padding:10px;
	font-size:18px;
	box-sizing:border-box;
}

.modal-buttons{
	margin-top:15px;
	text-align:right;
}

.modal-buttons button{
	padding:8px 16px;
	cursor:pointer;
}



/* ======================================================================
   MOBILE / TABLET
   ====================================================================== */

@media (max-width: 600px) {

    .site-navigation {

        width: 300px;
        max-width: 88vw;
    }


    .site-menu-button {

        top: 10px;
        right: 10px;
    }


    .site-navigation-header {

        padding: 18px 16px;
    }


    .site-navigation-title {

        font-size: 21px;
    }


    .site-navigation-links {

        padding: 12px;
    }

}

/* ======================================================================
   LANGUAGE SWITCH
   ====================================================================== */

.language-switch {
    text-align: right;
    margin-bottom: 10px;
}

.language-switch a {
    display: inline-block;
    padding: 7px 12px;
    border: 1px solid #c4a77f;
    border-radius: 8px;
    color: #5e5454;
    background: #fff;
    text-decoration: none;
    font-size: 14px;
}

.language-switch a:hover {
    background: #f8f5ef;
}