/* Root wrapper */
.nt-pwdgen-wrapper {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 1rem;
    box-sizing: border-box;
}

/* Multi-tier grid layout */
.nt-pwdgen-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

/* Stack on smaller screens */
@media (max-width: 960px) {
    .nt-pwdgen-grid {
        grid-template-columns: 1fr;
    }
}

/* Card */
.nt-pwdgen-card {
    background: #04152b;
    border: 1px solid #3aa0ff;
    border-radius: 12px;
    padding: 1.5rem;
    color: #ffffff;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
    position: relative;
    overflow: hidden;
}

/* Subtle SAAS-style gradient overlay */
.nt-pwdgen-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(58, 160, 255, 0.18), transparent 55%);
    opacity: 0.9;
    pointer-events: none;
}

/* Ensure content is above overlay */
.nt-pwdgen-card > * {
    position: relative;
    z-index: 1;
}

/* Headers */
.nt-pwdgen-card-header {
    margin-bottom: 1.25rem;
}

.nt-pwdgen-title {
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.nt-pwdgen-subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: #d0e7ff;
}

/* Field group */
.nt-pwdgen-field-group {
    margin-bottom: 1rem;
}

.nt-pwdgen-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.nt-pwdgen-output-row {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

.nt-pwdgen-output {
    flex: 1;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #3aa0ff;
    background: rgba(0, 0, 0, 0.35);
    color: #ffffff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.nt-pwdgen-output:focus-visible {
    border-color: #5cc2ff;
    box-shadow: 0 0 0 1px #5cc2ff;
    background: rgba(0, 0, 0, 0.55);
}

/* Notes */
.nt-pwdgen-note {
    margin: 0.4rem 0 0;
    font-size: 0.8rem;
    color: #c5ddff;
}

/* Buttons */
.nt-pwdgen-btn {
    border-radius: 999px;
    border: 1px solid #3aa0ff;
    cursor: pointer;
    padding: 0.55rem 1.1rem;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.12s ease, border-color 0.12s ease;
    white-space: nowrap;
    background: transparent;
    color: #ffffff;
}

.nt-pwdgen-btn-primary {
    background: #1e90ff;
    box-shadow: 0 10px 25px rgba(30, 144, 255, 0.45);
}

.nt-pwdgen-btn-secondary {
    background: #0b6ed6;
    box-shadow: 0 8px 20px rgba(11, 110, 214, 0.4);
}

.nt-pwdgen-btn-ghost {
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.nt-pwdgen-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
    border-color: #5cc2ff;
}

.nt-pwdgen-btn:active {
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.nt-pwdgen-btn:focus-visible {
    outline: 2px solid #5cc2ff;
    outline-offset: 2px;
}

/* Copy feedback states */
.nt-pwdgen-btn-success {
    background: #1dd75b !important;
    border-color: #1dd75b !important;
}

.nt-pwdgen-btn-error {
    background: #ff4b4b !important;
    border-color: #ff4b4b !important;
}

/* Controls row */
.nt-pwdgen-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0 0.75rem;
}

/* Status text */
.nt-pwdgen-status {
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    color: #c5ddff;
    min-height: 1em;
}

/* Entropy meter */
.nt-pwdgen-entropy {
    border-top: 1px solid rgba(90, 160, 255, 0.35);
    padding-top: 1rem;
    margin-top: 0.75rem;
}

.nt-pwdgen-entropy-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

.nt-pwdgen-entropy-label {
    font-size: 0.9rem;
    font-weight: 500;
}

.nt-pwdgen-entropy-text {
    font-size: 0.85rem;
    color: #c5ddff;
}

.nt-pwdgen-entropy-bar-wrapper {
    margin: 0.35rem 0 0.4rem;
}

.nt-pwdgen-entropy-bar-bg {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.nt-pwdgen-entropy-bar-fill {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ff4b4b, #ffc857, #1dd75b);
    transition: width 0.18s ease-out;
}

/* Dual-panel entropy info */
.nt-pwdgen-entropy-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.25rem;
    margin: 0.35rem 0 0.4rem;
    font-size: 0.8rem;
    color: #e0ecff;
}

.nt-pwdgen-entropy-info-item {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
}

.nt-pwdgen-entropy-info-label {
    color: #9ca3af;
    font-weight: 500;
}

.nt-pwdgen-entropy-note {
    margin: 0;
    font-size: 0.78rem;
    color: #c5ddff;
}

/* --- TTC NOTE --- */
.nt-pwdgen-ttc-note {
    margin: 0 0 0.75rem;
    font-size: 0.75rem;
    color: #9fbfe8;
    opacity: 0.85;
}

/* --- TTC TABLE WITH FULL-WIDTH SEVERITY BARS (TEXT ABOVE BAR) --- */

.nt-pwdgen-ttc-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.75rem;
}

