:root {
    color-scheme: light dark;
    --background: #f6f8fc;
    --surface: #ffffff;
    --text: #202124;
    --secondary: #626871;
    --line: #e1e5eb;
    --accent: #d3e3fd;
    --accent-text: #174174;
    --hover: #eaf0f7;
}

@media not all {
    :root {
        --background: #17191d;
        --surface: #24272d;
        --text: #e7e9ed;
        --secondary: #aab2bf;
        --line: #3b4048;
        --accent: #304968;
        --accent-text: #d8e8ff;
        --hover: #303640;
    }
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font: 14px/1.5 Arial, sans-serif;
}

header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 24px;
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--background);
    border-bottom: 1px solid var(--line);
}

.brand {
    font-size: 25px;
    font-weight: 500;
    letter-spacing: -1px;
}

#identity {
    margin-left: auto;
    color: var(--secondary);
}

main {
    max-width: 1600px;
    margin: auto;
    padding: 16px;
}

h1 {
    font-size: 23px;
    font-weight: 500;
    margin-top: 0;
}

h2 {
    font-size: 19px;
    font-weight: 500;
}

button, input {
    font: inherit;
}

button {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 9px 16px;
    cursor: pointer;
    margin: 3px;
}

button:hover {
    background: var(--hover);
}

button:focus-visible, input:focus-visible {
    outline: 2px solid #648bc8;
    outline-offset: 2px;
}

button[type="submit"] {
    background: var(--accent);
    color: var(--accent-text);
    border: none;
    font-weight: 600;
}

input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
}

label {
    display: block;
    margin: 12px 0;
}

form {
    max-width: 420px;
}

#login {
    max-width: 440px;
    margin: 8vh auto;
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
}

.mail-layout {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 18px;
}

#mail-navigation nav {
    display: flex;
    flex-direction: column;
}

#mail-navigation button {
    text-align: left;
    background: transparent;
    border: none;
}

#mail-navigation button.active {
    background: var(--accent);
    color: var(--accent-text);
    font-weight: 600;
}

#mail-navigation button:hover {
    background: var(--hover);
}

#sidebar-summary {
    padding: 16px;
    margin-top: 20px;
    color: var(--secondary);
    border-top: 1px solid var(--line);
}

.mail-content, #admin {
    min-width: 0;
    background: var(--surface);
    padding: 24px;
    border-radius: 20px;
}

.search-box {
    margin: 0 0 16px;
}

.search-box input {
    background: var(--background);
    border: none;
    border-radius: 28px;
    padding: 14px 20px;
    max-width: 680px;
}

#summary {
    color: var(--secondary);
    margin-bottom: 8px;
}

#messages {
    margin-top: 16px;
}

.message-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    padding: 14px 12px;
    margin: 0;
    border: none;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    overflow-wrap: anywhere;
}

.message-open {
    flex: 1 1 auto;
    min-width: 0;
    display: block;
    text-align: left;
    background: transparent;
    border: none;
    border-radius: 0;
    margin: 0;
    padding: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
    overflow-wrap: anywhere;
}

.message-line1 {
    display: block;
}

.message-to {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 400;
    color: var(--secondary);
}

.copy-otp {
    flex: 0 0 auto;
    font-size: 12px;
    padding: 5px 10px;
    margin: 0;
    white-space: nowrap;
}

.message-meta {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 10px;
    margin: 4px 0 12px;
    font-size: 13px;
    color: var(--secondary);
}

.message-meta dt {
    font-weight: 600;
}

.message-meta dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.message-row.unread {
    font-weight: 600;
}

.message-row:not(.unread) {
    background: var(--background);
}

.message-row:hover {
    background: var(--hover);
}

#message {
    margin-top: 20px;
    padding: 20px;
    border-top: 1px solid var(--line);
}

#sender {
    color: var(--secondary);
}

pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font: inherit;
}

details {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin: 14px 0;
}

summary {
    cursor: pointer;
    font-weight: 500;
}

.account-row {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

#password-panel {
    max-width: 600px;
    background: var(--surface);
}

#notice {
    color: var(--secondary);
    padding: 8px;
    overflow-wrap: anywhere;
}

