* {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    color: #172b4d;
    font-family: Verdana, Arial, sans-serif;
    font-size: 10pt;
}

body {
    background: #f3f6fb;
}

.app {
    display: grid;
    width: 100%;
    height: 100vh;
    min-height: 420px;
    grid-template-rows: 72px minmax(0, 1fr) 30px;
}

.app.authenticated {
    grid-template-rows: 72px 52px minmax(0, 1fr) 30px;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 24px;
    background: linear-gradient(to right, #ffffff 0%, #dce8f3 45%, #b8cfe4 100%);
    border-bottom: 1px solid #8eafce;
}

.top-nav {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 0;
    background: #263747;
    overflow-x: auto;
}

.top-nav-item {
    flex: 1 0 25%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border-right: 1px solid #526575;
    color: #ffffff;
    font-weight: bold;
    text-decoration: none;
    white-space: nowrap;
}

.top-nav-item:hover,
.top-nav-item:focus {
    background: #49677e;
    outline: 2px solid #ffffff;
    outline-offset: -2px;
}

.top-nav-item.active {
    background: #027ed1;
    color: #ffffff;
    box-shadow: inset 0 -4px 0 #ffffff;
}

.logo {
    display: flex;
    align-items: center;
    min-width: 0;
}

.logo img {
    display: block;
    max-width: 220px;
    max-height: 54px;
    object-fit: contain;
}

.header-label {
    color: #64748b;
    font-size: 9pt;
    text-align: right;
}

.header-user {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-self: center;
    text-align: right;
    font-size: 13px;
    line-height: 1.2;
    color: #263747;
}

.header-user p {
    margin: 2px 0;
}

.header-user form {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.header-user button.menu-item {
    display: inline-block;
    margin-bottom: 0;
    padding: 4px 10px;
    border: 1px solid #8eafce;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.65);
    color: #263747;
    font-size: 12px;
    cursor: pointer;
}

.header-user button.menu-item:hover,
.header-user button.menu-item:focus {
    background: #ffffff;
    color: #014f86;
}

.main {
    display: grid;
    min-height: 0;
    grid-template-columns: 220px minmax(0, 1fr);
}


.menu {
    min-height: 0;
    overflow: auto;
    padding: 26px 18px;
    background: #91B6E9;
    border-right: 1px solid #172b4d;
}

.menu-heading {
    margin: 0 0 18px;
    color: #243447;
    font-size: 8pt;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.menu-user {
    margin: -10px 0 26px;
    color: #172b4d;
    font-size: 11pt;
    font-weight: bold;
    overflow-wrap: anywhere;
}

.dropdown-btn {
    display: block;
    width: 100%;
    margin-bottom: 8px;
    padding: 12px;
    border: none;
    border-radius: 7px;
    background: #F8F8FF;
    color: #027ed1;
    font-family: inherit;
    font-size: inherit;
    font-weight: bold;
    text-align: left;
    cursor: pointer;
}

.dropdown-btn:hover,
.dropdown-btn:focus {
    background: #dceaf8;
    border-color: #4b83b8;
    color: #123f67;
    box-shadow: inset 4px 0 0 #2369a1;
    outline: none;
}

.menu-arrow {
    float: right;
    transition: transform 0.2s ease;
}



.dropdown-btn {
    display: block;
    width: 100%;
    margin-bottom: 4px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: #F8F8FF;
    color: #174a7e;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
}

.dropdown-btn:hover,
.dropdown-btn:focus {
    background: #ffffff;
    border-color: #c4d7ef;
    outline: none;
}

.dropdown-btn {
    display: block;
    width: 100%;
    margin-bottom: 3px;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: #F8F8FF;
    color: #243447;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    text-align: left;
    cursor: pointer;
}

.dropdown-btn:hover,
.dropdown-btn:focus {
    background: #ffffff;
    border-color: #c4d7ef;
    outline: none;
}

.menu-arrow {
    float: right;
    font-size: 10px;
    transition: transform 0.2s ease;
}

.dropdown-btn[aria-expanded="true"] .menu-arrow {
    transform: rotate(180deg);
}

.dropdown-container {
    display: none;
    margin: 0 0 6px 6px;
    padding: 1px 0 1px 6px;
    border-left: 2px solid #c4d7ef;
}

.menu-item {
    display: block;
    margin-bottom: 3px;
    padding: 6px 8px;
    border-radius: 4px;
    background: #F8F8FF;
    color: #243447;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.25;
    text-decoration: none;
}

.menu-item:hover,
.menu-item:focus {
    background: #dceaf8;
    color: #123f67;
    font-weight: 600;
    box-shadow: inset 4px 0 0 #2369a1;
    outline: 1px solid #4b83b8;
}

.submenu-item {
    margin-bottom: 2px;
    padding: 5px 7px;
    background: #f7f9fc;
    color: #243447;
    font-size: 11px;
    font-weight: 400;
}

.submenu-item:hover,
.submenu-item:focus {
    background: #dceaf8;
    color: #123f67;
    font-weight: 600;
    box-shadow: inset 3px 0 0 #2369a1;
    outline: 1px solid #4b83b8;
}


.menu-note {
    margin-top: 20px;
    color: #64748b;
    font-size: 9pt;
    line-height: 1.6;
}

.content-area {
    display: grid;
    min-width: 0;
    min-height: 0;
    grid-template-rows: 32px minmax(0, 1fr);
    background: #f3f6fb;
}

.banner {
    overflow: hidden;
    margin: 0;
    padding: 8px 14px;
    background: #dcebdc;
    border-bottom: 1px solid #c5dcc5;
    color: #28643a;
    font-size: 8pt;
    font-weight: bold;
    line-height: 15px;
    text-align: center;
    white-space: nowrap;
}

.content {
    min-width: 0;
    min-height: 0;
    overflow: auto;
    padding: 18px;
}

.content iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 300px;
    border: 0;
    border-radius: 10px;
    background: #f3f6fb;
}

.footer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    background: #fff;
    border-top: 1px solid #e3e9f2;
    color: #64748b;
    font-size: 8pt;
    text-align: center;
}

@media (max-width: 650px) {
    .header {
        padding: 0 12px;
    }

	.top-nav {
	    padding: 0 10px;
	    gap: 4px;
	}

	.top-nav-item {
	    padding: 10px 12px;
	}

    .logo img {
        max-width: 150px;
    }

    .header-label {
        font-size: 8pt;
    }

    .main {
        grid-template-columns: 145px minmax(0, 1fr);
    }

    .menu {
        padding: 18px 10px;
    }

    .content {
        padding: 8px;
    }

    .banner {
        font-size: 7pt;
    }
}
