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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    min-height: 100vh;
}

#app {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: #94a3b8;
    margin-bottom: 2rem;
}

.card {
    background: #1e293b;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.device-name {
    font-weight: 600;
}

.device-ip {
    color: #94a3b8;
    font-size: 0.875rem;
    font-family: monospace;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.15s;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-secondary {
    background: #334155;
    color: #e2e8f0;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
}

.login-container h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

#g_id_signin {
    margin-top: 1.5rem;
}

.add-device {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.add-device input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid #334155;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 0.875rem;
}

.add-device input:focus {
    outline: none;
    border-color: #3b82f6;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #94a3b8;
}

.qr-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.qr-container img {
    border-radius: 0.5rem;
    background: white;
    padding: 0.5rem;
}

.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #475569;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    color: #94a3b8;
    font-size: 0.875rem;
}

.user-info a {
    color: #94a3b8;
    cursor: pointer;
}

.user-info a:hover {
    color: #e2e8f0;
}
