:root { --master-topbar-height: 72px; }

.master-topbar {
    min-height: var(--master-topbar-height);
    box-sizing: border-box;
    padding: 10px clamp(14px, 2.5vw, 32px);
    display: flex;
    align-items: center;
    gap: clamp(16px, 2.5vw, 36px);
    background: #fff;
    border-bottom: 1px solid #d6e3f0;
    box-shadow: 0 2px 12px rgba(23, 49, 77, .06);
    position: relative;
    z-index: 20;
}

.master-topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #17314d;
    text-decoration: none;
    flex: 0 0 auto;
}

.master-topbar-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #17314d;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .04em;
}

.master-topbar-brand strong,
.master-topbar-brand small { display: block; }
.master-topbar-brand strong { font-size: 15px; line-height: 1.2; }
.master-topbar-brand small { margin-top: 2px; color: #687f96; font-size: 11px; }

.master-topbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1 1 auto;
}

.master-topbar-nav a {
    padding: 9px 11px;
    border-radius: 8px;
    color: #526b83;
    text-decoration: none;
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
}

.master-topbar-nav a:hover { background: #eef5fc; color: #17314d; }
.master-topbar-nav a.active { background: #e4f0fc; color: #155b98; }

.master-topbar-actions { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.master-topbar-actions form { margin: 0; }
.master-topbar-button {
    min-height: 36px;
    padding: 7px 11px;
    border: 1px solid #b9cde1;
    border-radius: 8px;
    background: #fff;
    color: #234b72;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
}
.master-topbar-button:hover { border-color: #6f9ec9; background: #f4f9fe; }
.master-topbar-button-muted { color: #667b90; border-color: transparent; }

.master-overview {
    min-height: calc(100vh - var(--master-topbar-height));
    box-sizing: border-box;
    padding: clamp(30px, 6vw, 76px) clamp(18px, 6vw, 88px);
    background: #eef5fc;
}

.master-overview-inner { max-width: 1040px; margin: 0 auto; }
.master-overview-kicker { margin: 0 0 9px; color: #1f6fb9; font-size: 12px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.master-overview h1 { margin: 0; color: #17314d; font-size: clamp(30px, 4vw, 44px); line-height: 1.12; }
.master-overview-intro { max-width: 650px; margin: 12px 0 0; color: #5b7289; font-size: 16px; line-height: 1.55; }
.master-overview h2 { margin: 38px 0 14px; color: #17314d; font-size: 15px; }

.master-overview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.master-overview-card {
    min-height: 150px;
    box-sizing: border-box;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    border: 1px solid #cadbec;
    border-radius: 14px;
    background: #fff;
    color: #17314d;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(23, 49, 77, .06);
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.master-overview-card:hover { border-color: #72a7d5; box-shadow: 0 12px 28px rgba(23, 49, 77, .11); transform: translateY(-2px); }
.master-overview-card strong { font-size: 16px; }
.master-overview-card span { color: #60758c; font-size: 13px; line-height: 1.5; }
.master-overview-card em { margin-top: auto; color: #1f6fb9; font-size: 12px; font-style: normal; font-weight: 800; }

@media (max-width: 1050px) {
    .master-topbar { flex-wrap: wrap; gap: 8px 16px; }
    .master-topbar-nav { order: 3; width: 100%; overflow-x: auto; padding-top: 2px; }
    .master-topbar-actions { margin-left: auto; }
    .master-overview { min-height: auto; }
}

@media (max-width: 720px) {
    :root { --master-topbar-height: auto; }
    .master-topbar-brand small { display: none; }
    .master-topbar-actions { width: 100%; order: 2; margin-left: 0; }
    .master-topbar-actions form { flex: 1; }
    .master-topbar-button { width: 100%; }
    .master-topbar-nav { order: 3; }
    .master-overview-grid { grid-template-columns: 1fr; }
    .master-overview-card { min-height: 125px; }
}
