:root {
    --bg: #f7f7f8;
    --surface: #ffffff;
    --border: #e3e3e6;
    --text: #1c1c1f;
    --text-muted: #6b6b73;
    --accent: #2f2f33;
    --danger: #c0392b;
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
}

h1, h2, h3 {
    margin: 0;
    font-weight: 600;
}

button, input, textarea, select {
    font: inherit;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.link-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: underline;
}

.layout {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

.panel h2 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

.empty-state {
    color: var(--text-muted);
}

.row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.row:last-child {
    border-bottom: none;
}

.row-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 12px;
}

.icon-btn:hover {
    color: var(--text);
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Panel "Detectado en el servidor" */

.scan-item {
    border-bottom: 1px solid var(--border);
}

.scan-item:last-child {
    border-bottom: none;
}

.scan-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.scan-detail {
    padding: 4px 0 14px 4px;
}

.scan-meta {
    margin-top: 8px;
    margin-bottom: 14px;
}

.tree-heading {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin: 0 0 6px;
}

.tree-container {
    font-size: 13px;
}

.tree-list {
    list-style: none;
    margin: 0;
    padding-left: 18px;
}

.tree-container > .tree-list {
    padding-left: 0;
}

.tree-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
    cursor: pointer;
}

.tree-toggle {
    display: inline-block;
    width: 12px;
    color: var(--text-muted);
    font-size: 10px;
}

.tree-label {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.error {
    color: var(--danger);
    font-size: 13px;
}

.hidden {
    display: none;
}

/* Login page */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.login-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    width: 280px;
    text-align: center;
}

.login-box h1 {
    margin-bottom: 20px;
    font-size: 18px;
}

.login-box form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-box input {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.login-box button {
    padding: 10px;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius);
    cursor: pointer;
}

/* Campo con ojito para mostrar/ocultar la contrasena */
.login-box .field {
    position: relative;
    display: flex;
}

.login-box .field input {
    width: 100%;
    padding-right: 34px;
}

.login-box .field .eye {
    position: absolute;
    right: 1px;
    top: 1px;
    bottom: 1px;
    width: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    border-radius: 0 var(--radius) var(--radius) 0;
    cursor: pointer;
}

.login-box .field .eye:hover {
    color: var(--text);
}

/* La diagonal solo se ve cuando la contrasena esta oculta */
.login-box .field .eye[aria-pressed="true"] .eye-slash {
    display: none;
}
