/* =========================================================
   ADD WITTE ID — auth & dashboard styles (warm theme)
   Load after css/site.css (provides CSS variables + base).
   ========================================================= */

/* ---------- Centered auth layout ---------- */
.id-container {
    max-width: 460px;
    margin: 12vh auto 5vh;
    padding: 0 1.5rem;
    text-align: center;
}
.id-main {
    margin-top: 2rem;
}

/* ---------- Cards & alerts ---------- */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 2.25rem;
    box-shadow: var(--shadow);
    text-align: left;
}
.alert {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    border: 1px solid transparent;
}
.alert-danger {
    background: rgba(255, 93, 115, 0.1);
    border-color: rgba(255, 93, 115, 0.3);
    color: #d6455a;
}
.alert-success {
    background: rgba(0, 180, 132, 0.1);
    border-color: rgba(0, 180, 132, 0.3);
    color: #0a9a71;
}
[data-theme="dark"] .alert-danger { color: #ff8a9a; }
[data-theme="dark"] .alert-success { color: #5fe0b8; }

/* ---------- Header ---------- */
.id-header {
    margin-bottom: 2.25rem;
}
.logo-text {
    font-family: var(--font);
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    margin-bottom: 1.1rem;
}
.id-header h1 {
    font-family: var(--font);
    font-size: 2rem;
    color: var(--ink);
    margin-bottom: 0.5rem;
}
.accent-text {
    background: linear-gradient(120deg, #ff5d73, #ffb25c);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.subtitle {
    color: var(--muted);
    font-size: 0.95rem;
}

/* ---------- Forms ---------- */
.form-group {
    margin-bottom: 1.4rem;
}
.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 0.5rem;
}
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.input-text {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 2.7rem;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 15px;
    color: var(--ink);
    font-family: "Inter", system-ui, sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: 0.25s;
}
.input-text:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 93, 115, 0.15);
    background: var(--card);
}
.input-icon {
    position: absolute;
    left: 1rem;
    width: 18px;
    height: 18px;
    color: var(--muted);
    pointer-events: none;
}
.input-text:focus + .input-icon {
    color: var(--accent);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.8rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    transition: 0.25s;
}
.btn-primary {
    background: var(--ink);
    color: var(--bg);
    box-shadow: 0 10px 30px rgba(34, 26, 43, 0.2);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(34, 26, 43, 0.28);
}
.btn-secondary {
    background: var(--card);
    color: var(--ink);
    border: 1px solid var(--line);
}
.btn-secondary:hover {
    background: var(--ink);
    color: var(--bg);
}
.btn-sm {
    padding: 0.45rem 1rem;
    font-size: 0.8rem;
}
.btn-lg {
    padding: 1rem 2.4rem;
    font-size: 1.05rem;
}