@media (max-width: 700px) {
    main { padding: 8px; }

    header { padding: 10px 14px; }

    .mail-layout {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    #mail-navigation nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    #sidebar-summary {
        display: none;
    }

    .mail-content, #admin {
        padding: 16px;
    }
}

#admin {
    background: transparent;
    padding: 0;
}

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

.admin-sidebar button {
    border: none;
    background: transparent;
    text-align: left;
}

.admin-sidebar button.active {
    background: var(--accent);
    color: var(--accent-text);
    font-weight: 600;
}

.admin-sidebar button:hover {
    background: var(--hover);
}

#admin-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.metric-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    background: var(--background);
    border: 1px solid var(--line);
    border-radius: 16px;
}

.metric-card span {
    color: var(--secondary);
}

.metric-card strong {
    font-size: 28px;
    font-weight: 500;
}

#generated-invite:not(:empty) {
    padding: 16px;
    background: var(--background);
    border: 1px solid var(--line);
    border-radius: 12px;
    font-family: monospace;
}

@media (max-width: 700px) {
    .admin-sidebar nav {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

.help-nav-link {
    display: block;
    padding: 10px 16px;
    border-radius: 0 24px 24px 0;
    text-decoration: none;
    color: inherit;
    font-size: 14px;
}

.help-nav-link:hover {
    background: var(--hover, rgba(128,128,128,.12));
}

.help-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px 28px;
}

.help-header strong {
    font-size: 23px;
}

.help-header a {
    margin-left: auto;
    color: inherit;
}

.help-shell {
    display: grid;
    grid-template-columns: 240px minmax(0,1fr);
    gap: 24px;
    width: 100%;
    max-width: 1250px;
    margin: auto;
    padding: 16px;
}

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

.help-content {
    min-width: 0;
    padding: 28px;
    border-radius: 20px;
    background: var(--surface, transparent);
}

.help-content section {
    margin-bottom: 24px;
    padding: 20px;
    border: 1px solid var(--line, rgba(128,128,128,.25));
    border-radius: 16px;
    scroll-margin-top: 20px;
}

.help-content p,
.help-content li {
    line-height: 1.65;
}

.help-content pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    padding: 16px;
    border: 1px solid var(--line, rgba(128,128,128,.25));
    border-radius: 8px;
}

.help-table {
    width: 100%;
    border-collapse: collapse;
}

.help-table th,
.help-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--line, rgba(128,128,128,.25));
}

@media (max-width: 760px) {
    .help-shell {
        grid-template-columns: 1fr;
    }

    .help-content {
        padding: 8px;
    }

    .help-sidebar nav {
        flex-direction: row;
        flex-wrap: wrap;
    }
}


/* RAQULA DEFAULT LIGHT MODE */

:root {
    color-scheme: light;
}

[hidden] {
    display: none !important;
}

#generated-invite {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* DEDICATED ACCOUNT PAGES */

body:not([data-page="settings"]) #password-panel,
body:not([data-page="api"]) #api-panel,
body:not([data-page="settings"]):not([data-page="api"]) #account-page-title {
    display: none !important;
}

body[data-page="settings"] #inbox-view,
body[data-page="api"] #inbox-view {
    display: none !important;
}

body[data-page="settings"] #password-panel,
body[data-page="api"] #api-panel {
    width: 100%;
    max-width: 720px;
    margin: 20px 0;
    padding: 24px;
}

body[data-page="register"] #login-form,
body[data-page="register"] #login > h1 {
    display: none !important;
}

body[data-page="register"] #login {
    max-width: 520px;
    margin: 40px auto;
}

#inbox-view {
    min-height: 480px;
}

#messages {
    border: 1px solid #d3d9e2;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 18px;
}

#messages:empty {
    border: none;
}

#messages button {
    min-height: 62px;
    padding: 16px 20px;
    border-bottom: 1px solid #d3d9e2;
    border-radius: 0;
    text-align: left;
}

#messages button:hover {
    background: #e8f0fe;
    box-shadow: inset 4px 0 #1a73e8;
}

#message:not([hidden]) {
    border: 1px solid #d3d9e2;
    border-radius: 12px;
    padding: 32px;
    background: #fff;
}

#message #body {
    font-family: Arial, sans-serif;
    font-size: 15px;
    line-height: 1.75;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

