
:root {
    --gw-green: #25d366;
    --gw-green-dark: #12b85a;
    --gs-blue: #2563eb;
    --gs-blue-dark: #1d4ed8;
    --tenant-gradient: linear-gradient(135deg, var(--gw-green) 0%, #20c997 45%, var(--gs-blue) 100%);
    --sidebar-bg: #101828;
    --sidebar-bg-2: #182230;
    --page-bg: #f6f8fb;
    --surface: #ffffff;
    --border: #e6eaf0;
    --text: #182230;
    --muted: #667085;
    --radius: 16px;
    --shadow: 0 8px 28px rgba(16,24,40,.08);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(37,211,102,.08), transparent 28rem),
        radial-gradient(circle at 72% 0, rgba(37,99,235,.07), transparent 24rem),
        var(--page-bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.tenant-login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(430px, .86fr);
    background: #fff;
}

.tenant-login-brand {
    position: relative;
    overflow: hidden;
    padding: 52px;
    color: white;
    background:
        radial-gradient(circle at 12% 20%, rgba(37,211,102,.25), transparent 22rem),
        radial-gradient(circle at 92% 15%, rgba(37,99,235,.25), transparent 25rem),
        linear-gradient(150deg, #101828 0%, #172554 100%);
    display: flex;
    flex-direction: column;
}

.tenant-login-brand::after {
    content: "";
    position: absolute;
    right: -240px;
    bottom: -240px;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.12);
    box-shadow:
        0 0 0 60px rgba(255,255,255,.025),
        0 0 0 120px rgba(255,255,255,.018);
}

.tenant-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.tenant-brand-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--tenant-gradient);
    color: white;
    font-weight: 800;
    box-shadow: 0 8px 24px rgba(37,211,102,.22);
}

.tenant-brand strong {
    display: block;
    font-size: 1rem;
}

.tenant-brand small {
    display: block;
    color: #98a2b3;
    font-size: .72rem;
}

.tenant-login-copy {
    margin: auto 0;
    max-width: 600px;
    position: relative;
    z-index: 2;
}

.tenant-login-copy h1 {
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 1;
    letter-spacing: -.055em;
    font-weight: 800;
    margin-bottom: 20px;
}

.tenant-login-copy h1 span {
    background: var(--tenant-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.tenant-login-copy p {
    max-width: 520px;
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1.65;
}

.tenant-login-form-panel {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 36px;
    background:
        radial-gradient(circle at 90% 0, rgba(37,211,102,.05), transparent 22rem),
        #fff;
}

.tenant-login-form {
    width: 100%;
    max-width: 430px;
}

.tenant-login-form .eyebrow {
    color: var(--gw-green-dark);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .73rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.tenant-login-form h2 {
    font-weight: 800;
    letter-spacing: -.04em;
    margin-bottom: 8px;
}

.tenant-login-form > p {
    color: var(--muted);
    font-size: .9rem;
    margin-bottom: 26px;
}

.form-label {
    font-size: .81rem;
    font-weight: 650;
    color: #344054;
    margin-bottom: 7px;
}

.form-control,
.form-select {
    min-height: 45px;
    border-color: #d9dee7;
    border-radius: 11px;
    font-size: .89rem;
}

.form-control:focus {
    border-color: rgba(37,99,235,.65);
    box-shadow: 0 0 0 4px rgba(37,99,235,.10);
}

.input-group .form-control {
    border-radius: 11px 0 0 11px;
}

.input-group .btn {
    border-radius: 0 11px 11px 0;
}

.btn-tenant {
    min-height: 46px;
    border: 0;
    border-radius: 11px;
    color: white;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gs-blue), #1689f8);
    box-shadow: 0 8px 18px rgba(37,99,235,.20);
}

.btn-tenant:hover {
    color: white;
    background: linear-gradient(135deg, var(--gs-blue-dark), var(--gs-blue));
}

.tenant-shell {
    min-height: 100vh;
}

.tenant-sidebar {
    width: 270px;
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1030;
    padding: 20px 16px;
    background:
        radial-gradient(circle at 20% 0, rgba(37,211,102,.12), transparent 18rem),
        linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-2) 100%);
    color: white;
}

