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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a2e;
    color: #e0e0e0;
    min-height: 100vh;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

.card {
    background: #16213e;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid #0f3460;
}

h1, h2, h3 {
    color: #ffffff;
    margin-bottom: 16px;
}

h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 10px 14px;
    background: #0f3460;
    border: 1px solid #1a3a6e;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 14px;
    margin-bottom: 12px;
}

input:focus {
    outline: none;
    border-color: #4a90d9;
}

button {
    padding: 10px 20px;
    background: #4a90d9;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover {
    background: #357abd;
}

button.secondary {
    background: #2d3a5e;
}

button.secondary:hover {
    background: #3d4a7e;
}

button.danger {
    background: #c0392b;
}

button.danger:hover {
    background: #e74c3c;
}

.hidden {
    display: none !important;
}

#login-form {
    max-width: 360px;
    margin: 80px auto;
}

#login-form h1 {
    text-align: center;
    margin-bottom: 24px;
}

#login-form .subtitle {
    text-align: center;
    color: #888;
    margin-bottom: 24px;
}

#login-form button {
    width: 100%;
    margin-top: 8px;
}

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

.device-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #0f3460;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.device-item:hover {
    background: #1a3a6e;
}

.device-info {
    flex: 1;
}

.device-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.device-model {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.device-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-dot.online {
    background: #27ae60;
    box-shadow: 0 0 6px #27ae60;
}

.status-dot.offline {
    background: #666;
}

.status-label {
    font-size: 12px;
    color: #888;
}

#device-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

#back-btn {
    background: transparent;
    color: #4a90d9;
    padding: 0;
    font-size: 14px;
}

#back-btn:hover {
    text-decoration: underline;
}

.status-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.status-item {
    flex: 1;
    background: #0f3460;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.status-item .label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
}

.status-item .value {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin-top: 4px;
}

.proxy-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

#proxy-output {
    background: #0a0a1a;
    border: 1px solid #0f3460;
    border-radius: 8px;
    padding: 16px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    color: #a0d0a0;
    min-height: 100px;
    white-space: pre-wrap;
    word-break: break-all;
}

#user-info {
    text-align: right;
    font-size: 12px;
    color: #888;
    margin-bottom: 16px;
}

#logout-btn {
    background: transparent;
    color: #c0392b;
    padding: 4px 8px;
    font-size: 12px;
}

#logout-btn:hover {
    text-decoration: underline;
}

.last-seen {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
}

.error-msg {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 8px;
}