#message #sender {
    padding-bottom: 18px;
    border-bottom: 1px solid #d3d9e2;
}



.brand-home {
    color: inherit;
    text-decoration: none;
}

.brand-home:hover {
    color: #174ea6;
}

[hidden] {
    display: none !important;
}

.account-information {
    border: 1px solid #d7dde5;
    border-radius: 12px;
    padding: 20px;
    margin: 18px 0;
    background: #fff;
}

.account-information p {
    line-height: 1.6;
    overflow-wrap: anywhere;
}

#internal-dialog {
    width: min(680px, 90vw);
    max-height: 85vh;
    overflow: auto;
    padding: 28px;
    border: 1px solid #d7dde5;
    border-radius: 16px;
    background: #fff;
    color: #202124;
}

#internal-dialog::backdrop {
    background: rgba(0,0,0,.3);
}

#internal-dialog form,
#internal-dialog fieldset {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

#internal-dialog textarea,
#internal-dialog input:not([type="checkbox"]) {
    width: 100%;
    box-sizing: border-box;
    font: inherit;
    padding: 12px;
}

#internal-dialog pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font: inherit;
    line-height: 1.7;
}

#nav-compose {
    background: #c2e7ff;
    color: #001d35;
    font-weight: 600;
    border-radius: 16px;
}

#messages .official-message {
    border-left: 4px solid #0b57d0;
}



#internal-dialog .recipient-choice {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px;
    border: 1px solid #d7dde5;
    border-radius: 8px;
    cursor: pointer;
}

#internal-dialog input[type="checkbox"] {
    appearance: auto;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin: 0;
    accent-color: #0b57d0;
    cursor: pointer;
}

#internal-dialog .recipient-choice:hover {
    background: #e8f0fe;
}

#internal-dialog fieldset:disabled {
    opacity: .5;
}


/* CONSISTENT ADMINISTRATOR INTERFACE */

.unified-admin > :not(.unified-sidebar):not(#sidebar-summary) {
    display: none !important;
}

.unified-sidebar {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.unified-sidebar .unified-link {
    display: block;
    color: #303134;
    text-decoration: none;
    font-size: 14px;
    padding: 13px 18px;
    border-radius: 24px;
}

.unified-sidebar .unified-link:visited {
    color: #303134;
}

.unified-sidebar .unified-link:hover {
    background: #e5e9ef;
}

.unified-sidebar .unified-active {
    background: #d3e3fd;
    color: #174ea6 !important;
    font-weight: 600;
}

.unified-sidebar .compose-link {
    background: #c2e7ff;
    font-weight: 600;
    border-radius: 16px;
    margin-bottom: 12px;
    padding: 17px 20px;
}

.unified-heading {
    font-size: 12px;
    font-weight: 600;
    color: #5f6368;
    text-transform: uppercase;
    letter-spacing: .6px;
    padding: 18px 18px 5px;
}

#accounts {
    display: grid;
    gap: 18px;
    margin-top: 22px;
}

#accounts .managed-account {
    background: #fff;
    border: 1px solid #d7dde5;
    border-radius: 14px;
    padding: 22px;
}

.managed-account-info {
    padding-bottom: 16px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.managed-account-info h2 {
    font-size: 20px;
    margin: 0 0 12px;
}

.account-type,
.account-enabled,
.account-disabled {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 8px 6px 0;
    border-radius: 16px;
    font-size: 12px;
}

.account-type {
    color: #174ea6;
    background: #e8f0fe;
}

.account-enabled {
    color: #146c43;
    background: #e6f4ea;
}

.account-disabled {
    color: #9b3030;
    background: #fce8e6;
}

.account-policy {
    color: #5f6368;
    font-size: 14px;
    margin: 8px 0 0;
}

#accounts .managed-account button {
    margin: 4px;
}

#accounts .managed-account details {
    margin: 12px 0;
}


.sidebar-group {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    margin: 4px 0 !important;
}

.sidebar-group > summary {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #5f6368;
    padding: 12px 10px;
    cursor: pointer;
}

.sidebar-group > a,
.sidebar-group > button {
    display: block;
    width: 100%;
    text-align: left;
}

