:root {
    color-scheme: light dark;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #f5f7fb;
    color: #1f2937;
}

.page-width {
    width: min(1120px, calc(100vw - 32px));
    margin: 0 auto;
}

.auth-banner-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    color: #0f172a;
    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
}

.auth-banner-logo {
    display: block;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    object-fit: contain;
}

.auth-banner {
    padding: 16px 0;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.auth-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 50px;
}

.auth-section {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 50px;
    min-width: 0;
}

.banner-message {
    color: #2563eb;
    max-width: min(40vw, 320px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 700;
}

.password-auth-form {
    display: grid;
    gap: 12px;
    align-items: center;
}

.auth-input {
    min-width: 0;
    height: 38px;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font-size: 14px;
}

.auth-button {
    height: 38px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.auth-button.secondary {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
}

.auth-button:hover {
    background: #1d4ed8;
}

.auth-button.secondary:hover {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
}

.auth-button:disabled {
    background: #cbd5e1;
    color: #64748b;
    cursor: not-allowed;
}

.google-auth {
    display: flex;
    justify-content: center;
    min-width: 240px;
}

.login-overlay,
.license-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: start center;
    padding: 96px 16px 24px;
    background: rgba(15, 23, 42, 0.32);
}

.login-dialog,
.license-modal {
    width: min(420px, 100%);
    box-sizing: border-box;
    padding: 20px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
}

.login-dialog-header,
.license-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.login-title,
.license-modal-title {
    margin: 0;
    color: #0f172a;
    font-size: 20px;
    line-height: 1.2;
}

.login-close-button,
.modal-close-button {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: #f1f5f9;
    color: #334155;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.login-close-button:hover,
.modal-close-button:hover {
    background: #e2e8f0;
}

.password-auth-actions,
.license-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: #64748b;
    font-size: 13px;
}

.login-divider::before,
.login-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #e2e8f0;
}

.user-menu-wrap {
    position: relative;
}

.user-menu-button {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    gap: 10px;
    height: 50px;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.user-menu-button:hover,
.user-menu-button[aria-expanded="true"] {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.user-summary {
    display: grid;
    gap: 2px;
    min-width: 0;
    text-align: right;
}

.user-menu-caret {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.user-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 40;
    min-width: 220px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
}

.user-menu-plan {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    color: inherit;
    cursor: pointer;
    text-decoration: none;
}

.user-menu-plan:hover {
    background: #eff6ff;
}

.user-menu-plan-label {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.user-menu-plan-level {
    color: #0f172a;
    font-size: 15px;
    font-weight: 800;
}

.user-menu-plan-remaining {
    display: grid;
    gap: 4px;
    color: #475569;
    font-size: 13px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.user-menu-item {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    align-items: center;
    padding: 11px 14px;
    border: 0;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.user-menu-item:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.logout-button {
    color: #b91c1c;
}

.message.error {
    background: #fef2f2;
    color: #b91c1c;
}

.hidden {
    display: none !important;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.link-button:hover {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
}

td {
    color: #111827;
    font-size: 15px;
}

tr:last-child td {
    border-bottom: 0;
}

.auth-message {
    margin-top: 12px;
}

.lead {
    margin: 0 0 28px;
    color: #526071;
    font-size: 16px;
    line-height: 1.6;
}

.status {
    margin-bottom: 20px;
    padding: 14px 16px;
    border: 1px solid #c8d7ee;
    border-radius: 8px;
    background: #eef5ff;
    color: #1e3a8a;
    font-size: 14px;
}

.status.error {
    border-color: #fecaca;
    background: #fff1f2;
    color: #991b1b;
}

.summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 28px;
}

.summary-item {
    min-width: 0;
    padding: 16px;
    border: 1px solid #d9e1ec;
    border-radius: 8px;
    background: #ffffff;
}

.summary-item dt {
    margin-bottom: 6px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.summary-item dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: #111827;
    font-size: 18px;
    font-weight: 700;
}

.section-title {
    margin: 0 0 12px;
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: 0;
}

.feature-table-wrap {
    overflow-x: auto;
    border: 1px solid #d9e1ec;
    border-radius: 8px;
    background: #ffffff;
}

.user-name {
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 700;
}

.user-email {
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.message {
    margin-top: 12px;
    padding: 12px;
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 14px;
}

main {
    padding: 48px 0;
}

p {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
}

.link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: middle;
}

th {
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.empty {
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #64748b;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.status-pill.available {
    background: #dcfce7;
    color: #166534;
}

.status-pill.pending {
    background: #fef3c7;
    color: #92400e;
}

.status-pill.activated,
.status-pill.revoked,
.status-pill.expired {
    background: #f1f5f9;
    color: #475569;
}