.tenant-nav-label {
    color: #667085;
    font-size: .69rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 9px 12px 6px;
}

.tenant-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tenant-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 44px;
    padding: 10px 12px;
    color: #b8c0cc;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: .92rem;
    font-weight: 500;
}

.tenant-nav a.active {
    color: white;
    background: linear-gradient(90deg, rgba(37,211,102,.16), rgba(37,99,235,.11));
    border-color: rgba(37,211,102,.18);
    box-shadow: inset 3px 0 0 var(--gw-green);
}

.tenant-main {
    margin-left: 270px;
    min-height: 100vh;
}

.tenant-topbar {
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    border-bottom: 1px solid rgba(230,234,240,.85);
    background: rgba(255,255,255,.82);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.tenant-content {
    padding: 30px;
    max-width: 1600px;
    margin: 0 auto;
}

.page-title {
    font-size: clamp(1.55rem, 2vw, 2rem);
    font-weight: 800;
    letter-spacing: -.035em;
    margin: 0;
}

.page-description {
    color: var(--muted);
    margin-top: 7px;
    font-size: .91rem;
}

.metric-card,
.modern-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(16,24,40,.06);
}

.metric-card {
    height: 100%;
    padding: 20px;
}

.metric-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: #eff6ff;
    color: var(--gs-blue);
    margin-bottom: 16px;
}

.metric-label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--muted);
}

.metric-value {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -.04em;
}

.card-head {
    padding: 19px 22px;
    border-bottom: 1px solid var(--border);
}

.card-body-modern {
    padding: 22px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
}

.status-pill.success {
    background: #ecfdf3;
    color: #087443;
    border: 1px solid #abefc6;
}

.status-pill.warning {
    background: #fffaeb;
    color: #93370d;
    border: 1px solid #fedf89;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gw-green);
    box-shadow: 0 0 0 4px rgba(37,211,102,.12);
}

.user-card {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,.08);
}

.user-card-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 13px;
    background: rgba(255,255,255,.035);
}

.user-avatar {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--tenant-gradient);
    color: white;
    font-weight: 800;
    font-size: .82rem;
}

.user-meta {
    min-width: 0;
    flex: 1;
}

.user-meta strong,
.user-meta small {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-meta strong {
    color: white;
    font-size: .78rem;
}

.user-meta small {
    color: #98a2b3;
    font-size: .69rem;
}

.alert {
    border-radius: 12px;
}

@media (max-width: 991.98px) {
    .tenant-login-page {
        grid-template-columns: 1fr;
    }

    .tenant-login-brand {
        display: none;
    }

    .tenant-sidebar {
        display: none;
    }

    .tenant-main {
        margin-left: 0;
    }

    .tenant-content {
        padding: 22px 18px;
    }

    .tenant-topbar {
        padding: 0 18px;
    }
}


.marketplace-logo-placeholder {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(37,211,102,.12), rgba(37,99,235,.12));
    color: var(--gs-blue);
    font-size: 1.15rem;
    flex: 0 0 auto;
}

.section-note {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #b2ddff;
    border-radius: 12px;
    background: #eff8ff;
    color: #175cd3;
    font-size: .79rem;
}

.card-body-modern {
    padding: 22px;
}


/* V12 - Logout mais intuitivo */
.tenant-logout-button {
    margin-top: 10px;
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 9px 12px;
    border-radius: 11px;
    border: 1px solid rgba(248,113,113,.18);
    background: rgba(127,29,29,.16);
    color: #fca5a5;
    text-decoration: none;
    font-size: .8rem;
    font-weight: 700;
    transition: .18s ease;
}

.tenant-logout-button:hover,
.tenant-logout-button:focus {
    color: #fff;
    background: rgba(185,28,28,.34);
    border-color: rgba(248,113,113,.34);
    transform: translateY(-1px);
}
