@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;600;700&family=Source+Sans+3:wght@300;400;500;600&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background: linear-gradient(135deg, #1e1b4b 0%, #1d4ed8 35%, #176bb4 65%, #06b6d4 100%) fixed;
    font-family: 'Source Sans 3', "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 15px;
    color: #1b1b1b;
}

/* ── Dev banner ────────────────────────────────────────── */

.mc-dev-banner {
    background: #fff4ce;
    border-bottom: 1px solid #f0d060;
    text-align: center;
    padding: 7px;
    font-size: 13px;
    color: #7d5a00;
    width: 100%;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

/* ── Full-height split layout ──────────────────────────── */

.mc-page {
    flex: 1;
    display: flex;
    min-height: 0;
}

.mc-card {
    display: flex;
    flex: 1;
}

/* ── Left panel (form) ─────────────────────────────────── */

.mc-left {
    flex: 1;
    background: #ffffff;
    padding: 40px 32px 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.mc-left > * {
    width: 100%;
    max-width: 420px;
}

.mc-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 40px;
}

.mc-logo img {
    height: 64px;
    width: auto;
}

.mc-logo-text {
    font-size: 18px;
    font-weight: 600;
    color: #176bb4;
    letter-spacing: -0.2px;
}

.mc-form-body {
}

.mc-heading {
    font-size: 26px;
    font-weight: 700;
    color: #1b1b1b;
    margin: 0 0 8px;
    line-height: 1.2;
}

.mc-tagline {
    font-size: 14px;
    color: #555;
    margin: 0 0 32px;
    line-height: 1.5;
}

/* ── Form fields ───────────────────────────────────────── */

.mc-field {
    margin-bottom: 18px;
}

.mc-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #1b1b1b;
    margin-bottom: 5px;
}

.mc-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.mc-input-wrap svg {
    position: absolute;
    left: 11px;
    color: #888;
    pointer-events: none;
    flex-shrink: 0;
}

.mc-input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    font-size: 14px;
    font-family: inherit;
    border: 1.5px solid #d0d5d5;
    border-radius: 8px;
    outline: none;
    color: #1b1b1b;
    background: #fff;
    transition: border-color 0.15s;
}

.mc-input:focus {
    border-color: #176bb4;
    box-shadow: 0 0 0 3px rgba(23, 107, 180, 0.12);
}

.mc-input::placeholder {
    color: #aaa;
}

.mc-input-static {
    width: 100%;
    padding: 10px 12px 10px 36px;
    font-size: 14px;
    color: #555;
    background: #f5f7f7;
    border: 1.5px solid #d0d5d5;
    border-radius: 8px;
}

.mc-field-error {
    font-size: 12px;
    color: #c0392b;
    margin-top: 4px;
}

/* ── Validation error box ──────────────────────────────── */

.mc-error {
    background: #fdf0ef;
    border: 1px solid #e8b4b0;
    padding: 10px 14px;
    font-size: 13px;
    color: #a4262c;
    margin-bottom: 16px;
    border-radius: 8px;
}

/* ── Primary button ────────────────────────────────────── */

.mc-btn-primary {
    width: 100%;
    background: #176bb4;
    color: #fff;
    border: none;
    padding: 11px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border-radius: 8px;
    display: block;
    text-align: center;
    text-decoration: none;
    margin-top: 8px;
    transition: background 0.15s;
}

.mc-btn-primary:hover {
    background: #125996;
    color: #fff;
}

/* ── Account selector (method chooser) ─────────────────── */

.mc-account-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mc-account-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1.5px solid #d0d5d5;
    margin-bottom: 8px;
    cursor: pointer;
    text-decoration: none;
    color: #1b1b1b;
    background: #fff;
    border-radius: 8px;
    transition: background 0.1s, border-color 0.1s;
}

.mc-account-item:hover {
    background: #f0f6ff;
    border-color: #176bb4;
    color: #1b1b1b;
}

.mc-account-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #176bb4;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.mc-account-avatar svg {
    fill: #fff;
}

.mc-app-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: contain;
    flex-shrink: 0;
}

.mc-account-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mc-account-name {
    font-weight: 600;
    font-size: 14px;
}

.mc-account-email {
    font-size: 12px;
    color: #666;
}

/* ── Links ─────────────────────────────────────────────── */

.mc-link {
    color: #176bb4;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.mc-link:hover {
    text-decoration: underline;
}

/* ── Right panel (marketing) ───────────────────────────── */

.mc-right {
    flex: 1;
    background: linear-gradient(135deg, #1e1b4b 0%, #1d4ed8 35%, #176bb4 65%, #06b6d4 100%);
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    color: #fff;
    overflow-y: auto;
    position: relative;
}

.mc-right-content {
    padding: 60px 56px;
}

.mc-right-headline {
    font-family: 'Montserrat', sans-serif;
    font-size: 38px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
    letter-spacing: 0;
}

.mc-right-quote {
    margin: 0 0 32px;
}

.mc-right-quote-mark {
    font-size: 28px;
    line-height: 1;
    opacity: 0.6;
    margin-bottom: 8px;
}

.mc-right-quote p {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.9;
    margin: 0 0 16px;
}

.mc-right-quote-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mc-right-quote-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mc-right-quote-avatar svg {
    fill: rgba(255,255,255,0.7);
}

.mc-right-quote-name {
    font-size: 14px;
    font-weight: 600;
}

.mc-right-quote-title {
    font-size: 12px;
    opacity: 0.7;
}

.mc-right-logos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 32px 0 0;
}

.mc-right-logo-card {
    border-radius: 20px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    position: relative;
}

.mc-right-logo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.mc-right-logo-card--contain img {
    object-fit: contain;
    background: #fff;
    padding: 12px;
}

/* ── Access denied (single column, centred page) ───────── */

