/* ============================================
   Terminal Selection Screen
   ============================================ */

.ts-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    background: var(--bg-body, #1a1a2e);
    padding: 24px;
}

.ts-card {
    background: var(--bg-card, #242442);
    border-radius: 16px;
    padding: 40px;
    max-width: 800px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.ts-header {
    text-align: center;
    margin-bottom: 32px;
}

.ts-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.ts-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary, #fff);
    margin: 0 0 8px 0;
}

.ts-subtitle {
    font-size: 14px;
    color: var(--text-muted, #8888aa);
    margin: 0;
}

.ts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.ts-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 12px;
    background: var(--bg-input, #1e1e3a);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    color: var(--text-primary, #fff);
    font-family: inherit;
    font-size: inherit;
}

.ts-tile:hover {
    border-color: var(--accent, #4a6cf7);
    background: rgba(74, 108, 247, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(74, 108, 247, 0.2);
}

.ts-tile:active {
    transform: translateY(0);
}

.ts-tile.ts-current {
    border-color: var(--green, #22c55e);
    background: rgba(34, 197, 94, 0.08);
}

.ts-tile-icon {
    font-size: 32px;
    line-height: 1;
}

.ts-tile-name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-primary, #fff);
}

.ts-tile-type {
    font-size: 11px;
    color: var(--text-muted, #8888aa);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ts-tile-zone {
    font-size: 11px;
    color: var(--accent, #4a6cf7);
}

.ts-tile-desc {
    font-size: 11px;
    color: var(--text-dim, #6666aa);
    text-align: center;
    line-height: 1.3;
}

.ts-tile-badge {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--green, #22c55e);
    background: rgba(34, 197, 94, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
}

.ts-footer {
    text-align: center;
}

.ts-hint {
    font-size: 12px;
    color: var(--text-dim, #555);
}

.ts-skip-btn {
    padding: 10px 24px;
    background: var(--accent, #4a6cf7);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.ts-skip-btn:hover {
    background: #3b5de7;
}

.ts-register-btn {
    padding: 12px 28px;
    background: #22c55e;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.ts-register-btn:hover {
    background: #16a34a;
    transform: translateY(-1px);
}

/* Register Modal */
.ts-register-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.ts-register-modal {
    background: var(--bg-card, #242442);
    border-radius: 16px;
    padding: 32px;
    width: 540px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.ts-register-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary, #fff);
    text-align: center;
    margin-bottom: 24px;
}

.ts-register-field {
    margin-bottom: 20px;
}

.ts-register-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted, #8888aa);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.ts-register-input {
    width: 100%;
    height: 56px;
    padding: 0 16px;
    background: var(--bg-input, #1e1e3a);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: var(--text-primary, #fff);
    font-size: 18px;
    font-weight: 600;
    font-family: inherit;
    box-sizing: border-box;
}

.ts-register-input:focus {
    outline: none;
    border-color: var(--accent, #4a6cf7);
}

.ts-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.ts-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 8px;
    background: var(--bg-input, #1e1e3a);
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary, #fff);
    font-family: inherit;
}

.ts-type-btn:hover {
    border-color: rgba(74, 108, 247, 0.4);
    background: rgba(74, 108, 247, 0.08);
}

.ts-type-btn.selected {
    border-color: var(--accent, #4a6cf7);
    background: rgba(74, 108, 247, 0.15);
}

.ts-type-icon {
    font-size: 14px;
    font-weight: 700;
}

.ts-type-desc {
    font-size: 10px;
    color: var(--text-muted, #8888aa);
}

.ts-register-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.ts-register-action {
    flex: 1;
    height: 56px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.ts-register-action.cancel {
    background: rgba(255,255,255,0.08);
    color: var(--text-muted, #8888aa);
    border: 1px solid rgba(255,255,255,0.1);
}

.ts-register-action.cancel:hover {
    background: rgba(255,255,255,0.14);
}

.ts-register-action.confirm {
    background: #22c55e;
    color: #fff;
}

.ts-register-action.confirm:hover {
    background: #16a34a;
}

/* Login screen terminal indicator */
.login-terminal-name {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent, #4a6cf7);
    margin-bottom: 8px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.login-terminal-name:hover {
    opacity: 1;
    text-decoration: underline;
}