.nt-pwdgen-ttc-table th,
.nt-pwdgen-ttc-table td {
    padding: 0.45rem 0.6rem;
    font-size: 0.82rem;
}

.nt-pwdgen-ttc-table th {
    text-align: left;
    color: #9fbfe8;
    border-bottom: 1px solid rgba(90, 160, 255, 0.35);
}

.nt-pwdgen-ttc-table td {
    color: #e5f0ff;
}

/* Row container */
.nt-pwdgen-ttc-row {
    position: relative;
    --nt-ttc-width: 0%;
}

/* Bar BELOW the text */
.nt-pwdgen-ttc-row::before {
    content: "";
    position: absolute;
    left: 0.6rem;
    right: 0.6rem;
    bottom: 0.25rem;
    height: 6px;
    width: var(--nt-ttc-width, 0%);
    border-radius: 999px;
    opacity: 0.9;
    transition: width 0.25s ease-out;
    z-index: 0;
}

/* Text above bar */
.nt-pwdgen-ttc-row > td {
    position: relative;
    z-index: 2;
    padding-bottom: 0.35rem;
}

/* Label column */
.nt-pwdgen-ttc-row > td:first-child {
    color: #9fbfe8;
    font-weight: 500;
}

/* Row colors */
.nt-pwdgen-ttc-row:nth-child(1)::before { background-color: #ef4444; }
.nt-pwdgen-ttc-row:nth-child(2)::before { background-color: #f59e0b; }
.nt-pwdgen-ttc-row:nth-child(3)::before { background-color: #f97316; }
.nt-pwdgen-ttc-row:nth-child(4)::before { background-color: #22c55e; }
.nt-pwdgen-ttc-row:nth-child(5)::before { background-color: #eab308; }

/* Charset group */
.nt-pwdgen-charset-group {
    border: 1px solid rgba(90, 160, 255, 0.35);
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    margin-bottom: 1rem;
}

.nt-pwdgen-charset-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem 1rem;
    margin-top: 0.5rem;
}

@media (max-width: 600px) {
    .nt-pwdgen-charset-grid {
        grid-template-columns: 1fr;
    }
}

.nt-pwdgen-charset-option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #e0ecff;
}

.nt-pwdgen-charset-option input[type="checkbox"] {
    accent-color: #3aa0ff;
}

.nt-pwdgen-charset-label {
    cursor: pointer;
}

/* List & recommendations */
.nt-pwdgen-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
}

.nt-pwdgen-list li {
    margin-bottom: 0.75rem;
}

.nt-pwdgen-keynote {
    display: block;
    font-size: 0.9rem;
    color: #ffdd7a;
}

.nt-pwdgen-list-text {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    color: #e0ecff;
}

/* Tooltips */
.nt-pwdgen-tooltips-intro {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    color: #d0e7ff;
}

.nt-pwdgen-tooltips {
    border-top: 1px solid rgba(90, 160, 255, 0.35);
    padding-top: 0.9rem;
}

.nt-pwdgen-tooltip-trigger {
    margin: 0.15rem 0.35rem 0.15rem 0;
}

.nt-pwdgen-tooltip {
    display: none;
    margin: 0.25rem 0 0.5rem;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(90, 160, 255, 0.5);
    font-size: 0.8rem;
    color: #e0ecff;
}

.nt-pwdgen-tooltip a {
    color: #5cc2ff;
    text-decoration: none;
    font-weight: 500;
}

.nt-pwdgen-tooltip a:hover {
    text-decoration: underline;
}

/* Tooltip visible state */
.nt-pwdgen-tooltip.is-visible {
    display: block;
}

/* Warning text */
.nt-pwdgen-warning {
    margin: 0.5rem 0 0;
    font-size: 0.8rem;
    color: #ff9f7a;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
.nt-pwdgen-links {
    margin-top: 1.25rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.nt-pwdgen-link-btn {
    flex: 1;
    min-width: 160px;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    border: 1px solid #3aa0ff;
    background: rgba(0, 0, 0, 0.35);
    color: #e5f0ff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.15s ease;
    text-align: center;
}

.nt-pwdgen-link-btn:hover {
    background: #1e90ff;
    border-color: #5cc2ff;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 144, 255, 0.35);
}

.nt-pwdgen-link-btn:active {
    transform: translateY(0);
    box-shadow: none;
}