.sender-rule-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
    overflow-wrap: anywhere;
}



.invitation-feedback {
    border: 1px solid #d7dde5;
    background: #f5f7fa;
    padding: 14px;
    border-radius: 8px;
    font-weight: 500;
}


/* PUBLIC WELCOME PAGE */

body:not([data-page="register"]) #login:not([hidden]) {
    max-width: 1050px;
    margin: 50px auto;
    padding: 40px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    column-gap: 48px;
    align-items: start;
}

#welcome-panel {
    grid-column: 1;
    grid-row: 1 / span 10;
    padding-right: 30px;
    border-right: 1px solid #d7dde5;
}

#welcome-panel h1 {
    font-size: 34px;
    letter-spacing: -1px;
    margin-bottom: 20px;
}

#welcome-panel h2 {
    font-size: 17px;
    margin-top: 28px;
}

#welcome-panel li {
    margin: 12px 0;
    line-height: 1.5;
}

.welcome-intro {
    color: #5f6368;
    font-size: 16px;
    line-height: 1.7;
}

body[data-page="register"] #welcome-panel {
    display: none !important;
}

@media (max-width: 760px) {
    body:not([data-page="register"]) #login:not([hidden]) {
        display: block;
        margin: 20px;
        padding: 24px;
    }

    #welcome-panel {
        border: 0;
        padding: 0 0 20px;
        margin-bottom: 24px;
    }
}


/* COMPACT ACCOUNT DIRECTORY */

#account-directory-search {
    width: 100%;
    box-sizing: border-box;
    margin: 16px 0 0;
    padding: 12px 16px;
}

#accounts {
    gap: 8px;
    margin-top: 12px;
}

#accounts .managed-account {
    padding: 0;
    overflow: hidden;
}

#accounts .managed-account-info {
    border: 0;
    margin: 0;
    padding: 18px;
}

#accounts .managed-account-info h2 {
    font-size: 17px;
    margin: 0 0 8px;
}

#accounts .account-expander {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

#accounts .account-expander > summary {
    cursor: pointer;
    position: relative;
    display: block;
    padding-right: 24px;
}

#accounts .account-expander > summary:hover {
    background: #f5f7fa;
}

.account-expander > summary::after {
    content: "⌄";
    position: absolute;
    right: 20px;
    top: 28px;
}

.account-expander[open] > summary::after {
    content: "⌃";
}

.account-control-group {
    margin: 0;
    padding: 16px 20px;
    border-top: 1px solid #e5e7eb;
}

.account-control-group h3 {
    font-size: 13px;
    font-weight: 600;
    color: #5f6368;
    margin: 0 0 10px;
}

.login-feedback {
    background: #fce8e6;
    color: #a12622;
    border: 1px solid #e6b8b4;
    border-radius: 8px;
    padding: 12px;
    line-height: 1.5;
}


/* FINAL ACCOUNT AND MAIL INTERFACE */

#account-directory-search {
    width: 100%;
    box-sizing: border-box;
    margin: 16px 0 0;
    padding: 12px 16px;
}

#accounts {
    gap: 8px;
    margin-top: 12px;
}

#accounts .managed-account {
    padding: 0;
    overflow: hidden;
}

#accounts .managed-account-info {
    border: 0;
    margin: 0;
    padding: 16px;
}

#accounts .managed-account-info h2 {
    font-size: 17px;
    margin: 0 0 8px;
}

#accounts .account-expander {
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
}

#accounts .account-expander > summary {
    cursor: pointer;
    position: relative;
    display: block;
    padding-right: 30px;
}

#accounts .account-expander > summary:hover {
    background: #f5f7fa;
}

.account-expander > summary::after {
    content: "⌄";
    position: absolute;
    right: 20px;
    top: 22px;
}

.account-expander[open] > summary::after {
    content: "⌃";
}

.account-control-group {
    padding: 16px 20px;
    border-top: 1px solid #e5e7eb;
}

.account-control-group h3 {
    font-size: 13px;
    font-weight: 600;
    color: #5f6368;
    margin: 0 0 10px;
}

.login-feedback {
    background: #fce8e6;
    color: #a12622;
    border: 1px solid #e6b8b4;
    border-radius: 8px;
    padding: 12px;
}

