html, body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #101113;
    color: #eceff2;
}

body {
    padding: 32px 16px;
}

.shell {
    width: min(100%, 1200px);
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: stretch;
    min-height: calc(100vh - 64px);
}

.landing-shell {
    max-width: 760px;
    align-items: center;
}

.account-shell {
    justify-content: stretch;
}

.landing-wrap,
.account-page {
    width: 100%;
}

.landing-card {
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #8f7139;
    border-radius: 20px;
    background: linear-gradient(180deg, #1c1a16 0%, #15171a 100%);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34), inset 0 0 0 4px rgba(16, 17, 19, 0.9);
}

.logo-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    height: clamp(220px, 38vh, 300px);
    padding: 8px;
    overflow: hidden;
    border: 6px solid #17191c;
    border-bottom: 1px solid #8f7139;
    border-radius: 18px 18px 0 0;
    background: #000;
}

.logo-panel img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.65));
}

.portal-panel {
    overflow: visible;
    padding: 18px;
}

.portal-panel .panel {
    border: 0;
    background: transparent;
    padding: 0;
    margin-bottom: 0;
}

.panel h2, .panel h3 {
    margin: 0 0 8px;
    color: #d2aa57;
}

.account-head p {
    margin: 0;
    color: #9aa4af;
}

.panel, .flash {
    border: 1px solid #343a42;
    border-radius: 10px;
    background: #17191c;
    padding: 20px;
    margin-bottom: 16px;
}

.portal-panel > .panel:last-child,
.portal-panel > .flash:last-child {
    margin-bottom: 0;
}

.flash.success {
    border-color: #7fbd8866;
    background: rgba(127, 189, 136, 0.08);
}

.flash.error {
    border-color: #e06f5f80;
    background: rgba(224, 111, 95, 0.08);
}

.form {
    display: grid;
    gap: 10px;
}

.form label {
    display: grid;
    gap: 6px;
}

.form span, dt {
    color: #9aa4af;
    font-size: 0.95rem;
}

.form input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #343a42;
    border-radius: 8px;
    background: #101113;
    color: #eceff2;
    padding: 9px 10px;
    outline: none;
}

.form input:focus {
    border-color: #91c8e4;
    box-shadow: 0 0 0 1px rgba(145, 200, 228, 0.25);
}

button, .links a {
    display: inline-block;
    border: 1px solid #806533;
    border-radius: 8px;
    background: #d2aa57;
    color: #101113;
    text-decoration: none;
    padding: 9px 12px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

button:hover, .links a:hover {
    filter: brightness(1.06);
}

button.secondary {
    background: transparent;
    border: 1px solid #343a42;
    color: #eceff2;
    font-weight: normal;
}

button.secondary:hover {
    background: #1f2327;
    border-color: #4a5360;
}

.account-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 16px;
    margin-bottom: 18px;
}

.details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin: 0 0 18px;
}

.details div {
    border: 1px solid #343a42;
    border-radius: 8px;
    padding: 12px;
    background: #1f2327;
}

.details dd {
    margin: 6px 0 0;
    overflow-wrap: anywhere;
}

.links {
    margin-bottom: 18px;
}

.landing-download {
    margin: 14px 0 0;
    text-align: center;
}

.landing-download a {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.menu {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.menu a {
    border: 1px solid #343a42;
    border-radius: 999px;
    color: #eceff2;
    padding: 8px 12px;
    text-decoration: none;
}

.menu a.active, .menu a:hover {
    border-color: #d2aa57;
    color: #d2aa57;
}

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

.auth-grid .form span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.account-overview {
    min-height: calc(100vh - 150px);
}

.password-form {
    max-width: 520px;
}

.gm-command-table-wrap {
    max-height: 360px;
    overflow: auto;
    margin: 12px 0 22px;
    border: 1px solid #343a42;
    border-radius: 10px;
}

.gm-command-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.gm-command-table th,
.gm-command-table td {
    border-bottom: 1px solid #343a42;
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.gm-command-table th {
    position: sticky;
    top: 0;
    background: #17191c;
    color: #d2aa57;
    z-index: 1;
}

.gm-command-table tr:last-child td {
    border-bottom: 0;
}

.gm-command-table code {
    color: #91c8e4;
    white-space: nowrap;
}

.wide-panel {
    min-width: min(100%, 900px);
}

.inline-form {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.inline-form input {
    flex: 1;
    min-width: 0;
    border: 1px solid #343a42;
    border-radius: 8px;
    background: #101113;
    color: #eceff2;
    padding: 9px 10px;
}

.table-wrap {
    overflow-x: auto;
}

.account-table {
    border-collapse: collapse;
    width: 100%;
    min-width: 900px;
}

.account-table th, .account-table td {
    border-bottom: 1px solid #343a42;
    padding: 9px 8px;
    text-align: left;
    vertical-align: top;
}

.account-table th a {
    color: #d2aa57;
    text-decoration: none;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.actions form {
    margin: 0;
}

.actions button {
    padding: 6px 9px;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    body {
        padding: 16px;
    }
    .shell {
        min-height: calc(100vh - 32px);
    }
    .logo-panel {
        padding: 20px 16px;
    }
    .logo-panel img {
        width: min(100%, 220px);
    }
    .portal-panel {
        padding: 16px;
    }
    .account-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .auth-grid, .inline-form {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
}