.mc-page-centered {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    width: 100%;
    background: transparent;
}

.mc-card-single {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    padding: 52px 48px;
    width: 440px;
    max-width: 100%;
    text-align: center;
}

/* ── Card page header (logo + title bar) ───────────────── */

.mc-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 28px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.mc-card-header img {
    height: 36px;
    width: auto;
    flex-shrink: 0;
}

.mc-card-header-title {
    font-size: 20px;
    font-weight: 700;
    color: #176bb4;
    margin: 0 0 0 auto;
    line-height: 1.2;
    text-align: right;
}

.mc-card-header > div {
    margin-left: auto;
    text-align: right;
}

.mc-card-header-subtitle {
    font-size: 13px;
    color: #777;
    margin: 3px 0 0;
    line-height: 1.3;
}

/* ── Success box ───────────────────────────────────────── */

.mc-success {
    background: #f0faf0;
    border: 1px solid #a3d9a5;
    padding: 10px 14px;
    font-size: 13px;
    color: #1a6b2a;
    margin-bottom: 16px;
    border-radius: 8px;
}

/* ── Profile / manage page ─────────────────────────────── */

.mc-manage-field {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.mc-manage-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #999;
    flex-shrink: 0;
    min-width: 100px;
}

.mc-manage-value {
    font-size: 14px;
    color: #1b1b1b;
    flex: 1;
}

.mc-btn-edit {
    background: none;
    color: #176bb4;
    border: 1px solid #176bb4;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}

.mc-btn-edit:hover {
    background: #176bb4;
    color: #fff;
}

.mc-btn-cancel {
    background: none;
    color: #666;
    border: 1px solid #ccc;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}

.mc-btn-cancel:hover {
    background: #f0f0f0;
}

.mc-manage-input-row {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.mc-btn-save {
    background: #176bb4;
    color: #fff;
    border: none;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s;
}

.mc-btn-save:hover {
    background: #125996;
}

.mc-badge-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.mc-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.mc-badge--blue {
    background: #e8f0fe;
    color: #1557b0;
}

.mc-badge--gray {
    background: #f0f0f0;
    color: #444;
}

.mc-badge--green {
    background: #e8f5e9;
    color: #2e7d32;
}

.mc-badge--active {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px currentColor;
}

/* ── Home page ─────────────────────────────────────────── */

.mc-card-home {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    padding: 48px;
    width: 640px;
    max-width: 100%;
}

.mc-home-welcome {
    text-align: center;
    font-size: 15px;
    color: #555;
    margin: 0 0 36px;
}

.mc-home-section {
    margin-bottom: 28px;
}

.mc-home-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #176bb4;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8f0f8;
}

.mc-app-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

@media (max-width: 540px) {
    .mc-app-grid {
        grid-template-columns: 1fr;
    }

    .mc-card-home {
        padding: 32px 20px;
    }
}

/* ── Footer ────────────────────────────────────────────── */

.mc-footer {
    padding: 12px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    color: #6b8aaa;
    flex-wrap: wrap;
    gap: 4px 0;
}

.mc-footer-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}

.mc-footer-left span {
    margin-right: 4px;
}

.mc-footer a {
    color: #176bb4;
    text-decoration: none;
    padding: 0 6px;
    border-left: 1px solid #a8c0d6;
}

.mc-footer a:first-of-type {
    border-left: none;
}

.mc-footer a:hover {
    text-decoration: underline;
}

.mc-footer-right {
    display: flex;
    gap: 8px;
}

/* Footer on dark gradient background (post-login pages) */
.mc-page-centered ~ .mc-footer {
    color: rgba(255, 255, 255, 0.55);
}

.mc-page-centered ~ .mc-footer a {
    color: rgba(255, 255, 255, 0.75);
    border-left-color: rgba(255, 255, 255, 0.25);
}

.mc-page-centered ~ .mc-footer a:hover {
    color: #fff;
}

/* ── Account picker ────────────────────────────────────── */

.mc-account-list-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.mc-account-pick-form {
    flex: 1;
    min-width: 0;
}

/* Button variant of mc-account-item (account picker tiles) */
.mc-account-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    border: 1.5px solid #d0d5d5;
    border-radius: 8px;
    background: #fff;
    color: #1b1b1b;
    cursor: pointer;
    font: inherit;
    transition: background 0.1s, border-color 0.1s;
}

.mc-account-btn:hover {
    background: #f0f6ff;
    border-color: #176bb4;
}

.mc-account-avatar--initials {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}

.mc-account-avatar--other {
    background: #e8f0fe;
    flex-shrink: 0;
}

.mc-account-avatar--other svg {
    fill: #176bb4;
}

.mc-account-chevron {
    margin-left: auto;
    flex-shrink: 0;
    color: #aac0d4;
}


.mc-account-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #aac0d4;
    padding: 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 4px;
    transition: background 0.1s, color 0.1s;
}

.mc-account-remove:hover {
    background: #fdecea;
    color: #c0392b;
}

/* ── Responsive ────────────────────────────────────────── */

/* Narrow: right panel hidden, form full width */
@media (max-width: 768px) {
    .mc-right {
        display: none;
    }

    .mc-left {
        padding: 40px 32px;
    }
}

/* Wide: left grows to 60%, right fixed at 40%, content shifts toward divider */
@media (min-width: 1200px) {
    .mc-left {
        flex: 1;
        align-items: flex-end;
        padding: 40px 64px 200px 32px;
    }

    .mc-right {
        flex: 0 0 40%;
    }
}

/* Short screens: drop the above-center offset */
@media (max-height: 749px) {
    .mc-left {
        padding-bottom: 40px;
    }
}

@media (min-width: 1200px) and (max-height: 749px) {
    .mc-left {
        padding-bottom: 40px;
    }
}
