.tmm-portal {
    width: min(100% - 32px, 960px);
    margin: clamp(28px, 6vw, 72px) auto;
    color: #f8fafc;
}

.tmm-portal,
.tmm-portal * {
    box-sizing: border-box;
}

.tmm-portal a {
    color: #ff8a3d;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.tmm-portal h2,
.tmm-portal h3,
.tmm-portal p {
    margin-top: 0;
}

.tmm-portal h2 {
    margin-bottom: 14px;
    font-size: clamp(34px, 4vw, 56px);
    line-height: 1.02;
    letter-spacing: 0;
}

.tmm-portal h3 {
    margin-bottom: 14px;
    font-size: 17px;
    line-height: 1.25;
}

.tmm-portal-section,
.tmm-portal-license-card,
.tmm-portal form#tmm-portal-login-form {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(20, 24, 31, 0.94), rgba(8, 10, 14, 0.9));
    box-shadow: 0 22px 64px rgba(0, 0, 0, 0.34);
}

.tmm-portal-logged-out {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.tmm-portal-logged-out > p {
    max-width: 760px;
    margin-bottom: 28px;
    color: #c7cad1;
    font-size: clamp(17px, 2vw, 23px);
    line-height: 1.45;
}

.tmm-portal form#tmm-portal-login-form {
    display: grid;
    gap: 18px;
    max-width: 520px;
    padding: 24px;
}

.tmm-portal form#tmm-portal-login-form p {
    margin: 0;
}

.tmm-portal form#tmm-portal-login-form label {
    display: block;
    margin-bottom: 8px;
    color: #f3f4f6;
    font-size: 15px;
    font-weight: 700;
}

.tmm-portal form#tmm-portal-login-form input[type="text"],
.tmm-portal form#tmm-portal-login-form input[type="password"] {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 10px 12px;
    font: inherit;
}

.tmm-portal form#tmm-portal-login-form input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0 8px 0 0;
    vertical-align: middle;
}

.tmm-portal form#tmm-portal-login-form .login-remember label {
    display: inline-flex;
    align-items: center;
    margin: 0;
    color: #d7d9df;
    font-weight: 600;
}

.tmm-portal button,
.tmm-portal input[type="submit"],
.tmm-portal .button {
    min-height: 40px;
    border: 0;
    border-radius: 6px;
    background: #ff7a1a;
    color: #101114;
    padding: 10px 14px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.tmm-portal button:hover,
.tmm-portal input[type="submit"]:hover,
.tmm-portal .button:hover {
    background: #ff9342;
}

.tmm-portal-lost-password {
    margin-top: 20px;
}

.tmm-portal-dashboard {
    display: grid;
    gap: 18px;
}

.tmm-portal-dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.tmm-portal-dashboard-header h2 {
    margin-bottom: 0;
}

.tmm-portal-signout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: #f8fafc !important;
    padding: 9px 13px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.tmm-portal-signout-button:hover {
    border-color: rgba(255, 122, 26, 0.64);
    background: rgba(255, 122, 26, 0.14);
    color: #fff !important;
}

.tmm-portal-section {
    padding: 22px;
}

.tmm-portal-license-card {
    position: relative;
    overflow: hidden;
    padding: 22px;
    margin-bottom: 16px;
}

.tmm-portal-license-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 12% 0%, rgba(255, 122, 26, 0.18), transparent 34%);
}

.tmm-portal-license-card > * {
    position: relative;
}

.tmm-portal-license-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.tmm-portal-license-head strong {
    color: #fff;
    font-size: 22px;
    line-height: 1.15;
}

.tmm-portal-license-status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #08110c;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0;
}

.tmm-portal-status-active { background: #6ff3a5; }
.tmm-portal-status-grace { background: #ffd76b; }
.tmm-portal-status-expired,
.tmm-portal-status-disabled { background: #ff8c8c; }

.tmm-portal-license-key {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.tmm-portal-license-key code {
    max-width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #f9fafb;
    padding: 9px 10px;
    overflow-wrap: anywhere;
}

.tmm-portal-license-key button,
.tmm-portal-download-button,
.tmm-portal-deactivate-button {
    min-height: 36px;
    padding: 8px 12px;
}

.tmm-portal-license-meta {
    color: #c7cad1;
}

.tmm-portal-sites-table,
.tmm-portal-orders-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 0;
    color: #f8fafc;
}

.tmm-portal-sites-table th,
.tmm-portal-sites-table td,
.tmm-portal-orders-table th,
.tmm-portal-orders-table td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    vertical-align: middle;
}

.tmm-portal-sites-table th,
.tmm-portal-orders-table th {
    color: #fff;
    font-size: 13px;
    text-transform: uppercase;
}

.tmm-portal-support ul {
    display: grid;
    gap: 8px;
    margin: 0 0 20px;
    padding-left: 20px;
}

.tmm-portal-notice {
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.tmm-portal-notice-success {
    background: rgba(72, 211, 126, 0.16);
    color: #c9f8d9;
}

.tmm-portal-notice-error {
    background: rgba(255, 122, 122, 0.16);
    color: #ffd4d4;
}

@media (max-width: 700px) {
    .tmm-portal {
        width: min(100% - 24px, 960px);
        margin-top: 28px;
    }

    .tmm-portal-logged-out {
        margin-left: auto;
    }

    .tmm-portal-dashboard-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .tmm-portal-section,
    .tmm-portal-license-card,
    .tmm-portal form#tmm-portal-login-form {
        padding: 18px;
    }

    .tmm-portal-license-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .tmm-portal-sites-table,
    .tmm-portal-orders-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