.empty-folder {
    color: #5f6368;
    text-align: center;
    padding: 32px 16px;
}


/* ADDRESS MANAGEMENT */

#address-generator {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:10px;
    margin:18px 0;
    padding:14px;
    border:1px solid #d7dde5;
    border-radius:10px;
}

#address-generator input {
    flex:1;
    min-width:180px;
}

.address-tool-status {
    flex-basis:100%;
    font-size:13px;
    margin:0;
}

.address-history-link {
    display:block;
    padding:10px 14px;
    text-decoration:none;
    color:inherit;
}

.address-history-link.unified-active {
    background:#e8f0fe;
    color:#174ea6;
}

body[data-page="address-history"] #inbox-view,
body[data-page="address-history"] #password-panel,
body[data-page="address-history"] #api-panel {
    display:none !important;
}

#address-history-panel {
    padding:20px 0;
}

#address-history-panel > input,
#address-history-panel > select {
    margin:10px 8px 16px 0;
    max-width:100%;
}

.history-list {
    display:grid;
    gap:12px;
}

.history-card {
    padding:18px;
    border:1px solid #d7dde5;
    border-radius:12px;
}

.history-card h3 {
    margin:0 0 10px;
    overflow-wrap:anywhere;
}

.history-card p {
    font-size:13px;
}

.history-card textarea {
    display:block;
    box-sizing:border-box;
    width:100%;
    margin:12px 0 4px;
    resize:vertical;
}

.history-card small {
    display:block;
    margin-bottom:12px;
}

.history-card span {
    margin-left:10px;
}

.history-status-controls {
    display:flex;
    gap:6px;
    flex-wrap:wrap;
}

.history-status-controls button[aria-pressed="true"] {
    outline:2px solid currentColor;
    outline-offset:1px;
    font-weight:600;
}

.history-status-controls button[data-status="active"] {
    color:#237447;
}

.history-status-controls button[data-status="inactive"] {
    color:#737373;
}

.history-status-controls button[data-status="paused"] {
    color:#946200;
}


.generator-extras {
    flex-basis:100%;
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    padding-top:12px;
    border-top:1px solid #d7dde5;
}

.generator-extras input,
.generator-extras textarea {
    flex-basis:100%;
    width:100%;
    box-sizing:border-box;
}

.generator-extras small,
.generator-extras p {
    flex-basis:100%;
    font-size:13px;
    margin:0;
}


/* Compact address tools */

#address-tools-drawer {
    border:1px solid #d7dde5;
    border-radius:12px;
    margin:16px 0;
    overflow:hidden;
}

#address-tools-drawer > summary {
    padding:14px 18px;
    cursor:pointer;
    font-size:14px;
    font-weight:600;
}

#address-tools-drawer[open] > summary {
    border-bottom:1px solid #d7dde5;
}

#address-tools-drawer[hidden],
#address-generator [hidden] {
    display:none !important;
}

#address-generator {
    border:none;
    margin:0;
    padding:16px;
    gap:8px;
}

#address-generator button {
    font-size:12px;
    padding:8px 14px;
    min-height:34px;
}

.generator-extras {
    padding-top:12px;
    gap:8px;
}

.generator-extras textarea {
    font:inherit;
    font-size:14px;
    padding:12px;
    border:1px solid #d7dde5;
    border-radius:8px;
    min-height:70px;
}

.generator-extras small {
    opacity:.7;
}


/* Aligned generator controls */

.generator-field-row {
    display:flex;
    align-items:center;
    gap:8px;
    width:100%;
    flex-basis:100%;
}

#address-generator .generator-field-row input {
    flex:1 1 0;
    min-width:0;
    width:0;
    height:40px;
}

.generator-field-row button {
    flex-shrink:0;
    white-space:nowrap;
}

.generator-field-row button:last-child {
    width:155px;
    min-width:155px;
}

.generator-note-actions {
    display:flex;
    align-items:center;
    gap:8px;
    width:100%;
}

.generator-note-actions small {
    flex:1;
    margin:0;
}

@media (max-width:600px) {
    .generator-field-row {
        flex-wrap:wrap;
    }

    #address-generator .generator-field-row input {
        flex:1 0 100%;
        width:100%;
    }

    .generator-field-row button:last-child {
        margin-left:auto;
    }
}



