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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.card {
    background: #fff;
    color: #1e293b;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 640px;
    padding: 40px 36px;
    position: relative;
}

.card.wide { max-width: 800px; }

.lang-switcher {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 4px;
}

.lang-switcher a {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    color: #64748b;
    background: #f1f5f9;
}

.lang-switcher a.active {
    background: #3b82f6;
    color: #fff;
}

.lang-switcher a:hover:not(.active) { background: #e2e8f0; }

.logo { text-align: center; margin-bottom: 28px; }

.logo-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 12px;
}

h1 { font-size: 1.5rem; font-weight: 700; color: #0f172a; }

.subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 4px;
}

label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

input[type="text"],
input[type="password"],
input[type="file"] {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9375rem;
    background: #f8fafc;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: #3b82f6;
    background: #fff;
}

input[type="file"] { padding: 9px; cursor: pointer; }

.field { margin-bottom: 18px; }

.btn {
    display: inline-block;
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #fff;
    margin-top: 6px;
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    margin-top: 10px;
}

.btn-link {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: 0.8125rem;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

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

.btn-logout {
    display: block;
    text-align: center;
    margin-top: 16px;
    font-size: 0.8125rem;
    color: #94a3b8;
    text-decoration: none;
}

.btn-logout:hover { color: #ef4444; }

.alert {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.875rem;
    margin-bottom: 18px;
    word-break: break-word;
}

.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

.section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 14px;
}

.remote-hint {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 20px;
    word-break: break-all;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 18px;
    cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #3b82f6;
}

.log-list {
    margin-top: 28px;
    border-top: 1px solid #e2e8f0;
    padding-top: 24px;
}

.log-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    font-size: 0.8125rem;
    background: #f8fafc;
}

.log-item.success { border-color: #bbf7d0; background: #f0fdf4; }
.log-item.error { border-color: #fecaca; background: #fef2f2; }

.log-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: #64748b;
    margin-bottom: 6px;
    font-size: 0.75rem;
}

.log-meta strong { color: #334155; }

.log-message {
    color: #1e293b;
    word-break: break-word;
    white-space: pre-wrap;
}

.log-empty {
    font-size: 0.875rem;
    color: #94a3b8;
    text-align: center;
    padding: 16px 0;
}

.code-block {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 10px;
    padding: 14px;
    font-size: 0.8125rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 18px;
    max-height: 320px;
    overflow-y: auto;
}

.code-block-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 8px;
}

.nav-row {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.nav-row a {
    font-size: 0.8125rem;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.nav-row a:hover { text-decoration: underline; }
