:root {
    --rw-sidebar-bg: #042f66;
    --rw-sidebar-fg: #ffffff;
    --rw-menu-bg: #1995a7;
    --rw-menu-fg: #ffffff;
    --rw-button-bg: #db4a26;
    --rw-button-fg: #ffffff;
    --rw-sidebar-active: #1995a7;
    --rw-sidebar-hover: #454545;
    --rw-topbar-bg: #1995a7;
    --rw-content-bg: #f4f6f8;
    --rw-text: #1f2937;
    --rw-muted: #6b7280;
    --rw-border: #e5e7eb;
    --rw-white: #ffffff;
    --rw-font: 'Poppins', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body.rw-body {
    margin: 0;
    font-family: var(--rw-font);
    color: var(--rw-text);
    background: var(--rw-content-bg);
}

/* Auth / Login */
.rw-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100dvh;
    background: var(--rw-white);
    text-align: center;
}

.rw-auth__welcome {
    position: relative;
    color: var(--rw-white);
    padding-top: 7rem;
    overflow: hidden;
}

.rw-auth__welcome-cover {
    position: absolute;
    inset: 0;
}

.rw-auth__welcome-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rw-auth__welcome-logotype {
    position: relative;
    z-index: 5;
    margin-bottom: 1.8rem;
}

.rw-auth__welcome-logotype img {
    width: 20.9rem;
    height: auto;
}

.rw-auth__welcome-title {
    position: relative;
    z-index: 5;
    font-size: 3.2rem;
    line-height: 1.25;
    margin-bottom: 2rem;
}

.rw-auth__form {
    position: relative;
    padding: 7rem 2rem;
    overflow-y: auto;
}

.rw-auth__form-container {
    width: 100%;
    max-width: 40rem;
    margin: 0 auto;
}

.rw-auth__tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.rw-auth__tab {
    flex: 1;
    font-size: 2rem;
    font-weight: 500;
    color: #9ca3af;
    border: none;
    background: none;
    padding: 0;
    height: 3.2rem;
    line-height: 3.2rem;
}

.rw-auth__tab.active {
    color: #111827;
}

.rw-auth__group-title {
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 1.75rem;
    text-align: left;
}

.rw-input {
    margin-bottom: 1rem;
}

.rw-input__container {
    position: relative;
    border: 1px solid #d1d5db;
    border-radius: 0.4rem;
    background: var(--rw-white);
}

.rw-input__field {
    width: 100%;
    border: none;
    background: transparent;
    padding: 1.2rem 2.4rem 1.2rem 1.2rem;
    font-size: 1.4rem;
    font-family: var(--rw-font);
    outline: none;
}

.rw-input__required {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #ef4444;
    font-size: 1.2rem;
}

.rw-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 4.4rem;
    border: none;
    border-radius: 0.4rem;
    background: var(--rw-button-bg);
    color: var(--rw-button-fg);
    font-size: 1.4rem;
    font-weight: 600;
    font-family: var(--rw-font);
    cursor: pointer;
    transition: opacity 0.2s;
}

.rw-button:hover { opacity: 0.92; }
.rw-button:disabled { opacity: 0.6; cursor: not-allowed; }

.rw-auth__forgot {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.rw-auth__forgot a {
    color: var(--rw-button-bg);
    text-decoration: none;
    font-size: 1.3rem;
}

.rw-auth__error {
    color: #dc2626;
    font-size: 1.2rem;
    margin-top: 0.5rem;
    text-align: left;
}

.rw-language {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 6;
    font-size: 1.3rem;
    color: #111827;
}

/* Company layout */
.rw-app {
    display: flex;
    min-height: 100dvh;
}

.rw-sidebar {
    width: 26rem;
    flex-shrink: 0;
    background: var(--rw-sidebar-bg);
    color: var(--rw-sidebar-fg);
    display: flex;
    flex-direction: column;
}

.rw-sidebar__logo {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.rw-sidebar__logo img {
    max-width: 16rem;
    height: auto;
}

.rw-sidebar__nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.rw-sidebar__item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 2rem;
    color: var(--rw-sidebar-fg);
    text-decoration: none;
    font-size: 1.4rem;
    transition: background 0.2s;
}

.rw-sidebar__item:hover {
    background: var(--rw-sidebar-hover);
}

.rw-sidebar__item.active {
    background: var(--rw-sidebar-active);
}

.rw-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.rw-topbar {
    background: var(--rw-topbar-bg);
    color: var(--rw-menu-fg);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 5.6rem;
}

.rw-topbar__title {
    font-size: 1.8rem;
    font-weight: 600;
}

.rw-topbar__user {
    font-size: 1.3rem;
}

.rw-content {
    flex: 1;
    padding: 2rem;
}

.rw-impersonation-banner {
    background: #f59e0b;
    color: #111827;
    padding: 0.8rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.3rem;
    font-weight: 500;
}

.rw-impersonation-banner a,
.rw-impersonation-banner button {
    color: #111827;
    font-weight: 600;
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
}

.rw-card {
    background: var(--rw-white);
    border-radius: 0.6rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 2rem;
}

@media (max-width: 1024px) {
    .rw-auth {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .rw-auth__welcome {
        min-height: 28rem;
        padding-top: 4rem;
    }

    .rw-auth__welcome-title {
        font-size: 2.2rem;
    }

    .rw-auth__form {
        padding: 2.5rem 1.5rem;
    }

    .rw-sidebar {
        display: none;
    }
}
