/* Cycodum UI - Dark gray (#161b23) + Blue (#328bbe) theme */

:root {
    --color-primary: #328bbe;
    --color-primary-hover: #2a75a5;
    --color-primary-light: rgba(50, 139, 190, 0.15);
    --color-dark: #161b23;
    --color-dark-muted: #242d38;
    --color-text: #333;
    --color-text-muted: #666;
    --color-border: #e0e0e0;
    --color-error-bg: #fef2f2;
    --color-error-border: #fecaca;
    --color-error-text: #c33;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-muted) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 420px;
}

.container.container-dashboard {
    max-width: 900px;
    min-width: 320px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

h1 {
    color: var(--color-text);
    font-size: 28px;
    margin-bottom: 8px;
    text-align: center;
}

.subtitle {
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: 32px;
    font-size: 14px;
}

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

label {
    display: block;
    color: var(--color-text);
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--color-border);
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
    outline: none;
    border-color: var(--color-primary);
}

input[readonly],
input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

input[type="email"]:invalid:not(:placeholder-shown),
input[type="password"]:invalid:not(:placeholder-shown) {
    border-color: var(--color-error-text);
}

.error-message {
    background-color: var(--color-error-bg);
    color: var(--color-error-text);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid var(--color-error-border);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(50, 139, 190, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.footer-text {
    text-align: center;
    margin-top: 24px;
    color: var(--color-text-muted);
    font-size: 14px;
}

.footer-text a {
    color: var(--color-primary);
    text-decoration: none;
}

.footer-text a:hover {
    text-decoration: underline;
}

/* Success page styles */
.success-icon {
    width: 80px;
    height: 80px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 24px;
    font-weight: bold;
}

.success-message {
    text-align: center;
    color: var(--color-text-muted);
    margin-bottom: 32px;
    line-height: 1.6;
}

/* Dashboard & Profile styles - consistent 8px spacing scale */
.user-info {
    margin-bottom: 0;
}

.user-details {
    text-align: left;
}

.user-details h2,
.dashboard-details h2 {
    color: var(--color-text);
    font-size: 24px;
    margin: 0 0 16px 0;
}

.dashboard-row {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

@media (max-width: 400px) {
    .dashboard-row {
        flex-direction: column;
    }
}

@media (max-width: 500px) {
    .dashboard-header {
        flex-direction: column;
    }
    .dashboard-header-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

.dashboard-avatar {
    flex-shrink: 0;
}

.dashboard-avatar .avatar,
.dashboard-avatar .avatar-placeholder {
    margin: 0;
}

.dashboard-details {
    flex: 1;
    min-width: 0;
}

.dashboard-details p,
.user-details p {
    color: var(--color-text-muted);
    margin: 0 0 6px 0;
    font-size: 14px;
    line-height: 1.5;
}

.dashboard-details p:last-child,
.user-details p:last-child {
    margin-bottom: 0;
}

.dashboard-details strong,
.user-details strong {
    color: var(--color-text);
}

/* Dashboard layout (Block 28 revamp) - 8px scale: 8, 12, 16, 20, 24 */
.dashboard-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.dashboard-header-main {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex: 1;
    min-width: 0;
}

.dashboard-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background: var(--color-dark);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: var(--color-dark-muted);
}

.btn-icon-profile {
    padding: 8px;
    background: var(--color-primary);
}

.btn-icon-profile:hover {
    background: var(--color-primary-hover);
}

.btn-icon-profile svg {
    display: block;
    color: white;
}

.info-bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
    cursor: help;
}

.info-bubble-small {
    width: 16px;
    height: 16px;
    font-size: 11px;
    margin-left: 4px;
    vertical-align: middle;
}

.dashboard-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 600px) {
    .dashboard-two-col {
        grid-template-columns: 1fr;
    }
}

.dashboard-card {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 20px;
    background: #fafafa;
}

.dashboard-card h3 {
    color: var(--color-text);
    font-size: 18px;
    margin: 0 0 12px 0;
}

.dashboard-card p {
    margin: 0 0 6px 0;
}

.dashboard-card p:last-child {
    margin-bottom: 0;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 8px;
    margin-bottom: 8px;
}

.badge-password {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.badge-github {
    background: #24292e;
    color: white;
}

.auth-methods {
    margin-bottom: 8px;
}

/* Scrollable container: height of ~5 list items. Collapsed = no scrollbar, expanded = scrollbar */
.scrollable-list {
    max-height: 180px;
    overflow-y: hidden;
    margin-bottom: 12px;
}
.scrollable-list-expanded {
    overflow-y: auto;
}

.activity-list,
.auth-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-list li,
.auth-list li {
    min-height: 33px;
    padding: 6px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.activity-list li:last-child,
.auth-list li:last-child {
    border-bottom: none;
}

/* Activity items: text only, no button - align content to start */
.activity-list li {
    justify-content: flex-start;
}

.activity-list-hidden,
.auth-list-hidden {
    display: none !important;
}

.btn-view-more {
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 14px;
    cursor: pointer;
    padding: 6px 0;
    margin: 0;
}

.btn-view-more:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

.auth-item {
    flex-wrap: nowrap;
}

.btn-revoke {
    font-size: 12px;
    line-height: 1.2;
    padding: 2px 10px;
    background: transparent;
    color: var(--color-error-text);
    border: 1px solid var(--color-error-border);
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
}

.btn-revoke:hover {
    background: var(--color-error-bg);
}

.activity-helper {
    font-size: 12px;
    color: var(--color-text-muted);
    margin: 12px 0 0 0;
    line-height: 1.5;
}

.activity-helper code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

.lockout-warning {
    color: var(--color-error-text);
    background: var(--color-error-bg);
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid var(--color-error-border);
    margin-top: 8px;
}

.text-muted {
    color: var(--color-text-muted);
    font-size: 14px;
}

.btn-link {
    background: none;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
    padding: 0;
}

.btn-link:hover {
    color: var(--color-primary-hover);
}

.loading {
    text-align: center;
    color: var(--color-text-muted);
    font-style: italic;
}

.token-info {
    margin-bottom: 32px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.token-info h3 {
    color: var(--color-text);
    font-size: 18px;
    margin-bottom: 12px;
}

.token-details {
    margin-top: 12px;
}

.token-details p {
    color: var(--color-text-muted);
    font-size: 14px;
    margin-bottom: 8px;
}

.token-display {
    background-color: #fff;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--color-text);
    word-break: break-all;
    overflow-x: auto;
    max-height: 100px;
    overflow-y: auto;
}

/* Button group - flex layout to prevent overlap */
.button-group {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: stretch;
}

.button-group .btn-primary,
.button-group .btn-secondary,
.button-group a.btn-primary,
.button-group a.btn-secondary {
    flex: 1;
    min-width: 120px;
    margin-top: 0;
}

.button-group-form {
    flex-direction: row;
}

.button-group-inline {
    margin-top: 12px;
}

.unlink-panel {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
}

.account-id {
    font-family: ui-monospace, monospace;
    font-size: 13px;
    color: var(--color-text-muted);
}

.btn-secondary {
    padding: 14px;
    background: var(--color-dark);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-secondary:hover {
    background: var(--color-dark-muted);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 27, 35, 0.35);
}

.btn-secondary:active {
    transform: translateY(0);
}

.btn-secondary.btn-outline {
    background: transparent;
    color: var(--color-dark);
    border: 1px solid var(--color-border);
}

.btn-secondary.btn-outline:hover {
    background: #f5f5f5;
    border-color: var(--color-dark);
}

.btn-small {
    font-size: 12px;
    padding: 4px 10px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.btn-small:hover {
    background: var(--color-primary-hover);
}

.token-value {
    word-break: break-all;
    font-size: 14px;
    color: var(--color-text-muted);
}

.token-actions {
    margin-top: 4px;
    margin-bottom: 0;
}

.token-actions .btn-small {
    margin-right: 8px;
}

/* GitHub button */
.btn-github {
    width: 100%;
    padding: 14px;
    background: #24292e;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
}

.btn-github:hover {
    background: #1b1f23;
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(36, 41, 46, 0.4);
}

.btn-github:active {
    transform: translateY(0);
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0 16px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--color-border);
}

.divider span {
    padding: 0 12px;
    color: #999;
    font-size: 14px;
    font-weight: 500;
}

/* Avatar */
.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: block;
    border: 3px solid var(--color-primary);
}

.dashboard-row .avatar {
    margin: 0;
}

.avatar-placeholder {
    background: #e5e7eb;
    border-color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-placeholder svg {
    width: 48px;
    height: 48px;
    color: #6b7280;
}

/* GitHub badge */
.github-badge {
    display: inline-block;
    background: #24292e;
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    margin-top: 8px;
}

/* Edit profile link */
.edit-link {
    display: inline-block;
    margin-top: 16px;
    color: var(--color-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.edit-link:hover {
    text-decoration: underline;
}


/* Email Verification Page Styles */
.message-box {
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
}

.message-box.success {
    background: #d4edda;
    border: 2px solid #c3e6cb;
}

.message-box.warning {
    background: #fff3cd;
    border: 2px solid #ffeaa7;
}

.message-box.info {
    background: #d1ecf1;
    border: 2px solid #bee5eb;
}

.message-box.error {
    background: #f8d7da;
    border: 2px solid #f5c6cb;
}

.email-highlight {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-primary);
    background: var(--color-primary-light);
    padding: 10px 20px;
    border-radius: 5px;
    display: inline-block;
    margin: 10px 0;
}
