.tms-auth-wrapper {
    max-width: 420px;
    margin: 40px auto;
    font-family: Arial, sans-serif;
}

.tms-auth-card {
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
}

.tms-auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.tms-auth-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.tms-auth-title {
    margin: 0;
    color: #1f2937;
    font-size: 24px;
}

.tms-auth-subtitle {
    color: #6b7280;
    margin: 5px 0 0;
    font-size: 14px;
}

/* Messages */
.tms-auth-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.tms-auth-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Form fields */
.tms-auth-field {
    margin-bottom: 20px;
}

.tms-auth-field-last {
    margin-bottom: 25px;
}

.tms-auth-label {
    display: block;
    color: #374151;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
}

.tms-auth-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.tms-auth-input:focus {
    border-color: #3b82f6;
    outline: none;
}

/* Remember me */
.tms-auth-remember {
    display: flex;
    align-items: center;
    color: #374151;
    font-size: 14px;
    cursor: pointer;
}

.tms-auth-remember input {
    margin-right: 8px;
    width: 16px;
    height: 16px;
}

/* Buttons */
.tms-auth-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.tms-auth-btn:hover {
    opacity: 0.9;
}

/* Footer */
.tms-auth-footer {
    text-align: center;
    color: #9ca3af;
    font-size: 12px;
    margin-top: 20px;
}

/* Links */
.tms-auth-links {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #6b7280;
}

.tms-auth-links a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.tms-auth-links a:hover {
    text-decoration: underline;
}

.tms-auth-links-divider {
    margin: 0 8px;
    color: #d1d5db;
}

/* Password strength indicator */
.tms-auth-password-hint {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 5px;
}

.tms-auth-form-group {
    margin-bottom: 20px;
}

/* ── Register: username generator, helper notes, consent ─────────────── */
.tms-auth-input-row{display:flex;gap:8px;align-items:stretch}
.tms-auth-input-row .tms-auth-input,
.tms-auth-input-row .tms-form-input{flex:1 1 auto;min-width:0}
.tms-auth-genbtn{flex:0 0 auto;padding:0 14px;border:1px solid #c9cdd6;border-radius:8px;background:#f6f7f9;color:#3a3f4a;font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap;transition:background .15s,opacity .15s}
.tms-auth-genbtn:hover{background:#eceef2}
.tms-auth-genbtn:disabled{opacity:.6;cursor:default}
.tms-auth-note{margin:6px 2px 0;font-size:12px;line-height:1.5;color:#6b7280}
.tms-auth-consent{margin-top:4px}
.tms-auth-consent label{display:flex;gap:9px;align-items:flex-start;font-size:13px;line-height:1.5;color:#374151;cursor:pointer}
.tms-auth-consent input[type=checkbox]{margin:2px 0 0;flex:0 0 auto}
.tms-auth-consent a{color:#4b3b8f;text-decoration:underline}

/* ── Legal pages (Privacy Policy / Terms of Use / PDPA Notice) ───────── */
.tms-legal-wrapper{max-width:820px;margin:0 auto;padding:40px 18px 56px}
.tms-legal-card{background:#fff;border:1px solid #e6e8ee;border-radius:12px;padding:32px 38px 38px;box-shadow:0 1px 3px rgba(0,0,0,.05)}
.tms-legal-title{font-size:28px;line-height:1.2;font-weight:700;margin:0 0 18px;color:#1f2430}
.tms-legal-body{font-size:15px;line-height:1.7;color:#374151}
.tms-legal-body h2{font-size:18px;font-weight:700;color:#1f2430;margin:26px 0 8px}
.tms-legal-body p{margin:0 0 14px}
.tms-legal-body ul,.tms-legal-body ol{margin:0 0 14px;padding-left:22px}
.tms-legal-body li{margin-bottom:6px}
.tms-legal-body a{color:#4b3b8f}
.tms-legal-back{margin:24px 0 0;font-size:13px;color:#6b7280}
.tms-legal-back a{color:#4b3b8f;text-decoration:none}
.tms-legal-back a:hover{text-decoration:underline}
.tms-legal-footer{text-align:center;color:#9ca3af;font-size:12px;margin:18px 0 0}
@media(max-width:560px){.tms-legal-card{padding:22px 18px 26px}}