/* Account Generation */
#account-gen-panel .gen-intro {
    color: var(--secondary);
    max-width: 560px;
    margin: 6px 0 16px;
}

#account-gen-panel #ag-form {
    max-width: 560px;
    margin: 18px 0 28px;
}

.gen-row {
    display: block;
    margin: 14px 0;
}

.gen-row > span {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.gen-input {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.gen-input input,
.gen-input select {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
}

.gen-reroll {
    flex: 0 0 auto;
    width: 48px;
    margin: 0;
    font-size: 18px;
    line-height: 1;
}

.gen-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

#account-gen-panel #ag-save {
    background: var(--accent);
    color: var(--accent-text);
    border: none;
    font-weight: 600;
}

.gen-list-title {
    margin-top: 24px;
}

.gen-empty {
    color: var(--secondary);
}

.history-card .gen-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.history-card p strong {
    display: inline-block;
    min-width: 90px;
    color: var(--secondary);
    font-weight: 600;
}

.history-card code {
    overflow-wrap: anywhere;
}

.gen-account {
    margin: 0;
}

.gen-account > summary {
    cursor: pointer;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.gen-account[open] > summary {
    margin-bottom: 10px;
}

.nexon-chip {
    display: inline-block;
    font-size: 0.75em;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    vertical-align: middle;
    margin-left: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.nexon-pending  { background: #e0e0e0; color: #555; }
.nexon-created  { background: #fff3cd; color: #856404; }
.nexon-verified { background: #d4edda; color: #155724; }
.nexon-failed   { background: #f8d7da; color: #721c24; }


/* WELCOME BANNER */

#welcome-banner {
    background: #e8f0fe;
    border: 1px solid #c2d4f0;
    border-radius: 10px;
    padding: 14px 20px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
}

#welcome-banner a {
    color: #174ea6;
    font-weight: 600;
    text-decoration: underline;
}

#welcome-banner a:hover {
    color: #0d3b7a;
}


/* STANDARD USER FLAT SIDEBAR LINKS */

.sidebar-flat-link {
    display: block;
    text-align: left;
    text-decoration: none;
    color: inherit;
    background: transparent;
    padding: 9px 16px;
    border-radius: 20px;
    cursor: pointer;
    font: inherit;
    margin: 3px;
}

.sidebar-flat-link:hover {
    background: var(--hover);
}

.sidebar-flat-link.active {
    background: var(--accent);
    color: var(--accent-text);
    font-weight: 600;
}


/* ACCOUNT GENERATION PAGE — MATCH SETTINGS/API LAYOUT */

body[data-page="account-generation"] #inbox-view {
    display: none !important;
}

body[data-page="account-generation"] #account-gen-panel {
    max-width: 720px;
    margin: 20px 0;
}

body[data-page="account-generation"] #account-gen-panel > h1 {
    font-size: 23px;
    font-weight: 500;
    margin-top: 0;
}

body[data-page="account-generation"] #account-gen-panel .gen-intro {
    margin: 6px 0 20px;
}

body[data-page="account-generation"] #ag-form {
    border: 1px solid #d7dde5;
    border-radius: 12px;
    padding: 20px;
    background: #fff;
    max-width: 100%;
}

body[data-page="account-generation"] .gen-list-title {
    font-size: 19px;
    font-weight: 500;
}

body[data-page="account-generation"] .gen-account {
    border: 1px solid #d7dde5;
    border-radius: 12px;
    padding: 18px;
    background: #fff;
}

/* Nexon extension install banner */
.nexon-ext-banner {
    background: #f0f4ff;
    border: 1px solid #c5d5f7;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 18px;
}
.nexon-ext-banner strong { font-size: 1.05em; }
.nexon-ext-banner p { margin: 6px 0 10px; font-size: 0.9em; color: #444; }
.nexon-ext-install-btn {
    display: inline-block;
    padding: 8px 20px;
    background: #4a90d9;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
}
.nexon-ext-install-btn:hover { background: #3a7bc8; }
.nexon-ext-note { display: block; margin-top: 8px; color: #777; font-size: 0.8em; }