/* ---------- Options / checkbox / links ---------- */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-top: 1rem;
    color: var(--muted);
}
.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 1.75rem;
    cursor: pointer;
    user-select: none;
}
.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}
.checkmark {
    position: absolute;
    left: 0;
    height: 18px;
    width: 18px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 5px;
    transition: 0.25s;
}
.checkbox-container:hover input ~ .checkmark {
    border-color: var(--accent);
}
.checkbox-container input:checked ~ .checkmark {
    background: var(--accent);
    border-color: var(--accent);
}
.checkbox-container .checkmark::after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.checkbox-container input:checked ~ .checkmark::after {
    display: block;
}
.forgot-password {
    color: var(--muted);
    font-weight: 500;
}
.forgot-password:hover {
    color: var(--accent);
}
.required {
    color: #d6455a;
}
.auth-helper {
    margin-top: 1.75rem;
    font-size: 0.9rem;
    color: var(--muted);
}
.auth-helper a {
    color: var(--accent);
    font-weight: 600;
}
.auth-helper a:hover {
    text-decoration: underline;
}
.icon-svg {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

/* ---------- Dashboard ---------- */
.dashboard-wrapper {
    max-width: 1200px;
    margin: 7rem auto 4rem;
    padding: 0 1.5rem;
}
.dashboard-header {
    margin-bottom: 3rem;
    text-align: left;
}
.dashboard-header h1 {
    font-family: var(--font);
    font-size: 2.5rem;
    color: var(--ink);
    margin-bottom: 0.4rem;
}
.dashboard-header h1 em {
    font-style: normal;
    background: linear-gradient(120deg, #ff5d73, #ffb25c);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.dashboard-container-tabs {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
    align-items: start;
}
@media (max-width: 900px) {
    .dashboard-container-tabs {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}
.dashboard-sidebar {
    background: var(--glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 1.75rem;
    box-shadow: var(--shadow);
}
.user-quick-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--line);
}
.user-avatar-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--grad);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: 0 10px 24px rgba(255, 93, 115, 0.3);
}
.user-avatar-initial {
    font-family: var(--font);
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
}
.user-quick-profile h3 {
    font-size: 1.1rem;
    color: var(--ink);
    margin-bottom: 0.25rem;
}
.user-role-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    background: rgba(255, 93, 115, 0.1);
    padding: 0.2rem 0.7rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 93, 115, 0.3);
}
.dashboard-tabs {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
@media (max-width: 900px) {
    .dashboard-tabs {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
}
.tab-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.2rem;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 500;
    color: var(--muted);
    transition: 0.25s;
    border: 1px solid transparent;
    text-align: left;
    background: transparent;
    width: 100%;
    font-family: inherit;
}
.tab-item:hover {
    color: var(--ink);
    background: var(--card);
}
.tab-item.active {
    color: var(--accent);
    background: rgba(255, 93, 115, 0.08);
    border-color: rgba(255, 93, 115, 0.3);
    font-weight: 600;
}
.tab-badge {
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bg);
    color: var(--muted);
    border: 1px solid var(--line);
    padding: 0.05rem 0.4rem;
    border-radius: 6px;
    margin-left: auto;
}
.dashboard-content {
    min-height: 400px;
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
    animation: tabFadeIn 0.4s ease forwards;
}
@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.card-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--line);
    color: var(--accent);
}
.card-title-wrapper h2 {
    font-family: var(--font);
    font-size: 1.3rem;
    color: var(--ink);
}
.profile-details {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed var(--line);
}
.detail-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.detail-label {
    color: var(--muted);
    font-size: 0.9rem;
}
.detail-value {
    color: var(--ink);
    font-weight: 600;
    font-size: 0.95rem;
}
.section-desc {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}
.sessions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.no-sessions {
    color: var(--muted);
    font-style: italic;
    text-align: center;
    padding: 2rem;
}
.session-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
    border-radius: 16px;
    background: var(--bg);
    border: 1px solid var(--line);
    transition: 0.25s;
}
.session-item:hover {
    border-color: var(--line);
}
.session-item.current {
    border-color: rgba(255, 93, 115, 0.4);
    background: rgba(255, 93, 115, 0.05);
}
.session-icons {
    display: flex;
    gap: 0.5rem;
}
.os-icon-wrapper, .browser-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--card);
    border: 1px solid var(--line);
    color: var(--muted);
}
.session-item.current .os-icon-wrapper,
.session-item.current .browser-icon-wrapper {
    border-color: rgba(255, 93, 115, 0.3);
    color: var(--accent);
}
.session-info {
    flex-grow: 1;
}
.session-device {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}
.session-device h3 {
    font-size: 1rem;
    color: var(--ink);
}
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
}
.badge-active {
    background: rgba(0, 180, 132, 0.12);
    border: 1px solid rgba(0, 180, 132, 0.4);
    color: #0a9a71;
}
.session-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--muted);
}
.session-action {
    display: flex;
    align-items: center;
}
.btn-revoke {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.25s;
}
.btn-revoke:hover {
    background: rgba(255, 93, 115, 0.12);
    border-color: var(--accent);
    color: #d6455a;
    transform: scale(1.08);
}

/* ---------- OAuth apps ---------- */
.oauth-app-item {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.25rem;
    background: var(--bg);
}
.oauth-app-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.oauth-app-head strong {
    font-family: var(--font);
    font-size: 1.1rem;
    color: var(--ink);
}
.oauth-app-edit details > summary {
    cursor: pointer;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 1rem;
}
.oauth-app-edit summary:hover {
    text-decoration: underline;
}
.oauth-secret-once code {
    display: block;
    font-family: ui-monospace, monospace;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    margin: 0.35rem 0;
    word-break: break-all;
    color: var(--ink);
}
.oauth-secret-once small {
    display: block;
    margin-top: 0.4rem;
}
textarea.input-text {
    font-family: "Inter", system-ui, sans-serif;
    resize: vertical;
}

/* ---------- OAuth consent screen ---------- */
.oauth-app-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
}
.oauth-app-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--grad);
    color: #fff;
    font-family: var(--font);
    font-size: 26px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(255, 93, 115, 0.3);
}
.oauth-app-banner h2 {
    font-family: var(--font);
    font-size: 1.2rem;
    color: var(--ink);
}
.oauth-scope-list {
    list-style: none;
    margin: 0.5rem 0 0;
    text-align: left;
}
.oauth-scope-list li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--muted);
    font-size: 0.95rem;
    padding: 0.5rem 0;
}
.oauth-scope-badge {
    font-family: ui-monospace, monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    background: rgba(255, 93, 115, 0.1);
    border: 1px solid rgba(255, 93, 115, 0.3);
    border-radius: 6px;
    padding: 0.1rem 0.45rem;
    flex-shrink: 0;
}


